/* =============================================================================
   FLYOSUM app.css — base reset, components, page styles, utilities.
   Consumes semantic tokens from tokens.css. (Implements W2/U0/U7.)
   ============================================================================= */
@layer base, components, utilities;

@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--fly-header-h) + 1rem); tab-size: 4; }
  body {
    min-height: 100svh; font-family: var(--fly-font-sans); font-size: var(--fly-text-base);
    line-height: var(--fly-leading-normal); color: var(--fly-text); background-color: var(--fly-bg);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  }
  img, picture, svg, video { display: block; max-width: 100%; height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { background: none; border: 0; cursor: pointer; }
  ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
  :where(p, li) { max-width: var(--fly-measure); }
  h1, h2, h3, h4, h5, h6 { font-weight: var(--fly-weight-bold); line-height: var(--fly-leading-tight); letter-spacing: var(--fly-tracking-tight); text-wrap: balance; }
  h1 { font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3rem); }
  h2 { font-size: clamp(1.875rem, 1.4rem + 1.8vw, 2.25rem); }
  h3 { font-size: var(--fly-text-xl); }
  code, kbd, pre { font-family: var(--fly-font-mono); font-size: 0.95em; }
  :focus-visible { outline: 2px solid var(--fly-focus); outline-offset: 2px; border-radius: var(--fly-radius-sm); }
  :focus:not(:focus-visible) { outline: none; }
  ::selection { background: var(--fly-indigo-600); color: #fff; }
}

