:root {
  --fm-color-canvas-milk: #F7F4EF;
  --fm-color-surface-ivory: #FFFCF7;
  --fm-color-surface-warm-sand: #F0E9D3;
  --fm-color-border-warm-beige: #D8C7B3;
  --fm-color-text-graphite: #4A433F;
  --fm-color-text-muted: #6F655E;
  --fm-color-brand-logo-copper: #B8774E;
  --fm-color-state-selected-bg: #EEF0E9;
  --fm-color-state-info: #526F80;
  --fm-color-state-info-bg: #F2F6F7;
  --fm-color-action-primary: #B84D3A;
  --fm-color-action-primary-hover: #A94332;
  --fm-color-accent-on-canvas: #B84D3A;
  --fm-color-action-secondary: #66735B;
  --fm-color-action-secondary-hover: #5B6651;
  --fm-color-accent-secondary-on-canvas: #66735B;
  --fm-color-surface-sage-band: #556049;
  --fm-color-state-selected: #66735B;
  --fm-color-state-success: #66735B;
  --fm-color-state-destructive: #8A2D2D;
  --fm-color-state-destructive-bg: #F8ECEA;
  --fm-color-focus-ring: #66735B;
  --fm-color-on-action: #FFFFFF;
  --fm-font-display: Georgia, 'Iowan Old Style', 'PT Serif', 'Times New Roman', serif;
  --fm-font-ui: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fm-type-display-lg-size: 42px;
  --fm-type-display-lg-line: 48px;
  --fm-type-display-lg-weight: 500;
  --fm-type-display-md-size: 34px;
  --fm-type-display-md-line: 40px;
  --fm-type-display-md-weight: 500;
  --fm-type-display-sm-size: 28px;
  --fm-type-display-sm-line: 34px;
  --fm-type-display-sm-weight: 500;
  --fm-type-title-lg-size: 24px;
  --fm-type-title-lg-line: 32px;
  --fm-type-title-lg-weight: 600;
  --fm-type-title-md-size: 20px;
  --fm-type-title-md-line: 28px;
  --fm-type-title-md-weight: 600;
  --fm-type-body-lg-size: 18px;
  --fm-type-body-lg-line: 28px;
  --fm-type-body-lg-weight: 400;
  --fm-type-body-md-size: 16px;
  --fm-type-body-md-line: 24px;
  --fm-type-body-md-weight: 400;
  --fm-type-body-sm-size: 14px;
  --fm-type-body-sm-line: 20px;
  --fm-type-body-sm-weight: 400;
  --fm-type-label-md-size: 14px;
  --fm-type-label-md-line: 20px;
  --fm-type-label-md-weight: 600;
  --fm-type-caption-size: 12px;
  --fm-type-caption-line: 16px;
  --fm-type-caption-weight: 500;
  --fm-space-4: 4px;
  --fm-space-8: 8px;
  --fm-space-12: 12px;
  --fm-space-16: 16px;
  --fm-space-20: 20px;
  --fm-space-24: 24px;
  --fm-space-32: 32px;
  --fm-space-40: 40px;
  --fm-space-48: 48px;
  --fm-space-64: 64px;
  --fm-radius-sm: 12px;
  --fm-radius-md: 20px;
  --fm-radius-lg: 24px;
  --fm-radius-xl: 28px;
  --fm-radius-pill: 999px;
  --fm-shadow-card: 0 8px 24px rgba(74, 67, 63, 0.08);
  --fm-shadow-sheet: 0 16px 40px rgba(74, 67, 63, 0.12);
  --fm-shadow-control: 0 2px 8px rgba(74, 67, 63, 0.06);
  --fm-control-touch-min: 44px;
  --fm-control-button-compact: 48px;
  --fm-control-button-default: 52px;
  --fm-control-input-default: 52px;
  --fm-control-textarea-min: 104px;
  --fm-control-icon-button: 44px;
  --fm-control-bottom-nav-min: 72px;
  --fm-control-bottom-nav-max: 80px;
  --fm-motion-micro: 150ms;
  --fm-motion-state: 210ms;
  --fm-motion-sheet: 280ms;
  --fm-motion-easing: cubic-bezier(0.2, 0, 0, 1);
  --fm-layout-mobile-max: 480px;
  --fm-layout-product-max: 1180px;
  --fm-layout-presentation-max: 1200px;
}

