/* =====================================================
   MARIS — Design Tokens (old-money: sage / cream / brass)
   ===================================================== */
:root {
  /* Ink & greens */
  --ink:          #1B211D;
  --ink-soft:     #3A443D;
  --muted:        #566159;   /* secondary text on cream (AA) */
  --sage:         #6F7F71;
  --sage-light:   #9DA99E;

  /* Deep forest (dark sections) */
  --forest:       #24332B;
  --forest-2:     #2C3D33;
  --forest-deep:  #18211B;

  /* Brass / gold */
  --brass:        #A9884E;
  --brass-deep:   #8A6D3B;
  --brass-text:   #7A5F33;   /* brass dark enough for small text on cream */
  --brass-light:  #C9A968;

  /* Paper */
  --cream:        #F4EEE3;
  --cream-2:      #EDE5D6;
  --card:         #FBF8F1;
  --paper:        #FCFAF4;
  --border:       #DED4C2;
  --border-soft:  #E7DFD0;

  /* On dark */
  --on-forest:        #F1EBDD;
  --on-forest-soft:   #B4BDB2;
  --on-forest-border: rgba(241, 235, 221, 0.14);

  --brass-grad: linear-gradient(135deg, #C9A968 0%, #A9884E 100%);

  /* Motion — slow, expensive */
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft:   cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
}

/* =====================================================
   Reset & base
   ===================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.0625rem;          /* 17px */
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
ul, ol { list-style: none; }
::selection { background: rgba(169, 136, 78, 0.28); color: var(--ink); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Paper grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: multiply;
}

/* Scroll progress (hairline brass) */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--brass);
  z-index: 1001;
  box-shadow: 0 0 8px rgba(169, 136, 78, 0.5);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--cream-2); }
::-webkit-scrollbar-thumb { background: var(--sage); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--brass); }

/* =====================================================
   Typography
   ===================================================== */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.display {
  font-size: clamp(2.7rem, 6.2vw, 5.1rem);
  font-weight: 500;
  line-height: 1.03;
}

.h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); }

em, .italic { font-style: italic; }

.accent { color: var(--brass-text); }
.on-dark .accent, .accent--light { color: var(--brass-light); }

/* Eyebrow label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--brass-text);
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--brass);
}
.eyebrow--center { justify-content: center; }
.on-dark .eyebrow { color: var(--brass-light); }
.on-dark .eyebrow::before { background: var(--brass-light); }

.lead {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 56ch;
}
.on-dark .lead { color: var(--on-forest-soft); }

/* =====================================================
   Section rhythm
   ===================================================== */
.section { padding: clamp(5rem, 9vw, 8.5rem) 0; position: relative; }
.section--cream { background: var(--cream-2); }
.section--paper { background: var(--paper); }
.on-dark, .section--forest {
  background: linear-gradient(170deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: var(--on-forest);
}
.section--forest h1, .section--forest h2, .section--forest h3, .on-dark h1, .on-dark h2, .on-dark h3 { color: var(--on-forest); }

.section__head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section__head .eyebrow { margin-bottom: 22px; }
.section__title { margin-bottom: 22px; }

/* Decorative horizon divider (the signature motif) */
.horizon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  color: var(--brass);
}
.horizon::before, .horizon::after {
  content: '';
  height: 1px;
  width: min(34vw, 320px);
  background: linear-gradient(90deg, transparent, var(--border));
}
.horizon::after { background: linear-gradient(90deg, var(--border), transparent); }
.on-dark .horizon::before { background: linear-gradient(90deg, transparent, var(--on-forest-border)); }
.on-dark .horizon::after { background: linear-gradient(90deg, var(--on-forest-border), transparent); }
.horizon__glyph { width: 120px; height: auto; flex-shrink: 0; }
.horizon__glyph path { stroke: var(--brass); }

/* =====================================================
   Buttons
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 1.05rem 2.1rem;
  border-radius: 2px;
  position: relative;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), background 0.4s var(--ease-soft), color 0.4s var(--ease-soft);
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }

/* Primary = brass (the single gold moment) */
.btn--accent {
  background: var(--brass-grad);
  color: var(--forest-deep);
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 8px 24px rgba(138, 109, 59, 0.22);
}
.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 14px 34px rgba(138, 109, 59, 0.34);
}