@layer components {
  /* ---- skip link / container / section ---- */
  .fly-skip-link { position: fixed; top: 0; left: 0; z-index: var(--fly-z-toast); transform: translateY(-120%); margin: var(--fly-space-2); padding: var(--fly-space-2) var(--fly-space-4); background: var(--fly-surface); color: var(--fly-text); border: 1px solid var(--fly-border-strong); border-radius: var(--fly-radius-md); box-shadow: var(--fly-shadow-md); font-weight: 600; transition: transform var(--fly-dur-base) var(--fly-ease); }
  .fly-skip-link:focus-visible { transform: translateY(0); }

  .fly-container { width: 100%; max-width: var(--fly-container); margin-inline: auto; padding-inline: var(--fly-gutter); }
  .fly-container--wide { max-width: var(--fly-container-wide); }
  .fly-container--narrow { max-width: var(--fly-container-narrow); }

  .fly-section { padding-block: var(--fly-section-y); }
  .fly-section--compact { padding-block: var(--fly-space-12); }
  .fly-section--subtle { background: var(--fly-bg-subtle); }
  .fly-section--dark { position: relative; isolation: isolate; overflow: hidden; background: var(--fly-neutral-950); color: var(--fly-neutral-50);
    --fly-bg: var(--fly-neutral-950); --fly-surface: var(--fly-neutral-900); --fly-surface-2: var(--fly-neutral-800);
    --fly-border: var(--fly-neutral-800); --fly-border-strong: var(--fly-neutral-700); --fly-text: var(--fly-neutral-50);
    --fly-text-muted: var(--fly-neutral-300); --fly-text-subtle: var(--fly-neutral-400); --fly-primary: var(--fly-indigo-400); --fly-accent: var(--fly-azure-400); }
  .fly-section--dark::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(60% 80% at 15% 0%, var(--fly-glow-indigo), transparent 60%), radial-gradient(50% 70% at 100% 100%, var(--fly-glow-azure), transparent 60%); }

  .fly-eyebrow { display: inline-block; font-family: var(--fly-font-mono); font-size: var(--fly-text-sm); font-weight: 500; letter-spacing: var(--fly-tracking-wide); text-transform: uppercase; color: var(--fly-accent); }

  /* ---- buttons ---- */
  .fly-btn { --_bg: transparent; --_fg: var(--fly-text); --_bd: transparent; display: inline-flex; align-items: center; justify-content: center; gap: var(--fly-space-2); font-weight: 600; line-height: 1; white-space: nowrap; border: 1px solid var(--_bd); border-radius: var(--fly-radius-md); background: var(--_bg); color: var(--_fg); cursor: pointer; transition: background-color var(--fly-dur-base) var(--fly-ease), border-color var(--fly-dur-base) var(--fly-ease), color var(--fly-dur-base) var(--fly-ease), transform var(--fly-dur-fast) var(--fly-ease), box-shadow var(--fly-dur-base) var(--fly-ease); }
  .fly-btn:active { transform: translateY(1px); }
  .fly-btn--sm { font-size: var(--fly-text-sm); padding: var(--fly-space-2) var(--fly-space-3); }
  .fly-btn--md { font-size: var(--fly-text-sm); padding: var(--fly-space-3) var(--fly-space-5); }
  .fly-btn--lg { font-size: var(--fly-text-base); padding: var(--fly-space-4) var(--fly-space-6); }
  .fly-btn--primary { --_bg: var(--fly-accent); --_fg: var(--fly-on-accent); --_bd: var(--fly-accent); }
  .fly-btn--primary:hover { --_bg: var(--fly-accent-hover); --_bd: var(--fly-accent-hover); box-shadow: var(--fly-shadow-sm); }
  .fly-btn--secondary { --_bg: var(--fly-primary); --_fg: var(--fly-on-primary); --_bd: var(--fly-primary); }
  .fly-btn--secondary:hover { --_bg: var(--fly-primary-hover); --_bd: var(--fly-primary-hover); box-shadow: var(--fly-shadow-sm); }
  .fly-btn--outline { --_fg: var(--fly-text); --_bd: var(--fly-border-strong); }
  .fly-btn--outline:hover { --_bd: var(--fly-primary); --_fg: var(--fly-primary); }
  .fly-btn--ghost { --_fg: var(--fly-text-muted); }
  .fly-btn--ghost:hover { --_fg: var(--fly-text); --_bg: var(--fly-surface-2); }
  .fly-btn__icon { transition: transform var(--fly-dur-base) var(--fly-ease); }
  .fly-btn:hover .fly-btn__icon { transform: translateX(2px); }

  /* ---- header ---- */
  .fly-header { position: sticky; top: 0; z-index: var(--fly-z-header); background: var(--fly-surface); border-bottom: 1px solid var(--fly-border); transition: box-shadow var(--fly-dur-base) var(--fly-ease); }
  .fly-header.is-scrolled { box-shadow: var(--fly-shadow-sm); }
  .fly-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--fly-space-6); min-height: var(--fly-header-h); }
  .fly-header__brand { display: inline-flex; align-items: center; gap: var(--fly-space-2); flex: none; }
  .fly-header__wordmark { font-size: var(--fly-text-lg); font-weight: 700; letter-spacing: var(--fly-tracking-tight); }
  .fly-header__nav { flex: 1; display: flex; justify-content: center; }
  .fly-nav { display: flex; align-items: center; gap: var(--fly-space-1); list-style: none; padding: 0; }
  .fly-nav__item { position: relative; }
  .fly-nav__link, .fly-nav__trigger { display: inline-flex; align-items: center; gap: var(--fly-space-1); padding: var(--fly-space-2) var(--fly-space-3); border-radius: var(--fly-radius-md); font-size: var(--fly-text-sm); font-weight: 500; color: var(--fly-text-muted); transition: color var(--fly-dur-fast) var(--fly-ease), background-color var(--fly-dur-fast) var(--fly-ease); }
  .fly-nav__link:hover, .fly-nav__trigger:hover { color: var(--fly-text); background: var(--fly-surface-2); }
  .fly-nav__link[aria-current='page'] { color: var(--fly-primary); }
  .fly-nav__chev { transition: transform var(--fly-dur-base) var(--fly-ease); }

  .fly-mega { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-6px); width: min(920px, calc(100vw - 2 * var(--fly-gutter))); background: var(--fly-surface); border: 1px solid var(--fly-border); border-radius: var(--fly-radius-lg); box-shadow: var(--fly-shadow-lg); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--fly-dur-base) var(--fly-ease), transform var(--fly-dur-base) var(--fly-ease), visibility var(--fly-dur-base); }
  .fly-mega--narrow { left: auto; right: 0; transform: translateY(-6px); width: max-content; min-width: 220px; }
  .fly-nav__item:hover > .fly-mega, .fly-mega[data-open] { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
  .fly-mega--narrow[data-open], .fly-nav__item:hover > .fly-mega--narrow { transform: translateY(0); }
  .fly-nav__item:hover .fly-nav__chev, .fly-nav__trigger[aria-expanded='true'] .fly-nav__chev { transform: rotate(180deg); }
  .fly-mega__grid { display: grid; grid-template-columns: repeat(3, 1fr) 0.9fr; gap: var(--fly-space-8); padding: var(--fly-space-8); }
  .fly-mega__title { font-family: var(--fly-font-mono); font-size: var(--fly-text-xs); letter-spacing: var(--fly-tracking-wide); text-transform: uppercase; color: var(--fly-text-subtle); margin-bottom: var(--fly-space-3); }
  .fly-mega__list { display: flex; flex-direction: column; gap: var(--fly-space-1); list-style: none; }
  .fly-mega__link { display: flex; flex-direction: column; gap: 2px; padding: var(--fly-space-2) var(--fly-space-3); border-radius: var(--fly-radius-md); transition: background-color var(--fly-dur-fast) var(--fly-ease); }
  .fly-mega__link:hover { background: var(--fly-surface-2); }
  .fly-mega__link-label { font-weight: 600; font-size: var(--fly-text-sm); }
  .fly-mega__link.is-featured .fly-mega__link-label { color: var(--fly-primary); }
  .fly-mega__link-desc { font-size: var(--fly-text-xs); color: var(--fly-text-subtle); }
  .fly-mega__featured { display: flex; flex-direction: column; gap: var(--fly-space-2); padding: var(--fly-space-6); border-radius: var(--fly-radius-lg); background: var(--fly-surface-2); border: 1px solid var(--fly-border); transition: border-color var(--fly-dur-base) var(--fly-ease), transform var(--fly-dur-base) var(--fly-ease); }
  .fly-mega__featured:hover { border-color: var(--fly-primary); transform: translateY(-2px); }
  .fly-mega__featured-title { font-size: var(--fly-text-lg); font-weight: 700; }
  .fly-mega__featured-desc { font-size: var(--fly-text-sm); color: var(--fly-text-muted); }
  .fly-mega__featured-cta { margin-top: var(--fly-space-2); font-size: var(--fly-text-sm); font-weight: 600; color: var(--fly-accent); }
  .fly-dropdown { list-style: none; padding: var(--fly-space-3); display: flex; flex-direction: column; gap: 2px; }
  .fly-dropdown__link { display: block; padding: var(--fly-space-2) var(--fly-space-3); border-radius: var(--fly-radius-md); font-size: var(--fly-text-sm); font-weight: 500; color: var(--fly-text-muted); }
  .fly-dropdown__link:hover { background: var(--fly-surface-2); color: var(--fly-text); }
  .fly-dropdown__link[aria-current='page'] { color: var(--fly-accent); }

  .fly-header__actions { display: flex; align-items: center; gap: var(--fly-space-2); flex: none; }
  .fly-iconbtn { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--fly-radius-md); color: var(--fly-text-muted); transition: color var(--fly-dur-fast) var(--fly-ease), background-color var(--fly-dur-fast) var(--fly-ease); }
  .fly-iconbtn:hover { color: var(--fly-text); background: var(--fly-surface-2); }
  .fly-theme-toggle__moon { display: none; }
  [data-theme='dark'] .fly-theme-toggle__sun { display: none; }
  [data-theme='dark'] .fly-theme-toggle__moon { display: block; }
  .fly-header__burger { display: none; }
  @media (max-width: 1024px) { .fly-header__nav, .fly-header__cta { display: none; } .fly-header__burger { display: inline-grid; } }
  @media (max-width: 480px) { .fly-header__wordmark { display: none; } }

  /* ---- mobile drawer ---- */
  .fly-mobile { position: fixed; inset: 0; z-index: var(--fly-z-drawer); }
  .fly-mobile[hidden] { display: none; }
  .fly-mobile__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(11,14,22,.5); opacity: 0; transition: opacity var(--fly-dur-base) var(--fly-ease); }
  .fly-mobile.is-open .fly-mobile__backdrop { opacity: 1; }
  .fly-mobile__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 88vw); display: flex; flex-direction: column; background: var(--fly-surface); border-left: 1px solid var(--fly-border); box-shadow: var(--fly-shadow-lg); transform: translateX(100%); transition: transform var(--fly-dur-slow) var(--fly-ease); overflow-y: auto; overscroll-behavior: contain; }
  .fly-mobile.is-open .fly-mobile__panel { transform: translateX(0); }
  .fly-mobile__head { display: flex; align-items: center; justify-content: space-between; padding: var(--fly-space-4) var(--fly-space-5); border-bottom: 1px solid var(--fly-border); }
  .fly-mobile__brand { font-weight: 700; font-size: var(--fly-text-lg); }
  .fly-mobile__cta { padding: var(--fly-space-4) var(--fly-space-5) 0; }
  .fly-mobile__nav { padding: var(--fly-space-4) var(--fly-space-3); flex: 1; }
  .fly-mobile__list { list-style: none; display: flex; flex-direction: column; }
  .fly-mobile__top-link, .fly-acc__summary { display: flex; align-items: center; justify-content: space-between; padding: var(--fly-space-3); border-radius: var(--fly-radius-md); font-size: var(--fly-text-md); font-weight: 600; cursor: pointer; list-style: none; }
  .fly-acc__summary::-webkit-details-marker { display: none; }
  .fly-acc__chev { transition: transform var(--fly-dur-base) var(--fly-ease); color: var(--fly-text-subtle); }
  .fly-acc[open] .fly-acc__chev { transform: rotate(180deg); }
  .fly-acc__list { list-style: none; padding: 0 0 var(--fly-space-2) var(--fly-space-4); display: flex; flex-direction: column; }
  .fly-mobile__sub-link { display: block; padding: var(--fly-space-2) var(--fly-space-3); border-radius: var(--fly-radius-md); font-size: var(--fly-text-sm); color: var(--fly-text-muted); }
  .fly-mobile__sub-link:hover { color: var(--fly-text); background: var(--fly-surface-2); }
  .fly-mobile__foot { display: flex; align-items: center; justify-content: space-between; padding: var(--fly-space-4) var(--fly-space-5); border-top: 1px solid var(--fly-border); }
  .fly-mobile__foot-link { font-size: var(--fly-text-sm); font-weight: 600; color: var(--fly-text-muted); }

  /* ---- breadcrumbs ---- */
  .fly-breadcrumbs { padding-block: var(--fly-space-4); }
  .fly-breadcrumbs__list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fly-space-1); list-style: none; font-size: var(--fly-text-sm); }
  .fly-breadcrumbs__item { display: inline-flex; align-items: center; gap: var(--fly-space-1); }
  .fly-breadcrumbs__link { color: var(--fly-text-subtle); }
  .fly-breadcrumbs__link:hover { color: var(--fly-text); text-decoration: underline; text-underline-offset: 3px; }
  .fly-breadcrumbs__sep { color: var(--fly-border-strong); }
  .fly-breadcrumbs__current { color: var(--fly-text-muted); font-weight: 500; }

  /* ---- footer ---- */
  .fly-footer { background: var(--fly-bg-subtle); border-top: 1px solid var(--fly-border); padding-block: var(--fly-space-16) var(--fly-space-8); margin-top: var(--fly-space-24); }
  .fly-footer__top { display: grid; grid-template-columns: 1.2fr 2fr; gap: var(--fly-space-16); padding-bottom: var(--fly-space-12); border-bottom: 1px solid var(--fly-border); }
  .fly-footer__brandlink { display: inline-flex; align-items: center; gap: var(--fly-space-2); }
  .fly-footer__wordmark { font-size: var(--fly-text-lg); font-weight: 700; }
  .fly-footer__tagline { margin-top: var(--fly-space-2); color: var(--fly-text-muted); font-size: var(--fly-text-sm); }
  .fly-footer__news { margin-top: var(--fly-space-6); max-width: 22rem; }
  .fly-footer__news-label { display: block; font-size: var(--fly-text-sm); font-weight: 500; margin-bottom: var(--fly-space-2); }
  .fly-footer__news-row { display: flex; gap: var(--fly-space-2); }
  .fly-footer__news-input { flex: 1; padding: var(--fly-space-2) var(--fly-space-3); background: var(--fly-surface); border: 1px solid var(--fly-border-strong); border-radius: var(--fly-radius-md); font-size: var(--fly-text-sm); }
  .fly-footer__news-btn { display: inline-grid; place-items: center; width: 2.5rem; background: var(--fly-accent); color: var(--fly-on-accent); border-radius: var(--fly-radius-md); transition: background-color var(--fly-dur-base) var(--fly-ease); }
  .fly-footer__news-btn:hover { background: var(--fly-accent-hover); }
  .fly-footer__news-note { margin-top: var(--fly-space-2); font-size: var(--fly-text-xs); color: var(--fly-text-subtle); }
  .fly-footer__cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--fly-space-6); }
  .fly-footer__col-title { font-family: var(--fly-font-mono); font-size: var(--fly-text-xs); letter-spacing: var(--fly-tracking-wide); text-transform: uppercase; color: var(--fly-text-subtle); margin-bottom: var(--fly-space-3); }
  .fly-footer__col-list { list-style: none; display: flex; flex-direction: column; gap: var(--fly-space-2); }
  .fly-footer__link { font-size: var(--fly-text-sm); color: var(--fly-text-muted); }
  .fly-footer__link:hover { color: var(--fly-text); }
  .fly-footer__link--accent { color: var(--fly-accent); font-weight: 600; }
  .fly-footer__bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--fly-space-4); padding-top: var(--fly-space-6); }
  .fly-footer__copy { font-size: var(--fly-text-sm); color: var(--fly-text-subtle); }
  .fly-footer__legal { display: flex; flex-wrap: wrap; gap: var(--fly-space-4); list-style: none; }
  .fly-footer__legal-link { font-size: var(--fly-text-sm); color: var(--fly-text-muted); }
  .fly-footer__legal-link:hover { color: var(--fly-text); }
  .fly-footer__social { display: flex; gap: var(--fly-space-1); list-style: none; }
  .fly-footer__social-link { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--fly-radius-md); color: var(--fly-text-muted); }
  .fly-footer__social-link:hover { color: var(--fly-text); background: var(--fly-surface-2); }
  @media (max-width: 1024px) { .fly-footer__top { grid-template-columns: 1fr; gap: var(--fly-space-10); } .fly-footer__cols { grid-template-columns: repeat(3, 1fr); gap: var(--fly-space-8); } }
  @media (max-width: 600px) { .fly-footer__cols { grid-template-columns: repeat(2, 1fr); } .fly-footer__bottom { flex-direction: column; align-items: flex-start; } }

  /* ---- shared content primitives ---- */
  .fly-lede { font-size: var(--fly-text-md); color: var(--fly-text-muted); max-width: 60ch; }
  .fly-section__head { max-width: 48rem; margin-bottom: var(--fly-space-10); }
  .fly-section__head h2 { margin-top: var(--fly-space-2); }
  .fly-section__head p { margin-top: var(--fly-space-3); color: var(--fly-text-muted); font-size: var(--fly-text-md); }
  .fly-grid { display: grid; gap: var(--fly-space-6); }
  .fly-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .fly-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .fly-grid--4 { grid-template-columns: repeat(4, 1fr); }
  @media (max-width: 1024px) { .fly-grid--4 { grid-template-columns: repeat(2, 1fr); } .fly-grid--3 { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 640px) { .fly-grid--2, .fly-grid--3, .fly-grid--4 { grid-template-columns: 1fr; } }

  /* ---- cards ---- */
  .fly-card { display: flex; flex-direction: column; gap: var(--fly-space-3); padding: var(--fly-space-6); background: var(--fly-surface); border: 1px solid var(--fly-border); border-radius: var(--fly-radius-lg); transition: border-color var(--fly-dur-base) var(--fly-ease), transform var(--fly-dur-base) var(--fly-ease), box-shadow var(--fly-dur-base) var(--fly-ease); }
  a.fly-card:hover { border-color: var(--fly-primary); transform: translateY(-3px); box-shadow: var(--fly-shadow-md); }
  .fly-card__eyebrow { font-family: var(--fly-font-mono); font-size: var(--fly-text-xs); letter-spacing: var(--fly-tracking-wide); text-transform: uppercase; color: var(--fly-text-subtle); }
  .fly-card__title { font-size: var(--fly-text-lg); font-weight: 700; }
  .fly-card__text { font-size: var(--fly-text-sm); color: var(--fly-text-muted); }
  .fly-card__more { margin-top: auto; font-size: var(--fly-text-sm); font-weight: 600; color: var(--fly-accent); display: inline-flex; align-items: center; gap: var(--fly-space-1); }
  .fly-card__icon { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--fly-radius-md); background: var(--fly-surface-2); color: var(--fly-primary); }

  /* ---- icard (feature/benefit/process) ---- */
  .fly-icard { display: flex; flex-direction: column; gap: var(--fly-space-2); padding: var(--fly-space-5); border: 1px solid var(--fly-border); border-radius: var(--fly-radius-lg); background: var(--fly-surface); }
  .fly-icard__icon { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--fly-radius-md); background: var(--fly-surface-2); color: var(--fly-primary); }
  .fly-icard__num { font-family: var(--fly-font-mono); font-size: var(--fly-text-sm); color: var(--fly-accent); font-weight: 600; }
  .fly-icard__title { font-size: var(--fly-text-md); font-weight: 600; }
  .fly-icard__text { font-size: var(--fly-text-sm); color: var(--fly-text-muted); }

  /* ---- hero ---- */
  .fly-hero { position: relative; padding-block: clamp(3.5rem, 2rem + 7vw, 7rem); }
  .fly-hero__inner { max-width: 52rem; }
  .fly-hero h1 { margin-top: var(--fly-space-3); }
  .fly-hero__sub { margin-top: var(--fly-space-5); font-size: var(--fly-text-lg); color: var(--fly-text-muted); max-width: 44ch; }
  .fly-hero__actions { margin-top: var(--fly-space-8); display: flex; flex-wrap: wrap; gap: var(--fly-space-3); }
  .fly-hero__proof { margin-top: var(--fly-space-10); display: flex; flex-wrap: wrap; gap: var(--fly-space-8); }
  .fly-hero__stat-value { font-family: var(--fly-font-mono); font-size: var(--fly-text-2xl); font-weight: 700; }
  .fly-hero__stat-label { font-size: var(--fly-text-xs); color: var(--fly-text-subtle); max-width: 22ch; }

  /* ---- proof / stat strip ---- */
  .fly-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--fly-space-6); }
  .fly-stat { display: flex; flex-direction: column; gap: var(--fly-space-1); }
  .fly-stat__value { font-family: var(--fly-font-mono); font-size: var(--fly-text-3xl); font-weight: 700; color: var(--fly-text); }
  .fly-stat__label { font-size: var(--fly-text-sm); color: var(--fly-text-muted); }
  @media (max-width: 768px) { .fly-stats { grid-template-columns: repeat(2, 1fr); } .fly-hero__proof { gap: var(--fly-space-6); } }

  /* ---- partner logos (text marks) ---- */
  .fly-marks { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fly-space-6) var(--fly-space-10); }
  .fly-mark { font-family: var(--fly-font-mono); font-size: var(--fly-text-sm); letter-spacing: .04em; color: var(--fly-text-subtle); }

  /* ---- problem→solution ---- */
  .fly-ps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: var(--fly-space-4); padding: var(--fly-space-5); border: 1px solid var(--fly-border); border-radius: var(--fly-radius-lg); background: var(--fly-surface); }
  .fly-ps__cell-label { font-family: var(--fly-font-mono); font-size: var(--fly-text-xs); text-transform: uppercase; letter-spacing: var(--fly-tracking-wide); color: var(--fly-text-subtle); margin-bottom: var(--fly-space-1); }
  .fly-ps__arrow { color: var(--fly-accent); }
  @media (max-width: 768px) { .fly-ps { grid-template-columns: 1fr; } .fly-ps__arrow { transform: rotate(90deg); justify-self: start; } }

  /* ---- faq ---- */
  .fly-faq { border-top: 1px solid var(--fly-border); }
  .fly-faq__item { border-bottom: 1px solid var(--fly-border); }
  .fly-faq__q { display: flex; align-items: center; justify-content: space-between; gap: var(--fly-space-4); padding: var(--fly-space-5) 0; font-size: var(--fly-text-md); font-weight: 600; cursor: pointer; list-style: none; }
  .fly-faq__q::-webkit-details-marker { display: none; }
  .fly-faq__chev { color: var(--fly-text-subtle); transition: transform var(--fly-dur-base) var(--fly-ease); flex: none; }
  .fly-faq__item[open] .fly-faq__chev { transform: rotate(180deg); }
  .fly-faq__a { padding-bottom: var(--fly-space-5); color: var(--fly-text-muted); }

  /* ---- cta block ---- */
  .fly-cta-block { text-align: center; }
  .fly-cta-block__inner { display: flex; flex-direction: column; align-items: center; gap: var(--fly-space-4); }
  .fly-cta-block__title { font-size: clamp(1.875rem, 1.4rem + 1.8vw, 2.5rem); }
  .fly-cta-block__text { color: var(--fly-text-muted); font-size: var(--fly-text-md); max-width: 48ch; }
  .fly-cta-block__actions { margin-top: var(--fly-space-2); display: flex; flex-wrap: wrap; gap: var(--fly-space-3); justify-content: center; }

  /* ---- detail page layout ---- */
  .fly-prose > * + * { margin-top: var(--fly-space-4); }
  .fly-prose h2 { margin-top: var(--fly-space-12); }
  .fly-prose h3 { margin-top: var(--fly-space-8); }
  .fly-checklist { list-style: none; display: grid; gap: var(--fly-space-3); }
  .fly-checklist li { display: flex; gap: var(--fly-space-3); align-items: flex-start; }
  .fly-checklist li::before { content: ''; flex: none; width: 1.25rem; height: 1.25rem; margin-top: 2px; border-radius: var(--fly-radius-pill); background: var(--fly-surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230089BD' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/14px no-repeat; }

  /* ---- forms ---- */
  .fly-form { display: grid; gap: var(--fly-space-4); }
  .fly-field { display: flex; flex-direction: column; gap: var(--fly-space-2); }
  .fly-field label { font-size: var(--fly-text-sm); font-weight: 600; }
  .fly-field .req { color: var(--fly-danger); }
  .fly-input, .fly-textarea, .fly-select { padding: var(--fly-space-3) var(--fly-space-3); background: var(--fly-surface); border: 1px solid var(--fly-border-strong); border-radius: var(--fly-radius-md); font-size: var(--fly-text-sm); color: var(--fly-text); width: 100%; transition: border-color var(--fly-dur-fast) var(--fly-ease), box-shadow var(--fly-dur-fast) var(--fly-ease); }
  .fly-input:focus, .fly-textarea:focus, .fly-select:focus { outline: none; border-color: var(--fly-primary); box-shadow: var(--fly-ring); }
  .fly-input[aria-invalid='true'], .fly-textarea[aria-invalid='true'] { border-color: var(--fly-danger); }
  .fly-textarea { min-height: 7rem; resize: vertical; }
  .fly-field__error { font-size: var(--fly-text-xs); color: var(--fly-danger); }
  .fly-consent { display: flex; gap: var(--fly-space-2); align-items: flex-start; font-size: var(--fly-text-sm); color: var(--fly-text-muted); }
  .fly-consent input { margin-top: 3px; }
  .fly-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--fly-space-4); }
  @media (max-width: 640px) { .fly-form__row { grid-template-columns: 1fr; } }
  .fly-alert { padding: var(--fly-space-4); border-radius: var(--fly-radius-md); font-size: var(--fly-text-sm); border: 1px solid var(--fly-border); }
  .fly-alert--success { background: color-mix(in srgb, var(--fly-success) 12%, var(--fly-surface)); border-color: var(--fly-success); }
  .fly-alert--error { background: color-mix(in srgb, var(--fly-danger) 10%, var(--fly-surface)); border-color: var(--fly-danger); }
  .fly-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

  /* ---- cookie consent banner ---- */
  .fly-consent-banner { position: fixed; left: 50%; bottom: var(--fly-space-4); transform: translateX(-50%); z-index: var(--fly-z-toast); width: min(640px, calc(100vw - 2 * var(--fly-gutter))); display: flex; align-items: center; gap: var(--fly-space-4); flex-wrap: wrap; justify-content: space-between; padding: var(--fly-space-4) var(--fly-space-5); background: var(--fly-surface); border: 1px solid var(--fly-border-strong); border-radius: var(--fly-radius-lg); box-shadow: var(--fly-shadow-lg); }
  .fly-consent-banner[hidden] { display: none; }
  .fly-consent-banner__text { font-size: var(--fly-text-sm); color: var(--fly-text-muted); margin: 0; flex: 1 1 16rem; }
  .fly-consent-banner__text a { color: var(--fly-accent); text-decoration: underline; }
  .fly-consent-banner__actions { display: flex; gap: var(--fly-space-2); }

  /* two-column detail wrapper */
  .fly-detail { display: grid; grid-template-columns: 1fr; gap: var(--fly-space-12); }
}