*:focus-visible {
  outline: 3px solid #66735B;
  outline-offset: 2px;
  border-radius: 4px;
}

.fm-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 16px;
  background: #FFFCF7;
  color: #4A433F;
  border: 2px solid #66735B;
  border-radius: 8px;
}
.fm-skip-link:focus {
  left: 8px;
  top: 8px;
}

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

button, a[role='button'], .fm-tap {
  min-height: 44px;
  min-width: 44px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
    transform: none !important;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fm-color-canvas-milk);
  color: var(--fm-color-text-graphite);
  font-family: var(--fm-font-ui);
  font-size: var(--fm-type-body-md-size);
  line-height: var(--fm-type-body-md-line);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--fm-color-action-primary); }

.wrap { width: 100%; max-width: var(--fm-layout-presentation-max); margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--fm-color-surface-ivory) 92%, transparent);
  border-bottom: 1px solid var(--fm-color-border-warm-beige);
}
.site-header__inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
/* The mark carries its own shape; the box that used to frame a glyph is gone. */
.brand__mark { display: inline-flex; color: var(--fm-color-brand-logo-copper); }
.brand__mark svg { display: block; }
.brand__word { font-family: var(--fm-font-display); font-size: 22px; font-weight: 500; letter-spacing: 0.01em; }
.site-nav { display: none; gap: 20px; margin-left: auto; }
.site-nav a { color: var(--fm-color-text-graphite); text-decoration: none; font-size: 15px; }
.site-nav a:hover { color: var(--fm-color-action-primary); }
@media (min-width: 900px) { .site-nav { display: flex; } }
.header-status {
  margin-left: auto; font-size: var(--fm-type-caption-size); font-weight: 600;
  color: var(--fm-color-action-secondary); border: 1px solid var(--fm-color-action-secondary);
  background: var(--fm-color-state-selected-bg);
  border-radius: 999px; padding: 6px 12px; white-space: nowrap;
}
@media (min-width: 900px) { .header-status { margin-left: 20px; } }
.menu-toggle {
  margin-left: auto; min-height: 44px; min-width: 44px; border-radius: 12px;
  border: 1px solid var(--fm-color-border-warm-beige); background: var(--fm-color-surface-ivory);
  color: inherit; font: inherit; cursor: pointer;
}
@media (min-width: 900px) { .menu-toggle { display: none; } }
#mobile-menu { display: none; padding: 12px 0 20px; border-top: 1px solid var(--fm-color-border-warm-beige); }
#mobile-menu.is-open { display: block; }
#mobile-menu a { display: block; padding: 12px 0; color: var(--fm-color-text-graphite); text-decoration: none; min-height: 44px; }

/* -------------------------------------------------------------------- hero */
.hero { padding: 40px 0 24px; }
.hero__grid { display: grid; gap: 28px; }
.hero__eyebrow {
  display: inline-block; font-size: var(--fm-type-caption-size); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fm-color-action-secondary);
  margin-bottom: 12px;
}
.hero__title {
  font-family: var(--fm-font-display); font-weight: 500; margin: 0 0 16px;
  font-size: clamp(30px, 6vw, 52px); line-height: 1.12;
}
.hero__subtitle { font-size: var(--fm-type-body-lg-size); line-height: var(--fm-type-body-lg-line); margin: 0 0 16px; max-width: 46ch; }
.hero__trust { color: var(--fm-color-text-muted); margin: 0 0 24px; }
.hero__status {
  border: 1px solid var(--fm-color-border-warm-beige); background: var(--fm-color-surface-warm-sand);
  border-radius: var(--fm-radius-md); padding: 16px 20px; margin-bottom: 20px;
}
.hero__status strong { display: block; font-size: var(--fm-type-title-md-size); margin-bottom: 4px; }
.hero__media { position: relative; }
.hero__photo { border-radius: var(--fm-radius-xl); border: 1px solid var(--fm-color-border-warm-beige); overflow: hidden; box-shadow: var(--fm-shadow-card); }
.hero__ai {
  margin-top: 16px; font-size: var(--fm-type-body-sm-size); color: var(--fm-color-text-muted);
  border-left: 3px solid var(--fm-color-action-secondary); padding-left: 12px;
}
@media (min-width: 1024px) {
  .hero { padding: 64px 0 40px; }
  .hero__grid { grid-template-columns: 55fr 45fr; align-items: center; gap: 48px; }
}