/* Ghost (secondary) */
.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--border);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--brass); color: var(--brass-text); }
.on-dark .btn--ghost { color: var(--on-forest); box-shadow: inset 0 0 0 1px var(--on-forest-border); }
.on-dark .btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--brass-light); color: var(--brass-light); }

.btn--full { width: 100%; }
.btn--lg { padding: 1.2rem 2.6rem; font-size: 1rem; }

/* Quiet text link with brass underline */
.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding-bottom: 3px;
}
.link::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--brass);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.link:hover::after { transform: scaleX(1); }
.on-dark .link { color: var(--on-forest); }

/* =====================================================
   Header
   ===================================================== */
.header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  transition: background 0.5s var(--ease-soft), box-shadow 0.5s var(--ease-soft), backdrop-filter 0.5s var(--ease-soft);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 86px;
  gap: 24px;
}
.header.scrolled {
  background: rgba(244, 238, 227, 0.82);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 1px 0 var(--border-soft);
}

.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo__img { height: 38px; width: auto; }
/* On the dark hero the header sits over forest -> use light logo until scrolled */
.logo__img--light { display: block; }
.logo__img--dark { display: none; }
.header.scrolled .logo__img--light { display: none; }
.header.scrolled .logo__img--dark { display: block; }

.nav { display: flex; align-items: center; gap: 38px; }
.nav__link {
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--on-forest-soft);
  position: relative;
  transition: color 0.4s var(--ease-soft);
  padding: 4px 0;
}
.nav__link::after {
  content: '';
  position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--brass-light);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.nav__link:hover { color: var(--on-forest); }
.nav__link:hover::after { transform: scaleX(1); }
.header.scrolled .nav__link { color: var(--muted); }
.header.scrolled .nav__link:hover { color: var(--ink); }
.header.scrolled .nav__link::after { background: var(--brass); }

.header__cta { padding: 0.72rem 1.5rem; font-size: 0.82rem; }

/* Close button lives inside the overlay -> always on top, no z-index battle */
.nav__close { display: none; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 42px; height: 42px;
  position: relative;
  z-index: 1300;
}
.burger span {
  display: block;
  width: 27px; height: 2px;
  background: var(--on-forest);
  transition: transform 0.45s var(--ease), opacity 0.3s var(--ease-soft), background 0.4s;
  margin-left: auto;
}
.header.scrolled .burger span { background: var(--ink); }
/* Menu open: X sits on the dark overlay -> force a clearly visible brass X (beats the scrolled rule) */
.header.scrolled .burger.active span,
.burger.active span { background: var(--brass-light); }
.burger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); width: 27px; }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); width: 27px; }

/* =====================================================
   Hero
   ===================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 130px 0 90px;
  overflow: hidden;
}
.hero__vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 80% 30%, rgba(201,169,104,0.10), transparent 55%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.5fr 0.68fr;
  align-items: center;
  gap: clamp(32px, 4vw, 60px);
  width: 100%;
}
.hero__content { max-width: 720px; min-width: 0; }
.hero__title {
  margin-bottom: 28px;
  /* Sized so the headline holds to 2 lines on desktop (wraps further on mobile) */
  font-size: clamp(1.6rem, 2.5vw, 2.05rem);
  line-height: 1.12;
  overflow-wrap: break-word;
}
.hero__title .line { display: block; }
.hero__text { color: var(--on-forest-soft); font-size: 1.075rem; line-height: 1.78; margin-bottom: 40px; max-width: 52ch; }
.hero__actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* Hero visual — framed image */
.hero__visual { position: relative; justify-self: center; width: 100%; max-width: 460px; min-width: 0; }
/* Brass corner framing around the hero photo (photo stays natural, transparent bg) */
.frame {
  position: relative;
  border: 1px solid var(--on-forest-border);
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
}
.frame::before, .frame::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border: 1.5px solid var(--brass-light);
  pointer-events: none;
}
.frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.frame::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.hero__photo { width: 100%; height: auto; display: block; }

.hero__caption {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px clamp(16px, 2vw, 28px);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-forest-soft);
}
.hero__caption span { white-space: nowrap; }
.hero__caption b { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 600; color: var(--brass-light); letter-spacing: 0; text-transform: none; }

