/* ============================================================
   FlexiClean Design Tokens — v1
   Source of truth: Notion `Brand Guidelines v1.0` (locked).
   Hard rule: never use Emerald/Aqua as a full background.
   60-30-10 = Navy / Soft White / Emerald+Aqua.
   ============================================================ */

/* Fallbacks sized to the web fonts (widths measured against Arial and Consolas), so
   text wraps the same before and after the fonts arrive and nothing jumps. */
@font-face { font-family: "FC Poppins Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600; size-adjust: 103%; ascent-override: 102%; descent-override: 34%; line-gap-override: 9.7%; }
@font-face { font-family: "FC Poppins Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 700; size-adjust: 108.5%; ascent-override: 97%; descent-override: 32%; line-gap-override: 9.2%; }
@font-face { font-family: "FC Inter Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 400 500; size-adjust: 106.5%; ascent-override: 91%; descent-override: 22.5%; line-gap-override: 0%; }
@font-face { font-family: "FC Mono Fallback"; src: local("Consolas"); size-adjust: 109%; ascent-override: 93.5%; descent-override: 27.5%; line-gap-override: 0%; }

:root {
  color-scheme: dark;
  /* ---------- COLOR (locked brand palette) ---------- */
  --fc-navy:        #0B1D30;
  --fc-white:       #F2F4F7;
  --fc-emerald:     #16B28E;
  --fc-aqua:        #28C1D0;
  --fc-ocean:       #0D6EAB;
  --fc-gray:        #687280;

  /* Derived surfaces (web only) */
  --fc-text-muted-on-dark: #AAB4C0;
  --fc-gray-ui:     #5B6573;   /* the one secondary gray for light surfaces (>= 4.5:1) */
  --fc-text-muted-on-light: var(--fc-gray-ui);
  --fc-navy-1:      #0E2236;   /* card surface on navy */
  --fc-navy-2:      #14304B;   /* elevated card */
  --fc-line:        rgba(242, 244, 247, 0.08);
  --fc-line-strong: rgba(242, 244, 247, 0.18);

  /* Glows */
  --fc-glow-aqua:    radial-gradient(circle at 25% 20%, rgba(40, 193, 208, 0.35), transparent 55%);
  --fc-glow-emerald: radial-gradient(circle at 75% 80%, rgba(22, 178, 142, 0.28), transparent 55%);
  --fc-glow-ocean:   radial-gradient(circle at 50% 50%, rgba(13, 110, 171, 0.25), transparent 65%);

  /* CTA — never a gradient */
  --fc-cta:        var(--fc-emerald);
  --fc-cta-hover:  #13a07f;
  --fc-cta-text:   #02201A;

  /* ---------- TYPOGRAPHY ---------- */
  --fc-font-display: "Poppins", "FC Poppins Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fc-font-body:    "Inter", "FC Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fc-font-mono:    "JetBrains Mono", "FC Mono Fallback", ui-monospace, "SF Mono", Consolas, monospace;

  --fc-h1:    clamp(2.75rem, 6vw + 1rem, 7rem);    /* 44 → 112 */
  --fc-h2:    clamp(2rem, 3vw + 1rem, 3.75rem);
  --fc-h3:    clamp(1.5rem, 1.5vw + 1rem, 2.25rem);
  --fc-body:  1rem;
  --fc-small: 0.875rem;
  --fc-micro: 0.75rem;

  --fc-leading-tight: 0.95;
  --fc-leading-body:  1.55;
  --fc-tracking-tight: -0.02em;
  --fc-tracking-label:  0.18em;

  /* ---------- SPACING ---------- */
  --fc-space-1: 0.25rem;
  --fc-space-2: 0.5rem;
  --fc-space-3: 0.75rem;
  --fc-space-4: 1rem;
  --fc-space-5: 1.5rem;
  --fc-space-6: 2rem;
  --fc-space-7: 3rem;
  --fc-space-8: 4rem;
  --fc-space-9: 6rem;
  --fc-space-10: 8rem;

  --fc-container: 1240px;
  --fc-gutter: clamp(1rem, 4vw, 3rem);

  /* ---------- RADII ---------- */
  --fc-radius-sm:  6px;
  --fc-radius-md:  12px;
  --fc-radius-lg:  20px;
  --fc-radius-xl:  28px;
  --fc-radius-pill: 999px;

  /* ---------- SHADOWS ---------- */
  --fc-shadow-card:   0 4px 32px rgba(0, 0, 0, 0.25);
  --fc-shadow-elevate: 0 18px 60px -12px rgba(0, 0, 0, 0.55);
  --fc-shadow-aqua:   0 0 0 1px rgba(40, 193, 208, 0.2), 0 12px 40px -10px rgba(40, 193, 208, 0.35);

  /* ---------- MOTION ---------- */
  --fc-ease:    cubic-bezier(0.22, 0.61, 0.36, 1);
  --fc-fast:    180ms;
  --fc-base:    320ms;
  --fc-slow:    560ms;

  --fc-z-nav:    50;
  --fc-z-modal:  100;
  --fc-z-cursor: 120;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--fc-font-body);
  font-size: var(--fc-body);
  line-height: var(--fc-leading-body);
  color: var(--fc-white);
  background: var(--fc-navy);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* The hidden attribute must beat component display rules (.fc-btn is inline-flex). */
[hidden] { display: none !important; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--fc-aqua); }

/* ---------- TYPE PRIMITIVES ---------- */
.fc-display-1 {
  font-family: var(--fc-font-display);
  font-weight: 700;
  font-size: var(--fc-h1);
  line-height: var(--fc-leading-tight);
  letter-spacing: var(--fc-tracking-tight);
  margin: 0;
}
.fc-display-2 {
  font-family: var(--fc-font-display);
  font-weight: 700;
  font-size: var(--fc-h2);
  line-height: 1.05;
  letter-spacing: var(--fc-tracking-tight);
  margin: 0;
}
.fc-h3 {
  font-family: var(--fc-font-display);
  font-weight: 600;
  font-size: var(--fc-h3);
  line-height: 1.15;
  margin: 0;
}
.fc-label {
  font-family: var(--fc-font-mono);
  font-size: 0.75rem;
  letter-spacing: var(--fc-tracking-label);
  text-transform: uppercase;
  color: var(--fc-aqua);
}
.fc-body  { font-size: var(--fc-body); color: var(--fc-white); }
.fc-muted { color: var(--fc-text-muted-on-dark); }
.fc-mono  { font-family: var(--fc-font-mono); font-variant-numeric: tabular-nums; }

/* ---------- LAYOUT PRIMITIVES ---------- */
.fc-container {
  width: 100%;
  max-width: var(--fc-container);
  margin: 0 auto;
  padding-inline: var(--fc-gutter);
}
.fc-section { padding-block: clamp(4rem, 8vw, 8rem); position: relative; }
/* Light bands. The global rules are written for navy, so a light band re-states
   color-scheme, focus ring, links, hover and ghost buttons. Emerald and aqua are
   never text here (contrast under 3:1): navy or ocean only. */
.fc-section--light { background: var(--fc-white); color: var(--fc-navy); color-scheme: light; }
.fc-section--light :focus-visible { outline-color: var(--fc-ocean); }
.fc-section--light a:not(.fc-btn) { color: var(--fc-ocean); text-decoration: underline; text-underline-offset: 3px; }
.fc-section--light a:not(.fc-btn):hover { color: var(--fc-navy); }
.fc-section--light .fc-btn--ghost { color: var(--fc-navy); border-color: var(--fc-navy); }
.fc-section--light .fc-btn--ghost:hover { color: var(--fc-ocean); border-color: var(--fc-ocean); }
.fc-section--light figcaption { color: var(--fc-gray-ui); }
.fc-section--light .fc-label { color: var(--fc-ocean); }
.fc-section--light .fc-body  { color: var(--fc-navy); }
.fc-section--light .fc-muted { color: var(--fc-text-muted-on-light); }

/* ---------- BUTTONS ---------- */
.fc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  border-radius: var(--fc-radius-pill);
  font-family: var(--fc-font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform var(--fc-fast) var(--fc-ease),
              background var(--fc-fast) var(--fc-ease),
              color var(--fc-fast) var(--fc-ease);
  white-space: nowrap;
}
.fc-btn--primary {
  background: var(--fc-cta);
  color: var(--fc-cta-text);
}
.fc-btn--primary:hover { background: var(--fc-cta-hover); transform: translateY(-1px); color: var(--fc-cta-text); }
.fc-btn--ghost {
  background: transparent;
  color: var(--fc-white);
  border: 1px solid var(--fc-line-strong);
}
.fc-btn--ghost:hover { border-color: var(--fc-aqua); color: var(--fc-aqua); }
.fc-btn--dark {
  background: var(--fc-navy);
  color: var(--fc-white);
}
.fc-btn--dark:hover { background: var(--fc-navy-2); color: var(--fc-white); }

@media (max-width: 720px) {
  .fc-btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    justify-content: center;
  }
}
/* ---------- A11Y / MOTION ---------- */
.fc-skip-link {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  left: max(0.75rem, env(safe-area-inset-left));
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: var(--fc-radius-sm);
  background: var(--fc-white);
  color: var(--fc-navy);
  font-weight: 700;
  transform: translateY(calc(-100% - 2rem));
  transition: transform var(--fc-fast) var(--fc-ease);
}
.fc-skip-link:focus {
  color: var(--fc-navy);
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--fc-aqua);
  outline-offset: 3px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- UTILITIES ---------- */
.fc-stack > * + * { margin-top: var(--fc-space-4); }
.fc-stack-lg > * + * { margin-top: var(--fc-space-6); }
.fc-cluster { display: flex; flex-wrap: wrap; gap: var(--fc-space-3); align-items: center; }
.fc-grid { display: grid; gap: var(--fc-space-5); }
.fc-flow > * + * { margin-block-start: 1em; }
.fc-hide-mobile { @media (max-width: 768px) { display: none !important; } }

/* ============================================================
   FONTS — load self-hosted in WP via @fontsource for prod.
   Prototype uses Google Fonts for speed of review.
   ============================================================ */

/* ---------- BROWSER THEMING ---------- */
html {
  accent-color: var(--fc-emerald);
  scrollbar-color: var(--fc-gray) var(--fc-navy);
}
::selection { background: var(--fc-aqua); color: var(--fc-navy); }
input, textarea { caret-color: var(--fc-aqua); }
.fc-section--light :is(input, textarea) { caret-color: var(--fc-ocean); }
p, li, figcaption, blockquote { text-wrap: pretty; }
table, .fc-price__amount, .fc-pricerow__price, .fc-score, .fc-stat__num, .fc-linen2__math { font-variant-numeric: tabular-nums; }

/* ---------- MOTION: one short hero entrance ----------
   Transform only, so the content is visible from the first paint. */
@media (prefers-reduced-motion: no-preference) {
  .fc-hero__inner, .fc-hero2__inner { animation: fc-enter 360ms var(--fc-ease) backwards; }
}
@keyframes fc-enter { from { transform: translateY(12px); } to { transform: none; } }