/* ---------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--fm-control-button-default); padding: 0 24px;
  border-radius: var(--fm-radius-sm); border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn--primary { background: var(--fm-color-action-primary); color: var(--fm-color-on-action); }
.btn--primary:hover { background: var(--fm-color-action-primary-hover); }
.btn--secondary { background: transparent; color: var(--fm-color-action-secondary); border-color: var(--fm-color-action-secondary); }
.btn--disabled { background: var(--fm-color-surface-warm-sand); color: var(--fm-color-text-muted); border-color: var(--fm-color-border-warm-beige); cursor: not-allowed; }
/* On the sage band a bordered button needs white on sage, not sage on sage. */
.btn--on-sage { background: var(--fm-color-surface-ivory); color: var(--fm-color-action-secondary); border-color: var(--fm-color-surface-ivory); }
.btn--on-sage:hover { background: var(--fm-color-canvas-milk); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------------------- sections

   Bands, not boxes.

   Every section declares which surface it sits on and carries an organic curve
   at its leading edge, so the colour changes along a slow line instead of a
   hard rule. That single device is most of why the reference boards read as
   calm rather than as a stack of rectangles.

   The curve is drawn in the colour of the section it *introduces* and is placed
   at that section's top, overlapping the previous band. Nothing is layered over
   the seam, so no text can ever be clipped by it.
   ---------------------------------------------------------------- */
section { padding: 40px 0; position: relative; }
@media (min-width: 1024px) { section { padding: 64px 0; } }

.band { position: relative; }
.band--milk { background: var(--fm-color-canvas-milk); }
.band--ivory { background: var(--fm-color-surface-ivory); }
.band--sand { background: var(--fm-color-surface-warm-sand); }
.band--sage { background: var(--fm-color-surface-sage-band); color: var(--fm-color-on-action); }

/* Inside the sage band the palette inverts, and every level is set explicitly
   rather than inherited. The tint below is not a guess: white at 82% on this
   band measures 5.10:1, and the same tint on the lighter actionSecondary
   would have been 3.63:1 - which is why the band has a token of its own. */
.band--sage .section-title,
.band--sage .section-lead,
.band--sage p,
.band--sage li,
.band--sage h3 { color: var(--fm-color-on-action); }
.band--sage .eyebrow { color: rgba(255, 255, 255, 0.82); }
.band--sage .ornament { color: rgba(255, 255, 255, 0.5); opacity: 1; }

.divider { position: absolute; left: 0; right: 0; top: -1px; line-height: 0; pointer-events: none; }
.divider--bottom { top: auto; bottom: -1px; }
.divider__shape { display: block; width: 100%; height: 48px; }
@media (min-width: 768px) { .divider__shape { height: 88px; } }
/* The band's own padding has to clear its curve, or the first line of text
   sits inside the wave.

   :first-child cannot be used here - the divider is itself the band's first
   child, so the selector never matched and the padding silently did nothing.
   :first-of-type addresses the first section regardless of what precedes it. */
.band > section:first-of-type { padding-top: 72px; }
@media (min-width: 768px) { .band > section:first-of-type { padding-top: 116px; } }

.section-title { font-family: var(--fm-font-display); font-weight: 500; font-size: clamp(26px, 4vw, 38px); line-height: 1.2; margin: 0 0 16px; }
/* The reference sets one or two words of every headline in italic. It is the
   cheapest possible device and it does more for the page than any other. */
.section-title em, .hero__title em { font-style: italic; font-weight: 400; }
.section-lead { font-size: var(--fm-type-body-lg-size); line-height: var(--fm-type-body-lg-line); max-width: 60ch; margin: 0 0 24px; }
.eyebrow { font-size: var(--fm-type-caption-size); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fm-color-accent-secondary-on-canvas); margin: 0 0 8px; }

