/* ==========================================================================
   Design tokens — the only place with raw colours, sizes and timings.
   See docs/DESIGN.md for the reasoning and contrast figures.
   ========================================================================== */

/* Self-hosted fonts (SIL OFL 1.1, licences in /fonts). Latin Extended loads only when a page uses it. */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/bricolage-grotesque-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/bricolage-grotesque-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/instrument-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/instrument-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* --- Colour: brand dark surfaces (ink-950 = the logo's own background) --- */
  --ink-950: #121212;
  --ink-900: #1b1b1d;
  --ink-800: #29292c;
  --ink-700: #3a3a3e;

  /* --- Colour: warm paper --- */
  --paper: #f5f1e8;
  --paper-deep: #ebe5d8;
  --surface: #fffcf5;
  --line: #e0d9ca;
  --line-strong: #c9c0ad;

  /* --- Colour: text --- */
  --text: #1a1813;
  --text-muted: #5d574b;
  --text-on-dark: #f5f1e8;
  --muted-on-dark: #b1ab9f;

  /* --- Colour: accent (one use per screen) and functional --- */
  --accent: #ffd400;
  --accent-strong: #e8c100;
  --on-accent: #121212;
  --price-hover: #7a5c00;
  --whatsapp: #157a42;
  --whatsapp-strong: #0f6034;
  --on-whatsapp: #ffffff;
  --success-text: #17603a;
  --success-bg: #e3f1e6;
  --danger-text: #9f2a1f;
  --danger-bg: #f8e5e1;
  --focus: #1f5eff;
  --focus-on-dark: var(--accent);
  --scrim: rgb(18 18 18 / 0.72);
  --scrim-strong: rgb(18 18 18 / 0.94);
  --caption-gradient: linear-gradient(to top, rgb(18 18 18 / 0.88), rgb(18 18 18 / 0));
  --on-dark-hairline: rgb(245 241 232 / 0.14);

  /* Faint film grain and a soft lift for dark surfaces (inline SVG, allowed by the CSP's data: images). */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --dark-lift: radial-gradient(60rem 40rem at 85% -10%, var(--ink-900), transparent 70%);

  /* --- Typography --- */
  --font-display: 'Bricolage Grotesque', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-hero: clamp(2.125rem, 1.24rem + 3.62vw, 4.25rem);   /* 34 → 68 px */
  --fs-h1: clamp(1.875rem, 1.35rem + 2.1vw, 2.75rem);      /* 30 → 44 px */
  --fs-h2: clamp(1.875rem, 1.5rem + 1.5vw, 2.5rem);        /* 30 → 40 px */
  --fs-h3: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);    /* 19 → 22 px */
  --fs-price-lg: clamp(2.125rem, 1.8rem + 1.3vw, 2.75rem); /* 34 → 44 px */
  --fs-price: clamp(1.375rem, 1.28rem + 0.38vw, 1.625rem); /* 22 → 26 px */
  --fs-stat: clamp(1.75rem, 1.28rem + 1.9vw, 2.5rem);      /* 28 → 40 px */
  --fs-lead: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);   /* 17 → 19 px */
  --fs-body: clamp(1rem, 0.975rem + 0.1vw, 1.0625rem);     /* 16 → 17 px */
  --fs-card-title: 1.0625rem;                              /* 17 px */
  --fs-small: 0.875rem;                                    /* 14 px */
  --fs-label: 0.8125rem;                                   /* 13 px */
  --fs-kicker: 0.75rem;                                    /* 12 px */

  --lh-tight: 1.02;
  --lh-heading: 1.1;
  --lh-snug: 1.3;
  --lh-body: 1.6;
  --tracking-display: -0.02em;
  --tracking-kicker: 0.12em;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --measure: 62ch;

  /* --- Spacing (4 px base) --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  --gutter: clamp(1rem, 0.62rem + 1.55vw, 2rem);
  --section-y: clamp(3.5rem, 2.6rem + 3.7vw, 6rem);
  --container: 76rem;
  --container-wide: 86rem;
  --header-h: 4rem;
  --action-bar-h: 4.5rem;
  --sidebar-w: 18.75rem;
  --menu-w: 24rem;
  --map-h: 18rem;
  --submit-min-w: 12rem;
  --measure-short: 32ch;
  --measure-headline: 14ch;
  --measure-lead: 44ch;

  /* --- Size --- */
  --control-h: 3rem;
  --control-h-small: 2.25rem;
  --icon: 1.25rem;
  --icon-small: 0.875rem;
  --icon-large: 2.5rem;
  --logo: 2.5rem;
  --thumb-w: 5.5rem;
  --timeline-dot: 2rem;
  --hairline: 1px;
  --border-strong: 1.5px;
  --focus-ring: 3px;

  /* --- Shape, depth, motion --- */
  --radius: 12px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgb(26 24 19 / 0.06), 0 4px 12px rgb(26 24 19 / 0.05);
  --shadow-2: 0 2px 4px rgb(26 24 19 / 0.07), 0 14px 32px rgb(26 24 19 / 0.12);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --duration-reveal: 300ms;
  --duration-state: 160ms;
  --reveal-shift: 8px;
  --hover-scale: 1.03;

  --z-header: 50;
  --z-action-bar: 40;
  --z-overlay: 80;
  --z-skip: 100;
}