/* =====================================================
   About
   ===================================================== */
/* Editorial alternating rows (reimagined from boxed cards) */
.features {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 4.5vw, 4rem);
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
/* Raised warm panel under each row -> depth against the cream section */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border-soft);
  padding: clamp(20px, 2.6vw, 40px);
  box-shadow: 0 26px 60px -38px rgba(27, 33, 29, 0.32);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 38px 80px -40px rgba(27, 33, 29, 0.42);
}
.feature--reverse .feature__media { order: 2; }
.feature__media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--brass);
  background: var(--cream-2);
  transition: border-color 0.6s var(--ease-soft);
}
.feature__media img {
  width: 100%;
  aspect-ratio: 6 / 5;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.feature:hover .feature__media { border-color: var(--brass-light); }
.feature:hover .feature__media img { transform: scale(1.04); }
.feature__body { max-width: 34rem; padding-block: clamp(4px, 1vw, 14px); }
.feature--reverse .feature__body { margin-left: auto; }
.feature__body .eyebrow { margin-bottom: 18px; }
.feature__title {
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  line-height: 1.14;
  margin-bottom: 16px;
  text-wrap: balance;
}
.feature__text { color: var(--muted); font-size: 1rem; }

/* Partners marquee */
.partners { margin-top: clamp(2.5rem, 5vw, 4rem); }
.partners__label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 30px;
}
.marquee {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track { display: inline-flex; align-items: center; gap: 72px; width: max-content; will-change: transform; }
.marquee__track img {
  height: 34px;
  width: auto;
}

/* =====================================================
   How it works — numbered sequence
   ===================================================== */
.steps { position: relative; }
.steps__rail {
  position: absolute;
  left: 0; right: 0; top: 33px;
  height: 1px;
  background: var(--on-forest-border);
}
.steps__rail-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brass), var(--brass-light));
}
.steps__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2.4vw, 34px);
  position: relative;
}
.step { position: relative; display: flex; flex-direction: column; }
.step__num {
  width: 66px; height: 66px;
  border-radius: 50%;
  border: 1px solid var(--on-forest-border);
  background: var(--forest-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  color: var(--brass-light);
  margin-bottom: 20px;
  position: relative;
  transition: border-color 0.5s var(--ease-soft), color 0.5s, transform 0.5s var(--ease);
}
.step:hover .step__num { border-color: var(--brass-light); transform: translateY(-3px); }
.step--final .step__num { background: var(--brass-grad); color: var(--forest-deep); border-color: transparent; }
/* Each step framed in a light card (like the reviews), on the dark section */
.step__card {
  flex: 1;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--on-forest-border);
  padding: clamp(18px, 1.6vw, 26px);
  transition: border-color 0.5s var(--ease-soft), background 0.5s var(--ease-soft);
}
.step:hover .step__card { border-color: rgba(201, 169, 104, 0.45); background: rgba(255, 255, 255, 0.045); }
.step .step__title { font-size: 1.32rem; margin-bottom: 10px; color: var(--brass-light); }
.step__text { font-size: 0.92rem; color: var(--on-forest-soft); line-height: 1.65; }

/* =====================================================
   Reviews
   ===================================================== */
