/* Falmera palette: the cinematic mountain colour system (docs/design-atmosphere.md).
 * Colour only. Opt-in with <body class="fm-atmos">, loaded after every other stylesheet. It redefines
 * the brand tokens of css/falmera.css, so components keep their structure and simply take the new
 * colours, then sets each homepage section's atmosphere. Contrast pairs are listed in the doc (AA).
 *
 * Rhythm on the homepage: the artwork, then warm blush, quiet porcelain, cool snow mist, a Mountain
 * Slate night for the partners, dusty rose for the process, a plum dusk for the receptionist, porcelain
 * and mist again, a sunset band for the consultation and a deep slate close for the footer. */

.fm-atmos {
  /* ── The mountain palette, as sampled from the artwork ─────────────── */
  --at-coral: #F69477;          /* the sun on the clouds */
  --at-peach: #F6B7AD;          /* the lit sky */
  --at-rose: #C07D9E;           /* the far ridges */
  --at-lavender: #905B7C;       /* the shaded slopes */
  --at-violet: #7652C1;         /* the lettering */
  --at-slate: #564175;          /* the mountain in shadow */
  /* Derived from the same picture */
  --at-blush: #F6D3C8;          /* peach thinned by mist */
  --at-rose-mist: #EBCCD6;      /* rose thinned by mist */
  --at-porcelain: #F7EFEA;      /* sunlit snow: the warm neutral */
  --at-snow-mist: #EFE8EE;      /* snow in shade: the cool neutral */
  --at-shell: #FCF6F2;          /* raised surface on the neutrals */
  --at-slate-deep: #2C2539;     /* the mountain at night */
  --at-slate-raised: #3B3150;
  --at-plum: #3A2236;           /* the valley at dusk */
  --at-plum-raised: #4A2E45;
  --at-night: #211C29;          /* the closing tone */
  --at-ink: #2A2238;            /* deep slate type on light */
  --at-ink-muted: #574B63;      /* body copy on light, blush and rose (AA) */
  --at-label: #6E3D5D;          /* deep lavender labels on light (AA, also on peach) */
  --at-snow: #FBF1EC;           /* warm off-white type on dark */
  --at-snow-muted: #E3D3DA;     /* secondary type on dark (AA) */
  --at-ember: #F6B7AD;          /* labels on dark */
  /* Interaction: violet first, blue-violet beside it; electric blue only in the focus ring and links. */
  --at-action: #3D5CF0;
  --at-action-2: #7652C1;
  --at-action-3: #8A4FB0;
  --at-action-ink: #5B3DA8;     /* links and small interactive text on light (AA) */
  --at-ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* ── Semantic tokens ─────────────────────────────────────────────── */
  --at-page: var(--at-porcelain);
  --at-section-warm: linear-gradient(180deg, var(--at-blush), var(--at-porcelain));
  --at-section-rose: linear-gradient(180deg, var(--at-rose-mist) 0%, #F0D1D3 55%, var(--at-blush) 100%);
  --at-section-slate: radial-gradient(70% 55% at 50% 100%, rgb(246 148 119 / 0.2), transparent 70%),
                      linear-gradient(180deg, var(--at-slate-deep), #322A42 70%, #3A2F4A);
  --at-section-plum: radial-gradient(70% 90% at 92% 8%, rgb(246 148 119 / 0.2), transparent 60%),
                     radial-gradient(60% 80% at 0% 100%, rgb(192 125 158 / 0.2), transparent 60%),
                     var(--at-plum);
  --at-section-sunset: radial-gradient(80% 120% at 100% 0%, rgb(192 125 158 / 0.38), transparent 62%),
                       radial-gradient(70% 110% at 0% 100%, rgb(246 148 119 / 0.32), transparent 62%),
                       linear-gradient(120deg, var(--at-blush) 0%, var(--at-peach) 60%, #E9AFBF 100%);
  --at-section-close: radial-gradient(60% 80% at 15% 0%, rgb(144 91 124 / 0.28), transparent 65%),
                      linear-gradient(180deg, var(--at-slate-deep), var(--at-night));
  --at-border: rgb(42 34 56 / 0.1);
  --at-border-strong: rgb(42 34 56 / 0.2);
  --at-border-dark: rgb(251 241 236 / 0.14);
  --at-shadow: 0 30px 60px -40px rgb(46 36 66 / 0.4);
  --at-glow-action: 0 12px 30px -14px rgb(118 82 193 / 0.75);

  /* ── The existing system tokens, remapped ────────────────────────── */
  --fm-navy: var(--at-ink);               --fm-navy-rgb: 42 34 56;
  --fm-cream: var(--at-snow);             --fm-cream-rgb: 251 241 236;
  --fm-sand: var(--at-peach);             --fm-sand-rgb: 246 183 173;
  --fm-blue: var(--at-action);            --fm-blue-rgb: 61 92 240;
  --fm-violet: var(--at-action-2);        --fm-violet-rgb: 118 82 193;
  --fm-magenta: #B35A94;                  --fm-magenta-rgb: 179 90 148;
  --fm-red: #E8705F;                      --fm-red-rgb: 232 112 95;
  --fm-cream-soft: var(--at-shell);
  --fm-sand-soft: var(--at-blush);
  --fm-navy-raised: var(--at-slate-raised);
  --fm-ink-muted: var(--at-ink-muted);
  --fm-ink-subtle: var(--at-ink-muted);
  --fm-cream-muted: var(--at-snow-muted);
  --fm-blue-ink: var(--at-action-ink);
  --fm-gradient: linear-gradient(90deg, var(--at-action) 0%, var(--at-action-2) 50%, #B35A94 100%);
  --fm-gradient-cta: linear-gradient(90deg, var(--at-action) 0%, var(--at-action-2) 50%, var(--at-action-3) 100%);
  --fm-gradient-text: linear-gradient(90deg, #4A3AB4 0%, var(--at-action-ink) 40%, #7E3A84 75%, #94405F 100%);
  --fm-gradient-text-on-dark: linear-gradient(90deg, #BFC6FF 0%, #D8BBFF 45%, #F2B6CF 75%, var(--at-peach) 100%);
  --fm-bg: var(--at-page);
  --fm-surface: var(--at-shell);
  --fm-surface-alt: var(--at-blush);
  --fm-text: var(--at-ink);
  --fm-text-muted: var(--at-ink-muted);
  --fm-text-subtle: var(--at-ink-muted);
  --fm-border: var(--at-border);
  --fm-border-strong: var(--at-border-strong);
  --fm-focus: var(--at-action-ink);

  background: var(--at-page);
  color: var(--at-ink);
}
.fm-atmos ::selection { background: rgb(118 82 193 / 0.22); }
.fm-atmos :is(.fm-rail__label, .fm-eyebrow, .fm-eyebrow--accent) { color: var(--at-label); }
.fm-atmos .fm-link-cta { color: var(--at-ink); }
.fm-atmos .fm-link-cta:hover { color: var(--at-action-ink); }

/* Surfaces used across pages */
.fm-atmos .fm-surface-navy {
  --fm-bg: var(--at-slate-deep); --fm-surface: var(--at-slate-raised);
  --fm-text: var(--at-snow); --fm-text-muted: var(--at-snow-muted); --fm-text-subtle: var(--at-snow-muted);
  --fm-border: var(--at-border-dark); --fm-border-strong: rgb(251 241 236 / 0.3); --fm-focus: var(--at-snow);
  background: var(--at-section-slate);
}
.fm-atmos .fm-surface-navy :is(.fm-rail__label, .fm-eyebrow, .fm-eyebrow--accent) { color: var(--at-ember); }
.fm-atmos .fm-surface-navy .fm-ticks svg { color: var(--at-ember); }
.fm-atmos .fm-surface-navy .fm-btn--secondary:hover { background: rgb(251 241 236 / 0.08); }
.fm-atmos .fm-surface-warm { background: var(--at-section-warm); }
/* Alternating feature bands: dusty rose thinned by mist, not full peach. */
.fm-atmos .fm-surface-sand { --fm-bg: var(--at-rose-mist); --fm-surface: var(--at-shell); background: linear-gradient(180deg, var(--at-blush), var(--at-rose-mist)); }
.fm-atmos .fm-surface-soft-sand { --fm-bg: var(--at-porcelain); background: var(--at-porcelain); }
.fm-atmos .fm-surface-fade { background: linear-gradient(180deg, var(--at-porcelain), var(--at-blush)); }

/* Buttons: one clear primary, a quiet secondary. */
.fm-atmos .fm-btn--brand { color: #fff; box-shadow: var(--at-glow-action);
  background-image: linear-gradient(90deg, var(--at-action) 0%, var(--at-action-2) 50%, var(--at-action-3) 100%); }
.fm-atmos .fm-btn--brand:is(:hover, :focus-visible) { box-shadow: 0 16px 34px -14px rgb(118 82 193 / 0.85); }
.fm-atmos .fm-btn--secondary { border-color: var(--at-border-strong); color: var(--at-ink); }
.fm-atmos .fm-btn--secondary:hover { background: rgb(42 34 56 / 0.05); border-color: rgb(42 34 56 / 0.4); }
.fm-atmos .fm-surface-navy .fm-btn--secondary { border-color: rgb(251 241 236 / 0.32); color: var(--at-snow); }

/* Cards: shell on the neutrals, a whisper of border, warm shadow. */
.fm-atmos .fm-card { border-color: rgb(42 34 56 / 0.07); }
.fm-atmos .fm-card__icon { background: var(--at-blush); color: var(--at-action-ink); }
.fm-atmos .fm-surface-navy .fm-card__icon { background: rgb(251 241 236 / 0.08); color: var(--at-snow); }

/* FAQ */
.fm-atmos .fm-faq summary:hover { color: var(--at-action-ink); }
.fm-atmos .fm-faq details[open] .fm-faq__icon { background: linear-gradient(135deg, var(--at-action), var(--at-action-2)); }

/* Footer: the closing tone, a deep slate night. No rule between its rows. */
.fm-atmos .fm-footer { background: var(--at-section-close); }
.fm-atmos .fm-footer__heading { color: var(--at-ember); }
.fm-atmos .fm-footer__top { border-bottom-color: transparent; }
.fm-atmos .fm-footer__list a:hover { color: var(--at-peach); }

/* Form cards (contact, quote): the travelling light in violet, blue-violet and rose. */
.fm-atmos .fm-energy i {
  background: conic-gradient(rgb(42 34 56 / 0.07) 0deg, rgb(42 34 56 / 0.07) 20deg,
    var(--at-action) 70deg, var(--at-action-2) 105deg, var(--at-rose) 130deg,
    rgb(42 34 56 / 0.07) 150deg, rgb(42 34 56 / 0.07) 200deg,
    var(--at-action-2) 250deg, #9B7BE0 280deg, var(--at-action) 310deg, rgb(42 34 56 / 0.07) 330deg);
}
.fm-atmos .fm-form-card::before {
  background: radial-gradient(60% 60% at 25% 30%, rgb(118 82 193 / 0.16), transparent 70%),
              radial-gradient(60% 60% at 80% 75%, rgb(246 148 119 / 0.18), transparent 70%);
}
.fm-atmos .fm-form-card .fm-btn--brand[type="submit"] {
  background-image: linear-gradient(90deg, var(--at-action) 0%, var(--at-action-2) 30%, var(--at-action-3) 55%, var(--at-action-2) 80%, var(--at-action) 100%);
}

/* Talk to Mira */
.fm-atmos .fm-mira-panel__title { color: var(--at-ink); }

/* ── Header: frosted porcelain on light, frosted slate over the dark moments ─ */
.fm-atmos .fm-header {
  --nav-ink: var(--at-ink);
  --nav-muted: rgb(42 34 56 / 0.74);
  --nav-faint: rgb(42 34 56 / 0.56);
  --nav-glass: rgb(247 239 234 / 0.74);
  --nav-panel: rgb(250 244 240 / 0.97);
  --nav-line: rgb(42 34 56 / 0.09);
  --nav-hover: rgb(42 34 56 / 0.06);
  --nav-focus: var(--at-action-ink);
}
.fm-atmos .fm-header.is-over-dark,
.fm-atmos.fm-home .fm-header.is-over-hero {
  --nav-ink: var(--at-snow);
  --nav-muted: rgb(251 241 236 / 0.84);
  --nav-faint: rgb(251 241 236 / 0.62);
  --nav-glass: rgb(46 36 66 / 0.62);
  --nav-panel: rgb(46 36 66 / 0.97);
  --nav-line: rgb(251 241 236 / 0.12);
  --nav-hover: rgb(251 241 236 / 0.08);
  --nav-focus: var(--at-peach);
}
.fm-atmos.fm-home .fm-header.is-over-hero:not(.is-scrolled, .is-menu-open, .is-mobile-open)::before {
  background: linear-gradient(180deg, rgb(46 36 66 / 0.58), rgb(46 36 66 / 0.24));
}
.fm-atmos .fm-header:is(.is-over-hero, .is-over-dark) .fm-mega__list a:hover { color: var(--at-peach); }

/* ════ Homepage sections ════════════════════════════════════════════════ */

/* Hero: the artwork leads; its valley mist turns to blush, the first colour of the page. */
.fm-atmos .hero, .fm-atmos .fm-hero__dim { background: var(--at-slate-deep); }
.fm-atmos .fm-hero__fade {
  background: linear-gradient(180deg, rgb(246 211 200 / 0), rgb(246 183 173 / 0.5) 55%, var(--at-blush));
}
.fm-atmos .fm-hero__shade {
  background: linear-gradient(180deg, rgb(46 36 66 / 0.5) 0, rgb(46 36 66 / 0) calc(var(--fm-header-h) + 4rem));
}
.fm-atmos .hero .fm-hero__copy::before {
  background: radial-gradient(closest-side, rgb(46 36 66 / 0.72), rgb(46 36 66 / 0.44) 52%, rgb(46 36 66 / 0));
}
.fm-atmos .hero { --fm-text: var(--at-snow); --fm-focus: var(--at-snow); }
.fm-atmos .hero :is(.fm-hero__title, .fm-hero__lead, .fm-hero__work-link) { color: var(--at-snow); }
.fm-atmos .hero .fm-hero__accent { color: #FFE2D6; }
.fm-atmos .hero :is(.fm-hero__title, .fm-hero__lead) { text-shadow: 0 1px 22px rgb(46 36 66 / 0.5); }
.fm-atmos .hero .fm-hero__work-link:hover { color: var(--at-peach); }
.fm-atmos .hero :is(a, button):focus-visible { outline-color: var(--at-snow); }
@media (max-aspect-ratio: 23/20) {
  .fm-atmos .fm-hero__scene { background: linear-gradient(180deg, var(--at-slate-deep) 30%, #3C2A48 70%, var(--at-slate-deep)); }
}

/* Benefits and About: warm atmosphere, the blush settling into porcelain. */
.fm-atmos .fm-hero-benefits { background: var(--at-blush); }
.fm-atmos .fm-hero-benefits .fm-benefit svg { color: var(--at-action-2); }
.fm-atmos .fm-home-about { background: var(--at-section-warm); }
.fm-atmos .fm-home-about::before {
  background: radial-gradient(40% 50% at 10% 70%, rgb(246 148 119 / 0.22), transparent 70%),
              radial-gradient(34% 44% at 90% 30%, rgb(192 125 158 / 0.18), transparent 70%);
}
.fm-atmos .fm-about-card {
  background: rgb(252 246 242 / 0.72); border-color: rgb(255 255 255 / 0.8);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.8) inset, var(--at-shadow);
}
.fm-atmos .fm-about-card:hover { box-shadow: 0 1px 0 rgb(255 255 255 / 0.8) inset, 0 40px 70px -40px rgb(118 82 193 / 0.4); }
.fm-atmos .fm-about-card__art {
  background: radial-gradient(70% 90% at 12% 0%, rgb(246 148 119 / 0.34), transparent 62%),
              radial-gradient(70% 90% at 100% 100%, rgb(192 125 158 / 0.38), transparent 62%),
              linear-gradient(160deg, var(--at-slate-raised), var(--at-slate-deep));
}
.fm-atmos .fm-home-about__num { background: linear-gradient(90deg, var(--at-label), var(--at-action-ink)); -webkit-background-clip: text; background-clip: text; }
/* The facts ribbon: a slate band, the one dark accent in a warm section. */
.fm-atmos .fm-home-about__facts {
  background: radial-gradient(60% 140% at 0% 0%, rgb(118 82 193 / 0.34), transparent 60%),
              radial-gradient(60% 140% at 100% 100%, rgb(246 148 119 / 0.26), transparent 60%), var(--at-slate-deep);
  box-shadow: 0 30px 60px -34px rgb(46 36 66 / 0.6);
}
.fm-atmos .fm-home-about__facts dt { color: var(--at-ember); }

/* Our Work: porcelain relief around the stepping-stones scene, drawn in slate and peach. */
.fm-atmos .fm-home-work { background: var(--at-porcelain); }
.fm-atmos .fm-home-path__canvas {
  --mp-bg: #2C2539; --mp-ink: #FBF1EC; --mp-accent: #C7A6F0; --mp-accent2: #F6B7AD;
  background: var(--at-slate-deep); box-shadow: 0 30px 60px -36px rgb(46 36 66 / 0.6);
}
.fm-atmos .fm-home-path__list a:focus-visible { outline-color: var(--at-action-ink); }

/* Services: the cool neutral, snow in shade, so the warm sections around it can breathe. */
.fm-atmos #services { background: var(--at-snow-mist); }
.fm-atmos .fm-service-row::after { background: linear-gradient(90deg, var(--at-action), var(--at-action-2)); }
.fm-atmos .fm-service-row.is-active .fm-service-row__num { color: var(--at-action-ink); }
.fm-atmos .fm-service-row .fm-arrow-ring { color: var(--at-ink); border-color: var(--at-border-strong); }
.fm-atmos .fm-service-row.is-active .fm-arrow-ring { background: var(--at-shell); color: var(--at-action-ink); }
.fm-atmos .fm-service-preview__fit { color: var(--at-label); }

/* Partners: Mountain Slate at night, a coral horizon under the orbit. */
.fm-atmos #partners { background: var(--at-section-slate); }
/* Homepage: the partners' night warms straight into the receptionist's plum (How it works no longer sits
   between them). One burgundy light is centred on the seam, half in each section, so neither edge cuts it. */
.fm-atmos.fm-home #partners {
  background:
    radial-gradient(1100px 420px at 50% 100%, rgb(192 125 158 / 0.18), transparent 72%),
    linear-gradient(180deg, var(--at-slate-deep) 0%, #322A42 50%, #37283F 78%, var(--at-plum) 100%);
}
.fm-atmos.fm-home #ai-receptionist {
  background:
    radial-gradient(1100px 420px at 50% 0%, rgb(192 125 158 / 0.18), transparent 72%),
    linear-gradient(180deg, var(--at-plum) 0, rgb(58 34 54 / 0) 260px),
    var(--at-section-plum);
}
.fm-atmos .fm-orbit__glow { opacity: 0.5; background: conic-gradient(from 0deg, var(--at-coral), var(--at-rose), var(--at-violet), var(--at-slate), var(--at-peach), var(--at-coral)); }
.fm-atmos .fm-orbit__track i { background: var(--at-peach); box-shadow: 0 0 12px 2px rgb(246 183 173 / 0.75); }
.fm-atmos .fm-orbit__track--outer i + i { background: var(--at-rose); box-shadow: 0 0 12px 2px rgb(192 125 158 / 0.75); }
.fm-atmos .fm-orbit__track--inner i { background: #C7A6F0; box-shadow: 0 0 12px 2px rgb(199 166 240 / 0.7); }
.fm-atmos .fm-orbit__wave { border-color: rgb(246 183 173 / 0.7); }

/* The AI receptionist: plum dusk, warmer than the partners' night. */
.fm-atmos #ai-receptionist {
  --fm-bg: var(--at-plum); --fm-surface: var(--at-plum-raised);
  background: var(--at-section-plum);
}
.fm-atmos .fm-call { background: var(--at-plum-raised); box-shadow: 0 30px 70px -30px rgb(0 0 0 / 0.5); }
.fm-atmos .fm-call__icon { background: linear-gradient(135deg, var(--at-action), var(--at-action-2)); }
.fm-atmos .fm-call__live { color: var(--at-peach); border-color: rgb(246 183 173 / 0.55); }

/* Why: porcelain again, shell cards. */
.fm-atmos #why .fm-card { background: var(--at-shell); box-shadow: var(--at-shadow); }

/* FAQ and consultation: snow mist, then a sunset band to close the page. */
.fm-atmos :is(#faq, #consultation) { background: var(--at-snow-mist); }
.fm-atmos .fm-cta-band {
  --fm-text: var(--at-ink); --fm-text-muted: var(--at-ink-muted); --fm-focus: var(--at-action-ink);
  color: var(--at-ink); background: var(--at-section-sunset);
}
.fm-atmos.fm-home .fm-cta-band::before { border-color: rgb(255 255 255 / 0.45); box-shadow: 0 0 0 45px rgb(255 255 255 / 0.1), 0 0 0 90px rgb(255 255 255 / 0.07); }
.fm-atmos .fm-cta-band .fm-home-consultation-note { color: var(--at-ink-muted); }
.fm-atmos .fm-cta-band .fm-btn--secondary { border-color: rgb(42 34 56 / 0.3); background: rgb(255 255 255 / 0.22); }
.fm-atmos .fm-cta-band .fm-energy i {
  background: conic-gradient(transparent 0deg, transparent 40deg, var(--at-action) 80deg, var(--at-action-2) 115deg, #F4F0FF 135deg, transparent 165deg,
              transparent 220deg, var(--at-action-2) 260deg, var(--at-action) 300deg, transparent 330deg);
}

/* Every consultation band is a sunset, including the ones marked as navy on the inner pages:
   their navy-context text and buttons are set back to light-surface colours here. */
.fm-atmos .fm-cta-band.fm-surface-navy {
  --fm-bg: var(--at-blush); --fm-surface: var(--at-shell);
  --fm-text: var(--at-ink); --fm-text-muted: var(--at-ink-muted); --fm-text-subtle: var(--at-ink-muted);
  --fm-border: var(--at-border); --fm-border-strong: rgb(42 34 56 / 0.3); --fm-focus: var(--at-action-ink);
  color: var(--at-ink); background: var(--at-section-sunset);
}
.fm-atmos .fm-cta-band .fm-gradient-text { background-image: var(--fm-gradient-text); }
.fm-atmos .fm-cta-band :is(.fm-rail__label, .fm-eyebrow, .fm-eyebrow--accent) { color: var(--at-label); }
.fm-atmos .fm-cta-band .fm-btn--secondary { color: var(--at-ink); border-color: rgb(42 34 56 / 0.3); background: rgb(255 255 255 / 0.22); }
.fm-atmos .fm-cta-band .fm-btn--secondary:hover { background: rgb(255 255 255 / 0.4); }
.fm-atmos .fm-cta-band .fm-btn--primary { --fm-btn-bg: var(--at-ink); --fm-btn-fg: var(--at-snow); }
.fm-atmos .fm-cta-band :is(a, button):focus-visible { outline-color: var(--at-action-ink); }
