/* ==========================================================================
   Design tokens — Home Vista Realty
   Single source of truth for colour, type, space, radius, elevation, motion.
   Nothing in this file selects an element; it only declares custom properties.
   ========================================================================== */

:root {
  color-scheme: light;

  /* --- Brand: ink -------------------------------------------------------
     Deep navy drawn from the classical portico in the HVR mark. Used for
     hero, footer and any "authority" surface. */
  --ink-950: #070E17;
  --ink-900: #0B1420;
  --ink-800: #12202F;
  --ink-700: #1B2E42;
  --ink-600: #2A4059;
  --ink-500: #3E5872;
  --ink-400: #5A7186;

  /* --- Brand: brass -----------------------------------------------------
     Sampled from the logo's gold gradient. --brass-500 is the primary
     accent; -600/-700 are the accessible text-on-light variants. */
  --brass-800: #6E4E17;
  --brass-700: #8A6420;
  --brass-600: #A87C28;
  --brass-500: #C2933A;
  --brass-400: #D9B25F;
  --brass-300: #E8CE93;
  --brass-200: #F1E1BF;
  --brass-100: #F7EFDD;

  /* Gradient lifted from the wordmark, for rules, marks and accents. */
  --brass-gradient: linear-gradient(100deg, #8A6420 0%, #E3C06A 38%, #B8862F 62%, #EBD79F 100%);

  /* --- Neutrals ---------------------------------------------------------- */
  --paper: #FBF9F6;
  --surface: #FFFFFF;
  --surface-2: #F5F2EC;
  --surface-3: #EDE8DF;

  --line: rgba(11, 20, 32, 0.10);
  --line-strong: rgba(11, 20, 32, 0.18);
  --line-invert: rgba(247, 244, 239, 0.14);

  --text: #14202E;
  --text-muted: #59697A;
  --text-subtle: #7C8A99;
  --text-invert: #F7F4EF;
  --text-invert-muted: rgba(247, 244, 239, 0.72);

  /* Role tokens for the brass accent. These flip on inverted surfaces, so
     eyebrows, arrow links, outline buttons and focus rings stay legible on
     ink without each component needing its own dark-surface rule. */
  --accent: var(--brass-600);
  --accent-strong: var(--brass-700);
  --accent-soft: var(--brass-100);

  /* --- Status ------------------------------------------------------------ */
  --success-600: #1F7A55;
  --success-100: #E4F3EC;
  --danger-600: #B3261E;
  --danger-100: #FBE9E7;

  /* --- Typography --------------------------------------------------------
     Display serif for headings, grotesque for everything else. Both have
     full local fallback stacks so the page is legible before webfonts land. */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Fluid type scale — clamp(min, preferred, max) between 360px and 1280px. */
  --fs-xs: 0.75rem;      /* 12px  — meta, legal */
  --fs-sm: 0.8125rem;    /* 13px  — labels, chips */
  --fs-base: 0.9375rem;  /* 15px  — UI text */
  --fs-body: 1rem;       /* 16px  — prose */
  --fs-lg: clamp(1.0625rem, 0.99rem + 0.32vw, 1.1875rem);
  --fs-xl: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --fs-2xl: clamp(1.5rem, 1.32rem + 0.8vw, 2rem);
  --fs-3xl: clamp(1.875rem, 1.55rem + 1.45vw, 2.75rem);
  --fs-4xl: clamp(2.25rem, 1.7rem + 2.4vw, 3.75rem);
  --fs-5xl: clamp(2.75rem, 1.9rem + 3.7vw, 4.75rem);

  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-normal: 1.55;
  --lh-relaxed: 1.7;

  --tracking-display: -0.022em;
  --tracking-tight: -0.011em;
  --tracking-wide: 0.06em;
  --tracking-caps: 0.14em;

  /* --- Space -------------------------------------------------------------
     4px base. Section rhythm is fluid so long pages breathe on desktop. */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  --section-y: clamp(3.5rem, 2.4rem + 4.6vw, 7rem);
  --container: 1200px;
  --container-narrow: 780px;
  --gutter: clamp(1.125rem, 0.7rem + 1.8vw, 2.5rem);

  /* --- Radius ------------------------------------------------------------ */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* --- Elevation ---------------------------------------------------------
     Layered, low-opacity navy rather than flat black — reads warmer on paper. */
  --shadow-xs: 0 1px 2px rgba(11, 20, 32, 0.06);
  --shadow-sm: 0 1px 2px rgba(11, 20, 32, 0.05), 0 2px 6px rgba(11, 20, 32, 0.05);
  --shadow-md: 0 2px 4px rgba(11, 20, 32, 0.05), 0 8px 20px rgba(11, 20, 32, 0.07);
  --shadow-lg: 0 4px 8px rgba(11, 20, 32, 0.05), 0 18px 42px rgba(11, 20, 32, 0.11);
  --shadow-xl: 0 8px 16px rgba(11, 20, 32, 0.07), 0 32px 68px rgba(11, 20, 32, 0.16);

  --ring: 0 0 0 3px rgba(194, 147, 58, 0.34);

  /* --- Motion ------------------------------------------------------------ */
  --ease-out: cubic-bezier(0.22, 0.65, 0.28, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 140ms;
  --dur-base: 240ms;
  --dur-slow: 420ms;

  /* --- Layers ------------------------------------------------------------ */
  --z-sticky: 20;
  --z-header: 60;
  --z-drawer: 80;
  --z-modal: 100;
  --z-toast: 120;

  --header-h: 76px;
}

@media (max-width: 860px) {
  :root {
    --header-h: 64px;
  }
}

/* Inverted surfaces remap the neutral tokens so nested components — buttons,
   links, rules, form controls — pick up the right colours without each one
   needing a bespoke dark variant. Any new dark section belongs on this list
   (or can just carry the `on-ink` class). */
.on-ink,
.hero,
.page-hero,
.cta-band,
.join-band,
.nav,
.site-footer,
.benefit-card--ink,
.info-card--ink {
  --text: var(--text-invert);
  --text-muted: var(--text-invert-muted);
  --text-subtle: rgba(247, 244, 239, 0.55);
  --line: var(--line-invert);
  --line-strong: rgba(247, 244, 239, 0.24);
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.08);

  --accent: var(--brass-300);
  --accent-strong: var(--brass-300);
  --accent-soft: rgba(194, 147, 58, 0.14);

  color: var(--text-invert);
}
