/**
 * Base: reset, typography, layout utilities
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: var(--text-base);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: var(--line-height-body);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
}

u {
  text-decoration: underline;
}

s,
strike {
  text-decoration: line-through;
}

del {
  text-decoration: line-through;
}

.rich-text {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rich-text p,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6,
.rich-text ul,
.rich-text ol,
.rich-text blockquote,
.rich-text hr {
  display: block;
  margin: 0 0 0.55em;
}

.rich-text > *:last-child {
  margin-bottom: 0;
}

.rich-text p:empty {
  min-height: 1em;
}

.rich-text ul,
.rich-text ol {
  padding-left: 1.25em;
}

.rich-text li {
  display: list-item;
  margin: 0 0 0.25em;
}

.rich-text li:last-child {
  margin-bottom: 0;
}

.rich-text--inline {
  display: contents;
  white-space: inherit;
}

.rich-text--inline [style*="text-align"] {
  display: block;
}

.rich-text blockquote {
  padding-left: 1em;
  border-left: 3px solid var(--color-primary);
}

.rich-text hr {
  border: 0;
  border-top: 1px solid currentColor;
  opacity: 0.35;
  height: 0;
  margin: 0.75em 0;
}

.rich-text sub {
  vertical-align: sub;
  font-size: 0.75em;
}

.rich-text sup {
  vertical-align: super;
  font-size: 0.75em;
}

.rich-text .alignleft,
.rich-text .has-text-align-left,
.page-hero .has-text-align-left {
  text-align: left;
}

.rich-text .aligncenter,
.rich-text .has-text-align-center,
.page-hero .has-text-align-center {
  text-align: center;
}

.rich-text .alignright,
.rich-text .has-text-align-right,
.page-hero .has-text-align-right {
  text-align: right;
}

.rich-text .alignjustify,
.rich-text .has-text-align-justify,
.page-hero .has-text-align-justify {
  text-align: justify;
}

.rich-text .has-small-font-size {
  font-size: 0.875em;
}

.rich-text .has-medium-font-size {
  font-size: 1.125em;
}

.rich-text .has-large-font-size {
  font-size: 1.375em;
}

.rich-text .has-x-large-font-size,
.rich-text .has-huge-font-size {
  font-size: 1.75em;
}

/* Heading scale (Montserrat) */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  line-height: var(--line-height-heading);
  color: var(--color-heading);
  margin: 0 0 0.5407797364em;
}

h1 {
  font-size: var(--text-h1);
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
}

h4 {
  font-size: var(--text-h4);
}

h5 {
  font-size: var(--text-h5);
}

h6 {
  font-size: var(--text-h6);
}

@media (min-width: 35.5rem) {
  h1 {
    font-size: var(--text-h1-lg);
  }

  h2 {
    font-size: var(--text-h2-lg);
  }

  h3 {
    font-size: var(--text-h3-lg);
  }

  h4 {
    font-size: var(--text-h4-lg);
  }

  h5 {
    font-size: var(--text-h5-lg);
  }

  h6 {
    font-size: var(--text-h6-lg);
  }
}

/* Narrower subheads (sidebars / forms / product feature blocks) */
.type-section-sub {
  font-size: var(--text-h5);
  line-height: var(--line-height-heading);
}

@media (min-width: 35.5rem) {
  .type-section-sub {
    font-size: var(--text-h5-lg);
  }
}

button,
input,
select,
textarea {
  font-family: var(--font-body);
}

p {
  margin: 0 0 1.5em;
  color: var(--color-text-muted);
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 1.5em;
  padding-left: 1.25rem;
  color: var(--color-text-muted);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

@media (max-width: 767px) {
  .container {
    max-width: 100%;
  }
}

/* Cap container on ultra-wide displays */
@media (min-width: 1920px) {
  .container {
    max-width: 1800px;
  }
}

.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
  }
}

.section--alt {
  background-color: var(--color-surface-alt);
}

.section__intro {
  margin-bottom: var(--space-10);
}

.section__title {
  margin-bottom: var(--space-4);
}

.section__lead {
  font-size: 1.0625rem;
  line-height: var(--line-height-body);
  margin-bottom: 0;
}

.rich-text p,
.section__lead p,
.card__excerpt p,
.proof-card__desc p,
.cta-banner__sub p,
.process-step__desc p,
.foa__card-desc p,
.factory-pane__info p,
.hero__lead p,
.compliance-note__body p,
.about-columns__text p,
.product-features p,
.contact-response p,
.page-hero__lead p {
  margin: 0;
}

.rich-text p + p,
.section__lead p + p,
.card__excerpt p + p,
.proof-card__desc p + p,
.cta-banner__sub p + p,
.process-step__desc p + p,
.foa__card-desc p + p,
.factory-pane__info p + p,
.hero__lead p + p,
.compliance-note__body p + p,
.about-columns__text p + p,
.product-features p + p,
.contact-response p + p,
.page-hero__lead p + p {
  margin-top: 0.55em;
}

.rich-text ul,
.section__lead ul,
.card__excerpt ul,
.proof-card__desc ul,
.cta-banner__sub ul,
.process-step__desc ul,
.foa__card-desc ul,
.hero__lead ul,
.compliance-note__body ul,
.about-columns__text ul,
.product-features ul,
.contact-response ul,
.page-hero__lead ul,
.rich-text ol,
.section__lead ol,
.card__excerpt ol,
.proof-card__desc ol,
.cta-banner__sub ol,
.process-step__desc ol,
.foa__card-desc ol,
.hero__lead ol,
.compliance-note__body ol,
.about-columns__text ol,
.product-features ol,
.contact-response ol,
.page-hero__lead ol {
  margin: 0.55em 0 0;
  padding-left: 1.25em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.text-technical {
  color: var(--color-technical);
  font-weight: 600;
}

.wood-bg {
  background: linear-gradient(135deg, #e8f5ef 0%, #d4ebe0 45%, #c5e4d4 100%);
  color: var(--color-heading);
}

.wood-bg h1,
.wood-bg h2,
.wood-bg h3 {
  color: var(--color-heading);
}

.wood-bg p {
  color: var(--color-text-muted);
  opacity: 1;
}

/* Spacing utilities (mockup — avoid inline styles) */
.u-mt-4 {
  margin-top: var(--space-4);
}

.u-mt-6 {
  margin-top: var(--space-6);
}

.u-mt-8 {
  margin-top: var(--space-8);
}

.u-mb-0 {
  margin-bottom: 0;
}

.u-mb-6 {
  margin-bottom: var(--space-6);
}

.u-mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.u-max-w-reading {
  max-width: 36rem;
}

/* Scroll-triggered fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