.reviews__viewport { overflow: hidden; }
.reviews__track {
  display: flex;
  gap: clamp(20px, 3vw, 32px);
  will-change: transform;
  transition: transform 0.7s var(--ease);
}
.review {
  flex: 0 0 100%;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border-soft);
  padding: clamp(30px, 4vw, 46px);
  display: flex;
  flex-direction: column;
  position: relative;
}
.review__mark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4.2rem;
  line-height: 0.6;
  color: var(--brass);
  opacity: 0.55;
  margin-bottom: 18px;
  height: 36px;
}
.review__text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  line-height: 1.4;
  color: var(--ink-soft);
  margin-bottom: 28px;
  font-weight: 500;
}
.review__author { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.review__avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em;
  flex-shrink: 0;
}
.review__name { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.review__role { font-size: 0.8rem; color: var(--sage); }

.reviews__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
}
.reviews__dots { display: flex; gap: 10px; }
.reviews__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border);
  transition: all 0.4s var(--ease);
}
.reviews__dot.active { background: var(--brass); width: 30px; border-radius: 6px; }
.reviews__arrows { display: flex; gap: 10px; }
.reviews__arrow {
  width: 52px; height: 52px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  transition: all 0.4s var(--ease);
}
.reviews__arrow:hover { box-shadow: inset 0 0 0 1px var(--brass); color: var(--brass-text); background: var(--paper); }
.reviews__arrow svg { width: 20px; height: 20px; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 760px;
  margin: clamp(3.5rem, 7vw, 6rem) auto 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat {
  padding: clamp(1.25rem, 2.4vw, 1.7rem) 1.25rem;
  text-align: center;
  position: relative;
}
.stat + .stat { border-left: 1px solid var(--border); }
.stat__num {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(3rem, 6vw, 4.4rem);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.stat__num .unit { color: var(--brass-text); }
.stat__label { margin-top: 14px; font-size: 0.86rem; color: var(--muted); }

.cta-row { text-align: center; margin-top: clamp(3rem, 6vw, 4.5rem); }

/* =====================================================
   Closing CTA band
   ===================================================== */
.cta-band { text-align: center; }
.cta-band .display { margin-bottom: 26px; font-size: clamp(2.15rem, 5vw, 4.1rem); }
.cta-band .lead { margin: 0 auto 38px; text-align: center; }

/* =====================================================
   Footer
   ===================================================== */
.footer {
  background: var(--forest-deep);
  color: var(--on-forest);
  padding-top: clamp(3.5rem, 6vw, 5rem);
}
.footer__top { border-top: 1px solid var(--on-forest-border); padding-top: clamp(3rem, 5vw, 4rem); }
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(3rem, 5vw, 4rem);
}
.footer__logo-img { height: 40px; width: auto; margin-bottom: 22px; }
.footer__desc { color: var(--on-forest-soft); font-size: 0.92rem; max-width: 40ch; }
.footer__heading {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-light);
  margin-bottom: 18px;
}
.footer__info { color: var(--on-forest-soft); font-size: 0.95rem; line-height: 1.9; }
.footer .link { color: var(--on-forest); }
.footer .link:hover { color: var(--brass-light); }
.footer__bottom {
  border-top: 1px solid var(--on-forest-border);
  padding: 22px 0;
  font-size: 0.8rem;
  color: var(--on-forest-soft);
  text-align: center;
}

/* =====================================================
   Modal + form
   ===================================================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 20, 16, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s var(--ease-soft), visibility 0.45s var(--ease-soft);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: linear-gradient(170deg, var(--forest) 0%, var(--forest-deep) 100%);
  border: 1px solid var(--on-forest-border);
  padding: clamp(32px, 5vw, 52px) clamp(26px, 4vw, 46px);
  max-width: 470px;
  width: 100%;
  position: relative;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.55s var(--ease);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal__close {
  position: absolute; top: 18px; right: 20px;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--on-forest-soft);
  font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.3s, background 0.3s, transform 0.4s var(--ease);
}
.modal__close:hover { color: var(--on-forest); background: rgba(255,255,255,0.06); transform: rotate(90deg); }
.modal .eyebrow { margin-bottom: 16px; }
.modal__title { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--on-forest); margin-bottom: 8px; }
.modal__sub { color: var(--on-forest-soft); font-size: 0.92rem; margin-bottom: 28px; }

.form__group { margin-bottom: 16px; }
.form__input {
  width: 100%;
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--on-forest-border);
  border-radius: 2px;
  color: var(--on-forest);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: border-color 0.35s var(--ease-soft), background 0.35s;
  outline: none;
}
.form__input::placeholder { color: var(--on-forest-soft); opacity: 0.7; }
.form__input:focus { border-color: var(--brass-light); background: rgba(201,169,104,0.06); }
.form__input.error { border-color: #C97D6A; }
.form__error { display: block; font-size: 0.78rem; color: #E0A99B; margin-top: 6px; min-height: 16px; }
.modal__form .btn { margin-top: 8px; }
.form__agreement { font-size: 0.74rem; color: var(--on-forest-soft); text-align: center; margin-top: 16px; line-height: 1.5; }

.modal__state { text-align: center; padding: 16px 0; }
.modal__state-icon { margin: 0 auto 18px; width: 56px; height: 56px; color: var(--brass-light); }
.modal__state-icon--err { color: #E0A99B; }
.modal__state-text { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--on-forest); }

/* =====================================================
   Reveal animations (JS-driven; content visible if no JS)
   ===================================================== */