/* A centred section head: eyebrow, title, lead — the reference's default. */
.section-head { text-align: center; max-width: 62ch; margin: 0 auto 36px; }
.section-head .section-lead { margin-left: auto; margin-right: auto; }

/* ------------------------------------------------------------- ornaments */
.ornament { color: var(--fm-color-action-secondary); opacity: 0.55; }
.ornament svg { width: 100%; height: 100%; display: block; }
.ornament--corner { position: absolute; width: 96px; height: 96px; pointer-events: none; }
.ornament--tr { top: 24px; right: 16px; }
.ornament--bl { bottom: 24px; left: 16px; }
.ornament--rule { width: 148px; height: 44px; margin: 0 auto 12px; }

/* An icon inside a filled circle, above a card title. */
.icon-well {
  width: 56px; height: 56px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--fm-color-action-secondary); color: var(--fm-color-on-action);
  margin-bottom: 14px;
}
.icon-well svg { width: 28px; height: 28px; }
.band--sage .icon-well { background: none; border: 1px solid rgba(255, 255, 255, 0.35); }

/* ------------------------------------------------------------ card grids */
.card-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid--4 { grid-template-columns: repeat(4, 1fr); } }
.soft-card {
  background: var(--fm-color-surface-ivory);
  border: 1px solid var(--fm-color-border-warm-beige);
  border-radius: var(--fm-radius-xl);
  padding: 24px;
  box-shadow: var(--fm-shadow-card);
}
.soft-card h3 { font-family: var(--fm-font-display); font-weight: 500; font-size: 20px; margin: 0 0 8px; }
.soft-card p { margin: 0; color: var(--fm-color-text-muted); font-size: var(--fm-type-body-sm-size); line-height: var(--fm-type-body-sm-line); }
/*
   On the band a card has no fill at all — columns divided by a hairline, the
   way the reference does it.

   The first attempt lightened the band by 10% white behind each card, and that
   is what forced this note: lifting the background lifts it *towards* the text,
   and pure white on the lightened surface measured 3.86:1. A card that has to
   dim its own background to look like a card is not worth the contrast it costs.
*/
.band--sage .soft-card {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 8px 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}
.band--sage .card-grid > .soft-card:first-child { border-left: 0; }
@media (max-width: 599px) {
  .band--sage .soft-card { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.22); padding: 20px 0 0; }
  .band--sage .card-grid > .soft-card:first-child { border-top: 0; padding-top: 0; }
}
.band--sage .soft-card p { color: rgba(255, 255, 255, 0.82); }