@layer utilities {
  .fly-visually-hidden, .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .fly-no-scroll { overflow: hidden; }
  [hidden] { display: none !important; }
  /* scroll reveal (progressive enhancement; visible by default if JS/observer absent) */
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--fly-dur-slow) var(--fly-ease), transform var(--fly-dur-slow) var(--fly-ease); }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ============================================================================
   CUSTOM VISUAL LAYER — diagrams, code blocks, textures, split layouts (no stock)
   ============================================================================ */
@layer components {
  /* blueprint grid texture on every dark section (layers under the glow) */
  .fly-section--dark {
    background-image:
      linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 46px 46px;
    background-position: center top;
  }
  /* subtle dot texture utility for light sections */
  .fly-texture-dots { background-image: radial-gradient(var(--fly-border) 1.2px, transparent 1.2px); background-size: 22px 22px; }

  /* split layouts (hero + content) */
  .fly-hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--fly-space-12); align-items: center; }
  .fly-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--fly-space-12); align-items: center; }
  @media (max-width: 920px) {
    .fly-hero__grid, .fly-split { grid-template-columns: 1fr; gap: var(--fly-space-8); }
    .fly-hero__visual { order: 2; }
  }

  /* SVG diagram system (themeable via tokens; auto-adapts inside dark sections) */
  .fly-diagram { width: 100%; height: auto; display: block; }
  .fly-diagram .dg-node { fill: var(--fly-surface); stroke: var(--fly-border-strong); stroke-width: 1.5; }
  .fly-diagram .dg-node--accent { stroke: var(--fly-accent); stroke-width: 2; }
  .fly-diagram .dg-label { fill: var(--fly-text); font-family: var(--fly-font-sans); font-weight: 600; font-size: 15px; }
  .fly-diagram .dg-sub { fill: var(--fly-text-subtle); font-family: var(--fly-font-mono); font-size: 10px; letter-spacing: .08em; }
  .fly-diagram .dg-link { fill: none; stroke: var(--fly-border-strong); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; animation: dg-draw .9s var(--fly-ease) forwards; }
  .fly-diagram .dg-link--accent { stroke: var(--fly-accent); }
  .fly-diagram .dg-g { opacity: 0; animation: dg-pop .5s var(--fly-ease-out) forwards; }
  @keyframes dg-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes dg-draw { to { stroke-dashoffset: 0; } }

  /* code / terminal block (intentionally dark in both themes) */
  .fly-code { background: #0d1117; border: 1px solid rgba(255, 255, 255, .09); border-radius: var(--fly-radius-lg); overflow: hidden; box-shadow: var(--fly-shadow-lg); }
  .fly-code__bar { display: flex; align-items: center; gap: .4rem; padding: .65rem .85rem; background: rgba(255, 255, 255, .03); border-bottom: 1px solid rgba(255, 255, 255, .07); }
  .fly-code__dot { width: .62rem; height: .62rem; border-radius: 50%; background: #39414d; }
  .fly-code__name { margin-left: .5rem; font-family: var(--fly-font-mono); font-size: .72rem; color: #7d8895; }
  .fly-code__body { margin: 0; padding: var(--fly-space-5); font-family: var(--fly-font-mono); font-size: .8rem; line-height: 1.75; color: #c9d3df; overflow-x: auto; white-space: pre; }
  .fly-code__body .c { color: #6b7686; }
  .fly-code__body .k { color: #8aa0ff; }
  .fly-code__body .s { color: #4cd6a6; }
  .fly-code__body .n { color: #1fbef0; }
}

@layer components {
  /* vertical timeline (process / implementation journey / migration) */
  .fly-timeline { list-style: none; padding: 0; margin: 0; }
  .fly-timeline__item { position: relative; display: grid; grid-template-columns: auto 1fr; gap: var(--fly-space-4); padding-bottom: var(--fly-space-6); }
  .fly-timeline__item:last-child { padding-bottom: 0; }
  .fly-timeline__item:not(:last-child)::before { content: ''; position: absolute; left: 18px; top: 42px; bottom: -2px; width: 2px; background: var(--fly-border); }
  .fly-timeline__node { position: relative; z-index: 1; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--fly-surface); border: 2px solid var(--fly-accent); color: var(--fly-accent); font-family: var(--fly-font-mono); font-weight: 600; font-size: var(--fly-text-sm); }
  .fly-timeline__title { font-size: var(--fly-text-md); font-weight: 600; line-height: 1.3; padding-top: 6px; }
  .fly-timeline__text { font-size: var(--fly-text-sm); color: var(--fly-text-muted); margin-top: 4px; }

  /* layered architecture diagram */
  .fly-diagram .dg-layer { fill: var(--fly-surface); stroke: var(--fly-border-strong); stroke-width: 1.5; }
  .fly-diagram .dg-layer--accent { stroke: var(--fly-accent); stroke-width: 2; }

  /* bespoke diagram helpers (sequence / topology / pipeline / strangler) */
  .fly-diagram .dg-ah { fill: var(--fly-border-strong); }
  .fly-diagram .dg-ah--a { fill: var(--fly-accent); }
  .fly-diagram .dg-life { stroke: var(--fly-border); stroke-width: 1.5; stroke-dasharray: 3 5; }
  .fly-diagram .dg-dash { fill: none; stroke: var(--fly-border-strong); stroke-width: 1.5; stroke-dasharray: 5 5; }
  .fly-diagram .dg-region { fill: none; stroke: var(--fly-border); stroke-width: 1.5; stroke-dasharray: 6 7; }
  .fly-diagram .dg-head { fill: var(--fly-surface-2); stroke: var(--fly-border-strong); stroke-width: 1.5; }
  .fly-diagram .dg-node--ghost { fill: var(--fly-surface-2); stroke: var(--fly-border); stroke-width: 1.5; stroke-dasharray: 4 4; }
  .fly-diagram .dg-mlabel { fill: var(--fly-text-muted); font-family: var(--fly-font-mono); font-size: 10px; }
  .fly-diagram .dg-tag { fill: var(--fly-text-subtle); font-family: var(--fly-font-mono); font-size: 9px; letter-spacing: .06em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .fly-diagram .dg-g, .fly-diagram .dg-link { animation: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important; }
}