html.anim .reveal { opacity: 0; }
/* Fallback when GSAP fails to load: CSS-driven reveal via IntersectionObserver */
html.no-gsap .reveal { transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
html.no-gsap .reveal.is-in { opacity: 1; transform: none; }

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 1024px) {
  /* Mobile/tablet hero order: H1 -> image -> subtext -> stats -> buttons */
  .hero__inner { display: flex; flex-direction: column; gap: 26px; }
  .hero__content, .hero__visual { display: contents; }
  .hero__title { order: 1; margin-bottom: 0; }
  .frame { order: 2; width: 100%; max-width: 400px; margin: 0 auto; }
  .hero__text { order: 3; margin-bottom: 0; max-width: 100%; }
  .hero__actions { order: 4; }
  .hero__caption { order: 5; margin-top: 0; }
  .steps__grid { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
  .steps__rail { display: none; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    inset: 0;
    z-index: 1200;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    padding: 88px 32px 40px;
    background: linear-gradient(170deg, var(--forest) 0%, var(--forest-deep) 100%);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.55s var(--ease), visibility 0.55s var(--ease);
  }
  .nav.open { transform: translateX(0); visibility: visible; }
  .nav__link { font-size: 1.4rem; color: var(--on-forest); }
  .header.scrolled .nav__link { color: var(--on-forest); }
  .header__cta { display: none; }
  .burger { display: flex; }
  /* Hide the hamburger while the menu is open — the overlay's own × closes it */
  body.nav-open .burger { opacity: 0; visibility: hidden; pointer-events: none; }
  .nav__close {
    display: flex;
    position: absolute;
    top: 18px; right: 20px;
    width: 46px; height: 46px;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    line-height: 1;
    color: var(--brass-light);
    transition: transform 0.4s var(--ease);
  }
  .nav__close:hover { transform: rotate(90deg); }
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature--reverse .feature__media { order: 0; }
  .feature__body { max-width: 100%; }
  .steps__grid { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .reviews__arrows { display: none; }
}

@media (max-width: 540px) {
  body { font-size: 1rem; }
  .hero { padding: 116px 0 80px; min-height: auto; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--border); }
  .steps__grid { grid-template-columns: 1fr; row-gap: 32px; }
  .step { display: flex; flex-direction: row; gap: 20px; align-items: flex-start; }
  .step__num { margin-bottom: 0; width: 54px; height: 54px; font-size: 1.4rem; flex-shrink: 0; }
  .footer__inner { grid-template-columns: 1fr; }
  .horizon::before, .horizon::after { width: 22vw; }
}

/* Phones: H1 in 2 lines — let the dash flow inline instead of forcing a break */
@media (max-width: 640px) {
  .hero__title { font-size: clamp(1.2rem, 5.2vw, 1.8rem); text-wrap: balance; }
  .hero__title .line { display: inline; }

  /* Hero buttons side by side on phones: primary prominent, "Как мы работаем" smaller */
  .hero__actions { flex-wrap: nowrap; gap: 10px; }
  .hero__actions .btn { white-space: nowrap; font-size: 0.84rem; padding: 1rem 1.1rem; }
  .hero__actions .btn--accent { flex: 1; }
  .hero__actions .btn--ghost { flex: 0 1 auto; font-size: 0.78rem; padding: 1rem 0.85rem; }

  /* "Как проходит работа" -> horizontal swipe slider on phones */
  .steps__grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    /* top padding so the number circle isn't clipped at the top during the reveal rise
       (overflow-x:auto forces overflow-y to clip) */
    padding: 16px 0 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .steps__grid::-webkit-scrollbar { display: none; }
  .step {
    flex: 0 0 84%;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    scroll-snap-align: start;
  }
  .step__num { width: 58px; height: 58px; font-size: 1.5rem; }
}

/* =====================================================
   Reduced motion
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.anim .reveal { opacity: 1 !important; }
}