.chapter { display: grid; gap: 24px; padding: 32px 0; border-top: 1px solid var(--fm-color-border-warm-beige); }
.chapter:first-of-type { border-top: 0; }
@media (min-width: 900px) {
  .chapter { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
  .chapter--reverse > .chapter__visual { order: -1; }
}
.chapter__visual {
  margin: 0;
  border-radius: var(--fm-radius-xl);
  border: 1px solid var(--fm-color-border-warm-beige);
  background: var(--fm-color-surface-warm-sand);
  overflow: hidden;
  box-shadow: var(--fm-shadow-card);
}
.chapter__visual img { width: 100%; height: auto; display: block; }
.chapter__visual figcaption {
  padding: 10px 16px;
  font-size: var(--fm-type-caption-size);
  color: var(--fm-color-text-muted);
  border-top: 1px solid var(--fm-color-border-warm-beige);
  background: var(--fm-color-surface-ivory);
}
.facts { list-style: none; padding: 0; margin: 16px 0 0; }
.facts li { padding: 10px 0; border-bottom: 1px solid var(--fm-color-border-warm-beige); display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.facts li:last-child { border-bottom: 0; }

.status-chip {
  display: inline-flex; align-items: center; font-size: var(--fm-type-caption-size); font-weight: 600;
  border-radius: 999px; padding: 4px 10px;
  background: var(--fm-color-state-info-bg); color: var(--fm-color-state-info);
  border: 1px solid var(--fm-color-state-info);
}
.status-chip--concept { background: var(--fm-color-surface-warm-sand); color: var(--fm-color-text-graphite); border-color: var(--fm-color-border-warm-beige); }

.card {
  background: var(--fm-color-surface-ivory); border: 1px solid var(--fm-color-border-warm-beige);
  border-radius: var(--fm-radius-lg); padding: 24px; box-shadow: var(--fm-shadow-card);
}
.card-grid { display: grid; gap: 20px; }
@media (min-width: 768px) { .card-grid--3 { grid-template-columns: repeat(3, 1fr); } .card-grid--2 { grid-template-columns: repeat(2, 1fr); } }

.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
@media (min-width: 768px) { .principles { grid-template-columns: repeat(2, 1fr); } }
.principles li { padding: 20px; border-radius: var(--fm-radius-md); background: var(--fm-color-state-selected-bg); border: 1px solid var(--fm-color-action-secondary); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps li { position: relative; padding-left: 44px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 999px;
  background: var(--fm-color-action-primary); color: var(--fm-color-on-action);
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}

details { border-bottom: 1px solid var(--fm-color-border-warm-beige); padding: 4px 0; }
summary { cursor: pointer; padding: 16px 0; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
details p { margin: 0 0 16px; max-width: 70ch; }

.prose { max-width: 72ch; }
.prose h2 { font-size: var(--fm-type-title-lg-size); line-height: var(--fm-type-title-lg-line); margin: 32px 0 8px; }
.prose p { margin: 0 0 16px; }

.notice {
  border: 1px solid var(--fm-color-border-warm-beige); background: var(--fm-color-surface-warm-sand);
  border-radius: var(--fm-radius-md); padding: 16px 20px; margin: 0 0 24px;
}
.notice--info { background: var(--fm-color-state-info-bg); border-color: var(--fm-color-state-info); }
.notice--warn { background: var(--fm-color-state-destructive-bg); border-color: var(--fm-color-state-destructive); }

/* ------------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--fm-color-border-warm-beige); background: var(--fm-color-surface-ivory); padding: 40px 0; margin-top: 40px; }
.site-footer__grid { display: grid; gap: 24px; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
.site-footer a { color: var(--fm-color-text-graphite); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; }

/* --------------------------------------------------------------- sticky cta */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: color-mix(in srgb, var(--fm-color-surface-ivory) 96%, transparent);
  border-top: 1px solid var(--fm-color-border-warm-beige);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  display: none; align-items: center; gap: 12px; max-height: 15vh;
}
.sticky-cta.is-visible { display: flex; }
.sticky-cta p { margin: 0; font-size: var(--fm-type-body-sm-size); }
@media (min-width: 900px) { .sticky-cta { display: none !important; } }

/* ------------------------------------------------------------------ invite */
.invite-shell { max-width: 640px; margin: 0 auto; padding: 48px 0; }
.invite-card { text-align: center; }
.invite-card h1 { font-family: var(--fm-font-display); font-weight: 500; font-size: clamp(26px, 5vw, 36px); margin: 0 0 12px; }
.invite-meta { color: var(--fm-color-text-muted); font-size: var(--fm-type-body-sm-size); margin: 16px 0 0; }
