/* ============================================================================
   КРЫМСКАЯ ИПОТЕКА ПОД 8% · colors_and_type.css
   Canonical token layer for the «Крымская ипотека» lead-gen system.

   Source of truth (lifted verbatim from the supplied project):
     colors_and_type.css          → base palette, accents, radii, motion, texture
     site.css                     → 5-page light clip-landing (theme-a / theme-b)
     clip.css                     → full-bleed dark "clip" landing (stories)
     design_handoff_crimea_mortgage_clip/README.md → type roles, spacing intent

   Two surface contexts consume the same palette:
     · theme-a  warm bone page   (#EEECE6)      — steps 1, 3, 5 of the funnel
     · theme-b  light sage page  (#d7ebda)      — steps 2, 4
     · .theme-dark  full-bleed dark stories     — the clip landing
     · .theme-sage  offer block                 — the gift / CTA panel

   TYPE: strictly three roles on every surface — display (Unbounded 800),
   semantic emphasis (Unbounded 700), body (Manrope). JetBrains Mono carries
   every label, counter and meta stamp. Lora (declared upstream for the
   unrelated longread article) is NOT used on these surfaces and is omitted;
   its `p{font:…Lora}` rule is intentionally not carried over.
   ========================================================================= */

/* ---------- FONTS (self-hosted, Google Fonts, OFL) ------------------------ */
@font-face{font-family:'Unbounded';font-style:normal;font-weight:200 900;font-display:swap;
  src:url('fonts/Unbounded-cyrillic.woff2') format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Unbounded';font-style:normal;font-weight:200 900;font-display:swap;
  src:url('fonts/Unbounded-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:'Manrope';font-style:normal;font-weight:200 800;font-display:swap;
  src:url('fonts/Manrope-cyrillic.woff2') format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Manrope';font-style:normal;font-weight:200 800;font-display:swap;
  src:url('fonts/Manrope-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:'JetBrains Mono';font-style:normal;font-weight:400 500;font-display:swap;
  src:url('fonts/JetBrainsMono-cyrillic.woff2') format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 500;font-display:swap;
  src:url('fonts/JetBrainsMono-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}

:root{
  /* ======================================================================
     1 · BASE TYPE STACKS
     ==================================================================== */
  --font-display:'Unbounded',system-ui,sans-serif;
  --font-body:'Manrope',system-ui,sans-serif;
  --font-mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;

  /* legacy shorthand aliases used across the handoff files */
  --head:var(--font-display);
  --body:var(--font-body);
  --mono:var(--font-mono);

  /* ======================================================================
     2 · BASE PALETTE — warm bone "paper" world
     ==================================================================== */
  --bg:#EEECE6;          /* page background, warm bone */
  --bg2:#E4E1D9;         /* recessed background / image frame */
  --card:#F7F6F2;        /* raised card, quiz sheet */
  --surface:#FFFFFF;     /* the purest white: chips, inputs, theme-b boxes */
  --ink:#1F211E;         /* primary text · dark buttons · dark sections */
  --ink2:#3A3C37;        /* body text */
  --ink3:#343631;        /* deep dark, dark-theme secondary surface */
  --muted:#7D7E76;       /* labels, captions, meta */
  --line:#D5D2C9;        /* every hairline border and divider row */

  /* 3 · DARK "clip" SURFACE — full-bleed stories */
  --paper:#EEECE6;              /* foreground on dark */
  --dark-surface:#292B27;       /* cards / calculator panels on dark */
  --dark-surface2:#343631;      /* recessed chips, calendar cells */
  --dark-line:rgba(238,236,230,.12);
  --dark-line-strong:rgba(238,236,230,.22);

  /* ======================================================================
     4 · ACCENT SCALE — "sage" (primary, hue ~150) and "clay" (secondary, ~45)
     Authored upstream in oklch; hex values are the shipped sRGB equivalents.
     ==================================================================== */
  --sage:#a3c9aa;       /* oklch(0.80 0.06 150) · primary accent FILL */
  --sage-d:#3f6948;     /* oklch(0.48 0.07 150) · accent TEXT on light */
  --sage-soft:#d7ebda;  /* oklch(0.92 0.03 150) · theme-b page, success plate */
  --sage-wash:rgba(163,201,170,.25);  /* highlighted table column */
  --sage-dim:rgba(163,201,170,.14);   /* same column / plate on dark */

  --clay:#a7694c;       /* oklch(0.58 0.09 45) · negative + warning TEXT */
  --clay-soft:#f2ddcf;  /* oklch(0.91 0.03 55) · warning box */
  --coral:#d29d80;      /* oklch(0.74 0.075 50) · clay on dark */
  --sun:#efd27e;        /* oklch(0.87 0.10 90) · warm signal, pinned CTA only */

  /* 5 · TEXT ON DARK */
  --on-dark-1:#EEECE6;
  --on-dark-2:rgba(238,236,230,.78);
  --on-dark-3:rgba(238,236,230,.55);
  --on-dark-4:rgba(238,236,230,.38);
  /* 6 · TEXT ON SAGE (the offer block) */
  --on-sage-1:#1F211E;
  --on-sage-2:rgba(31,33,30,.82);
  --on-sage-3:rgba(31,33,30,.6);

  /* 6b · EMPHASIS — <b> inside body copy. Follows the surface it sits on. */
  --emph:var(--ink);

  /* ======================================================================
     7 · SEMANTIC TYPE ROLES
     Three sizes per surface. Nothing else is sanctioned.
     ==================================================================== */
  /* the page headline — Unbounded 800, tight, balanced */
  --h-size-mobile:clamp(26px,6.8vw,46px);
  --h-size-desktop:clamp(34px,3.4vw,48px);
  --h-weight:800;
  --h-leading:1.08;
  --h-tracking:-.025em;

  /* semantic emphasis — numbers, card names, mistakes, steps */
  --a-size-mobile:19px;
  --a-size-desktop:21px;
  --a-weight:700;
  --a-leading:1.25;
  --a-tracking:-.015em;

  /* body — copy, buttons, captions, pills */
  --b-size-mobile:16px;
  --b-size-desktop:17px;
  --b-leading:1.55;

  /* mono meta — kickers, counters, labels (clip landing) */
  --meta-size:11px;
  --label-size:10.5px;
  --meta-tracking:.06em;
  --kicker-tracking:.08em;

  /* oversized numerals */
  --rate-size:clamp(64px,19vw,128px);
  --pay-size:clamp(44px,13vw,64px);
  --scarce-size:30px;

  /* ======================================================================
     8 · RADII — the brand's rounding ladder (never invent in-between values)
     ==================================================================== */
  --r-mark:6px;    /* brand square, progress bars */
  --r-chip:12px;   /* verdicts, small plates, dark-theme chips */
  --r-cta:18px;    /* every primary / secondary button */
  --r-card:20px;   /* quiz options, inputs, image tiles */
  --r-box:22px;    /* tip block, expert card, conclusion */
  --r-scene:24px;  /* hero image */
  --r-panel:26px;  /* calculator, comparison table, mistake panel */
  --r-offer:30px;  /* sage offer block, quiz sheet */
  --r-pill:999px;  /* chips, tags, avatars */

  /* ======================================================================
     9 · SPACING
     ==================================================================== */
  --s-0:4px; --s-1:6px; --s-2:10px; --s-3:14px; --s-4:18px; --s-5:22px;
  --s-6:26px; --s-7:34px; --s-8:40px; --s-9:56px; --s-10:64px;
  --pad:20px;                          /* mobile page gutter */
  --pad-wide:clamp(32px,5vw,96px);     /* desktop page gutter */
  --wrap-max:1240px;                   /* 5-page site shell */
  --clip-max:1360px;                   /* clip landing shell */
  --col-gap:clamp(40px,5vw,88px);      /* between the two page columns */
  --measure:640px;                     /* max width of the .next block */

  /* ======================================================================
     10 · MOTION
     ==================================================================== */
  --ease-out:cubic-bezier(.2,.8,.2,1);       /* entrances, page transitions */
  --ease-drawer:cubic-bezier(.3,.9,.3,1);    /* sheets, accordions */
  --ease-pop:cubic-bezier(.2,.9,.3,1.2);     /* rare, celebratory */
  --dur-rise:600ms;      /* .rise entrance */
  --dur-slide:450ms;     /* clip-landing slide swap */
  --dur-sheet:450ms;     /* bottom sheet travel */
  --dur-hover:150ms;     /* button lift */
  --dur-tap:120ms;       /* :active scale */
  --rise-shift:12px;     /* entrance offset */

  /* ======================================================================
     11 · SHADOW — the system uses exactly three, and they are all warm
     ==================================================================== */
  --shadow-cta:0 16px 30px -14px rgba(31,33,30,.5);
  --shadow-sage:0 14px 30px -14px rgba(163,201,170,.45);
  --shadow-card:0 30px 80px -20px rgba(20,22,15,.45);

  /* ======================================================================
     12 · SIGNATURE TEXTURE — the striped "photo pending" ramp
     ==================================================================== */
  --stripes-photo:repeating-linear-gradient(135deg,#d9d6cd 0 9px,#e4e1d9 9px 18px);
  --stripes-light:repeating-linear-gradient(135deg,#dcd9d0 0 10px,#e6e3db 10px 20px);
  --stripes-avatar:repeating-linear-gradient(135deg,#d9d6cd 0 5px,#e6e3db 5px 10px);
  --stripes-dark:repeating-linear-gradient(135deg,#292B27 0 10px,#2E302C 10px 20px);
}

/* ==========================================================================
   SEMANTIC CONTEXT VARS — swap by adding a class to a wrapper
   ========================================================================== */
.theme-a{                       /* warm bone — funnel steps 1, 3, 5 */
  --page:var(--bg); --box:var(--card); --rule:var(--line);
  --chip:rgba(31,33,30,.06);
}
.theme-b{                       /* light sage — funnel steps 2, 4 */
  --page:var(--sage-soft); --box:var(--surface); --rule:rgba(63,105,72,.22);
  --chip:rgba(63,105,72,.10);
}
.theme-dark{                    /* full-bleed stories */
  --page:var(--ink); --box:var(--dark-surface); --rule:var(--dark-line);
  --chip:var(--dark-surface2); color:var(--on-dark-1); --emph:var(--paper);
}
.theme-sage{                    /* the offer / gift block */
  --page:var(--sage); --box:var(--paper); --rule:rgba(31,33,30,.16);
  --chip:rgba(31,33,30,.08); color:var(--on-sage-1); --emph:var(--ink);
}

/* ==========================================================================
   SEMANTIC ELEMENT STYLES — drop this file in and plain HTML looks branded.
   ========================================================================== */
body{
  background:var(--page,var(--bg)); color:var(--ink);
  font:400 var(--b-size-mobile)/var(--b-leading) var(--font-body);
  -webkit-font-smoothing:antialiased;
}
@media (min-width:960px){ body{font-size:var(--b-size-desktop)} }

/* display: the page headline */
.h, h1{
  font:var(--h-weight) var(--h-size-mobile)/var(--h-leading) var(--font-display);
  letter-spacing:var(--h-tracking); text-wrap:balance;
}
@media (min-width:960px){ .h, h1{font-size:var(--h-size-desktop)} }
.h em, h1 em{font-style:normal; color:var(--sage-d)}
.theme-dark .h em{color:var(--sage)}

/* semantic emphasis */
.a, h2{
  font:var(--a-weight) var(--a-size-mobile)/var(--a-leading) var(--font-display);
  letter-spacing:var(--a-tracking); text-wrap:balance;
}
@media (min-width:960px){ .a, h2{font-size:var(--a-size-desktop)} }

/* body copy — resets the upstream Lora longread rule */
p{font:inherit; color:var(--ink2); text-wrap:pretty}
b, strong{font-weight:700; color:var(--emph)}
a{color:var(--sage-d); text-decoration-thickness:1px; text-underline-offset:3px}
hr{border:0; border-top:1px solid var(--rule,var(--line)); margin:var(--s-5) 0}

/* mono label — sentence case, never caps on the light surfaces */
.lbl{font-weight:700; color:var(--sage-d); letter-spacing:0}
/* mono meta stamp — UPPERCASE, used on the dark clip landing */
.kicker{font:500 var(--meta-size)/1 var(--font-mono); letter-spacing:var(--kicker-tracking);
  text-transform:uppercase; color:var(--sage)}
.label{font:500 var(--label-size)/1.4 var(--font-mono); letter-spacing:var(--meta-tracking);
  text-transform:uppercase; color:var(--muted)}
.muted{color:var(--muted)}

code,kbd,samp{font-family:var(--font-mono); font-size:.9em}
::selection{background:var(--sage); color:var(--ink)}
