/* 1Kids.uz design tokens
   Copied by the build as is. Keep this file next to fonts/ (the @font-face urls are relative)
   Light theme by default, dark theme follows prefers-color-scheme. Contract: README.md */

/* Type: Libre Franklin, variable 400-800, self-hosted. Two subsets, the browser loads only what the page text needs
   Glyph test (docs/ai/design.md) passes in these files: README.md, Fonts */
@font-face {
  font-family: "Libre Franklin";
  src: url("fonts/libre-franklin-latin.7dfd9131b6.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-024F, U+0259, U+02B0-02FF, U+0300-036F, U+2000-206F, U+20A0-20CF, U+2100-214F, U+2212, U+2215, U+2219;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("fonts/libre-franklin-cyrillic.4cf03a14e5.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-052F, U+1C80-1C8F, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* Metric-matched fallback: text keeps its size and line breaks when the web font swaps in, so no layout shift */
@font-face {
  font-family: "Libre Franklin Fallback";
  src: local("Arial"), local("ArialMT");
  size-adjust: 102.53%;
  ascent-override: 94.22%;
  descent-override: 23.99%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light dark;

  /* Color, light */
  --c-bg: #ffffff;             /* page */
  --c-bg-soft: #f4f6f4;        /* soft bands: footer, callout, chips, age */
  --c-surface: #ffffff;        /* pills on photos, menus, search box */
  --c-sunken: #eceff0;         /* photo slot before load and with no photo */
  --c-ink: #131714;            /* text, icons */
  --c-ink-2: #474f49;          /* secondary text */
  --c-ink-3: #5f6762;          /* tertiary text, still AA on --c-bg-soft */
  --c-line: #e3e7e4;           /* hairlines */
  --c-line-strong: #cbd2cd;    /* control borders */
  --c-brand: #0d5a3f;          /* wordmark, links, active states */
  --c-brand-hover: #0a4732;
  --c-brand-soft: #e5f1eb;     /* tint behind brand text */
  --c-primary: #0d5a3f;        /* primary button fill */
  --c-primary-hover: #0a4732;
  --c-on-primary: #ffffff;
  --c-focus: #0d5a3f;
  --c-open: #179357;           /* status dot: open */
  --c-soon: #d68400;           /* status dot: closes within an hour */
  --c-closed: #98a09a;         /* status dot: closed */
  --c-star: #131714;
  --c-img-edge: rgb(19 23 20 / 0.07); /* inner hairline on photos, keeps pale photos off the white page */
  --c-backdrop: rgb(19 23 20 / 0.28);
  --c-warn: #a86400;           /* notice icon: temporarily closed, moved */
  --c-warn-soft: #fbf1e0;      /* notice band behind ink text */
  --c-viewer: #0b0d0c;         /* photo viewer, same in both themes */
  --c-on-viewer: #f2f4f3;

  /* Type */
  --font-sans: "Libre Franklin", "Libre Franklin Fallback", Arial, "Helvetica Neue", sans-serif;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-strong: 650;        /* card titles, buttons, prices */
  --fw-bold: 700;
  --fw-display: 750;       /* h1, h2 */
  --fw-heavy: 800;         /* wordmark */

  --fs-micro: 0.75rem;     --lh-micro: 1rem;        /* 12/16 badges */
  --fs-caption: 0.8125rem; --lh-caption: 1.125rem;  /* 13/18 counts, labels */
  --fs-small: 0.875rem;    --lh-small: 1.25rem;     /* 14/20 card meta, links */
  --fs-body: 1rem;         --lh-body: 1.5rem;       /* 16/24 text */
  --fs-lead: 1.0625rem;    --lh-lead: 1.625rem;     /* 17/26 hero lead, prose */
  --fs-title-s: 1.0625rem; --lh-title-s: 1.375rem;  /* 17/22 card titles */
  --fs-title-m: 1.25rem;   --lh-title-m: 1.625rem;  /* 20/26 callout, FAQ on desktop */
  --fs-title-l: 1.375rem;  --lh-title-l: 1.75rem;   /* 22/28 section titles (h2), 30/36 from 1024 */
  --fs-display: 2rem;      --lh-display: 2.25rem;   /* 32/36 h1, 56/60 from 1024 */
  --ls-display: -0.034em;
  --ls-title: -0.022em;
  --ls-tight: -0.01em;

  /* Space, 4 px base */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 48px;
  --sp-10: 64px;
  --sp-11: 80px;

  /* Layout */
  --container: 1200px;      /* content width cap */
  --pad: 20px;              /* page side padding: 20, 32 from 600, 40 from 1024 */
  --gap: 12px;              /* gap between cards in rails: 12, 16 from 600, 24 from 1024 */
  --section: 40px;          /* space between home blocks: 40, 56 from 600, 72 from 1024 */
  --header-h: 60px;         /* 60, 72 from 1024 */
  --tap: 44px;              /* minimum tap target */

  /* Radii */
  --r-xs: 6px;              /* age chip */
  --r-s: 10px;              /* buttons inside the search box */
  --r-m: 12px;              /* category thumbs, buttons */
  --r-l: 16px;              /* card photos, search box, callout */
  --r-pill: 999px;

  /* Elevation. Flat by default: only floating things get a shadow */
  --shadow-menu: 0 12px 32px rgb(19 23 20 / 0.14), 0 2px 6px rgb(19 23 20 / 0.08);
  --shadow-search: 0 6px 20px rgb(19 23 20 / 0.07), 0 1px 3px rgb(19 23 20 / 0.06);
  --shadow-pill: 0 1px 2px rgb(19 23 20 / 0.14);

  /* Breakpoints, min-width, mobile first. CSS cannot read variables in @media, base.css repeats the numbers */
  --bp-sm: 600px;           /* large phones, small tablets */
  --bp-md: 768px;           /* tablets */
  --bp-lg: 1024px;          /* desktop layout */
  --bp-xl: 1200px;          /* full container */

  /* Layers and motion */
  --z-header: 40;
  --z-menu: 50;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 180ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #0f1311;
    --c-bg-soft: #161b18;
    --c-surface: #1b211d;
    --c-sunken: #222925;
    --c-ink: #ecf0ed;
    --c-ink-2: #b4bcb6;
    --c-ink-3: #959e97;
    --c-line: #262e29;
    --c-line-strong: #3a443e;
    --c-brand: #5cc896;
    --c-brand-hover: #7dd6ad;
    --c-brand-soft: #16301f;
    --c-primary: #4db584;
    --c-primary-hover: #63c595;
    --c-on-primary: #05130b;
    --c-focus: #7dd6ad;
    --c-open: #3fcc86;
    --c-soon: #f0a933;
    --c-closed: #7c867f;
    --c-star: #ecf0ed;
    --c-img-edge: rgb(255 255 255 / 0.06);
    --c-backdrop: rgb(0 0 0 / 0.5);
    --c-warn: #f0a933;
    --c-warn-soft: #2a2416;
    --shadow-menu: 0 12px 32px rgb(0 0 0 / 0.5), 0 0 0 1px var(--c-line-strong);
    --shadow-search: none;
    --shadow-pill: 0 1px 2px rgb(0 0 0 / 0.4);
  }
}

@media (min-width: 600px) {
  :root { --pad: 32px; --gap: 16px; --section: 56px; }
}
@media (min-width: 1024px) {
  :root {
    --pad: 40px;
    --gap: 24px;
    --section: 72px;
    --header-h: 72px;
    --fs-display: 3.5rem;  --lh-display: 3.75rem;
    --fs-title-l: 1.875rem; --lh-title-l: 2.25rem;
    --fs-lead: 1.1875rem;  --lh-lead: 1.75rem;
  }
}
