/* ════════════════════════════════════════════════════════════════════════════
   NUMEROGRAMMA · Design Tokens · Premium Mystic
   Две законченные темы. По умолчанию — тёмная (data-theme="dark").
   Светлая: data-theme="light". Все компоненты читают только переменные.
   ════════════════════════════════════════════════════════════════════════════ */

/* ─── Шрифты ─────────────────────────────────────────────────────────────── */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/cormorantgaramond-400-cyrillic.e1df04190d1b.woff2") format("woff2");
  unicode-range: U+047F, U+0480-058F, U+2500-273F, U+1C80-1C88, U+0450-045F, U+0400-045F;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/cormorantgaramond-400-latin-ext.acc46a2a7785.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0260-027F, U+2150-215F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/cormorantgaramond-400-latin.c47ff12887a3.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: "Cormorant Garamond";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorantgaramond-500-cyrillic.e1df04190d1b.woff2") format("woff2");
  unicode-range: U+047F, U+0480-058F, U+2500-273F, U+1C80-1C88, U+0450-045F, U+0400-045F;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorantgaramond-500-latin-ext.acc46a2a7785.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0260-027F, U+2150-215F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorantgaramond-500-latin.c47ff12887a3.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: "Cormorant Garamond";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/cormorantgaramond-600-cyrillic.e1df04190d1b.woff2") format("woff2");
  unicode-range: U+047F, U+0480-058F, U+2500-273F, U+1C80-1C88, U+0450-045F, U+0400-045F;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/cormorantgaramond-600-latin-ext.acc46a2a7785.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0260-027F, U+2150-215F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/cormorantgaramond-600-latin.c47ff12887a3.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: "Cormorant Garamond";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/cormorantgaramond-700-cyrillic.e1df04190d1b.woff2") format("woff2");
  unicode-range: U+047F, U+0480-058F, U+2500-273F, U+1C80-1C88, U+0450-045F, U+0400-045F;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/cormorantgaramond-700-latin-ext.acc46a2a7785.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0260-027F, U+2150-215F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/cormorantgaramond-700-latin.c47ff12887a3.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: "Inter";
  font-style: normal; font-weight: 400; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-400-cyrillic.de93fdc85e3d.woff2") format("woff2");
  unicode-range: U+047F, U+0480-058F, U+2500-273F, U+1C80-1C88, U+0450-045F, U+0400-045F;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 400; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-400-latin-ext.1ad231aac0a8.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0260-027F, U+2150-215F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 400; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-400-latin.260c81a4759b.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: "Inter";
  font-style: normal; font-weight: 450; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-450-cyrillic.de93fdc85e3d.woff2") format("woff2");
  unicode-range: U+047F, U+0480-058F, U+2500-273F, U+1C80-1C88, U+0450-045F, U+0400-045F;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 450; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-450-latin-ext.1ad231aac0a8.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0260-027F, U+2150-215F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 450; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-450-latin.260c81a4759b.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: "Inter";
  font-style: normal; font-weight: 500; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-500-cyrillic.de93fdc85e3d.woff2") format("woff2");
  unicode-range: U+047F, U+0480-058F, U+2500-273F, U+1C80-1C88, U+0450-045F, U+0400-045F;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 500; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-500-latin-ext.1ad231aac0a8.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0260-027F, U+2150-215F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 500; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-500-latin.260c81a4759b.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: "Inter";
  font-style: normal; font-weight: 600; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-600-cyrillic.de93fdc85e3d.woff2") format("woff2");
  unicode-range: U+047F, U+0480-058F, U+2500-273F, U+1C80-1C88, U+0450-045F, U+0400-045F;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 600; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-600-latin-ext.1ad231aac0a8.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0260-027F, U+2150-215F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 600; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-600-latin.260c81a4759b.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: "Inter";
  font-style: normal; font-weight: 700; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-700-cyrillic.de93fdc85e3d.woff2") format("woff2");
  unicode-range: U+047F, U+0480-058F, U+2500-273F, U+1C80-1C88, U+0450-045F, U+0400-045F;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 700; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-700-latin-ext.1ad231aac0a8.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0260-027F, U+2150-215F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 700; font-display: swap; font-feature-settings: "tnum";
  src: url("../fonts/inter-700-latin.260c81a4759b.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,
:root[data-theme="dark"] {
  --bg: #11131d;
  --bg-raise: #151824;
  --surface: #1b1e2d;
  --surface-2: #222639;
  --surface-3: #262a40;
  --glass: rgba(27, 30, 45, 0.72);
  --glass-border: rgba(198, 167, 106, 0.18);

  --gold: #c6a76a;
  --gold-bright: #e4c88a;
  --gold-deep: #8f6f3a;
  --gold-soft: rgba(198, 167, 106, 0.16);
  --gold-line: rgba(198, 167, 106, 0.4);

  --lavender: #a99af5;
  --lavender-deep: #7d6de0;
  --lavender-soft: rgba(169, 154, 245, 0.14);
  --lavender-line: rgba(169, 154, 245, 0.4);

  --text: #e9e5dc;
  --text-soft: #c8c4b8;
  --muted: #8f96aa;
  --muted-2: #5f667c;

  --line: #2a2e42;
  --line-strong: #3a405c;
  --ok: #3fbf8f;
  --warn: #d9c15c;
  --error: #f07a6a;
  --error-soft: rgba(240, 122, 106, 0.14);

  --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 32px rgba(0, 0, 0, 0.35);
  --glow-gold: 0 0 40px rgba(198, 167, 106, 0.22);
  --glow-lavender: 0 0 44px rgba(169, 154, 245, 0.22);

  --grad-page: radial-gradient(1200px 700px at 70% -10%, rgba(169, 154, 245, 0.14), transparent 60%),
               radial-gradient(900px 600px at 12% 8%, rgba(201, 167, 106, 0.1), transparent 55%),
               #11131d;
  --grad-gold: linear-gradient(140deg, #e9d3a1 0%, #c6a76a 45%, #8f6f3a 100%);
  --grad-card: linear-gradient(165deg, #232739 0%, #1b1e2d 100%);
  --ring: 0 0 0 3px rgba(198, 167, 106, 0.35);
  --cosmos: radial-gradient(1px 1px at 20% 30%, rgba(233, 229, 220, 0.7) 40%, transparent 41%),
            radial-gradient(1px 1px at 78% 12%, rgba(233, 229, 220, 0.5) 40%, transparent 41%),
            radial-gradient(1.4px 1.4px at 62% 64%, rgba(233, 229, 220, 0.6) 40%, transparent 41%),
            radial-gradient(1px 1px at 34% 78%, rgba(233, 229, 220, 0.4) 40%, transparent 41%),
            radial-gradient(1.6px 1.6px at 88% 52%, rgba(198, 167, 106, 0.6) 40%, transparent 41%);

  --sidebar-w: 16.5rem;
  --header-h: 4.25rem;
}

/* ─── ТЕМА: светлая ───────────────────────────────────────────────────────── */
:root[data-theme="light"] {
  --bg: #f5f1e9;
  --bg-raise: #efeae0;
  --surface: #fffcf6;
  --surface-2: #f8f4ea;
  --surface-3: #efe9db;
  --glass: rgba(255, 252, 246, 0.8);
  --glass-border: rgba(125, 95, 40, 0.3);

  --gold: #7d5f28;
  --gold-bright: #8a6a2c;
  --gold-deep: #634f1d;
  --gold-soft: rgba(125, 95, 40, 0.14);
  --gold-line: rgba(125, 95, 40, 0.45);

  --lavender: #6f5ba8;
  --lavender-deep: #554586;
  --lavender-soft: rgba(111, 91, 168, 0.12);
  --lavender-line: rgba(111, 91, 168, 0.45);

  --text: #292536;
  --text-soft: #4d4860;
  --muted: #65604f;
  --muted-2: #a39e90;

  --line: #e9e1d5;
  --line-strong: #d6ccbc;
  --ok: #276b44;
  --warn: #7a5f0d;
  --error: #b13a2e;
  --error-soft: rgba(177, 58, 46, 0.1);

  --shadow: 0 24px 64px rgba(41, 37, 54, 0.14);
  --shadow-soft: 0 10px 32px rgba(41, 37, 54, 0.1);
  --glow-gold: 0 0 40px rgba(125, 95, 40, 0.25);
  --glow-lavender: 0 0 44px rgba(111, 91, 168, 0.25);

  --grad-page: radial-gradient(1100px 650px at 75% -10%, rgba(111, 91, 168, 0.09), transparent 60%),
               radial-gradient(900px 600px at 12% 8%, rgba(125, 95, 40, 0.1), transparent 55%),
               #f5f1e9;
  --grad-gold: linear-gradient(140deg, #d7b46c 0%, #b18a4a 50%, #7d5f28 100%);
  --grad-card: linear-gradient(165deg, #ffffff 0%, #fffcf6 100%);
  --ring: 0 0 0 3px rgba(125, 95, 40, 0.3);
  --cosmos: radial-gradient(1px 1px at 20% 30%, rgba(41, 37, 54, 0.18) 40%, transparent 41%),
            radial-gradient(1px 1px at 78% 12%, rgba(41, 37, 54, 0.14) 40%, transparent 41%),
            radial-gradient(1.3px 1.3px at 62% 64%, rgba(41, 37, 54, 0.16) 40%, transparent 41%),
            radial-gradient(1px 1px at 34% 78%, rgba(41, 37, 54, 0.12) 40%, transparent 41%);
}

/* ─── Токены, общие для тем ─────────────────────────────────────────────── */
:root {
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: "Inter", system-ui, sans-serif;

  --text-2xs: 0.6875rem;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: clamp(1.7rem, 4.2vw, 2.6rem);
  --text-3xl: clamp(2.5rem, 7vw, 4.25rem);
  --text-num: clamp(4.5rem, 18vw, 9rem);

  --container: 80rem;
  --sidebar-w: 16.5rem;
  --header-h: 4.25rem;
  --gutter: clamp(1rem, 3vw, 2rem);
  --section-pad: clamp(3rem, 7vw, 5.5rem);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --speed-fast: 0.16s;
  --speed: 0.28s;
  --speed-slow: 0.5s;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* outline-compatible focus ring for :focus-visible (3px solid <gold>) */
  --focus-ring: 3px solid var(--gold);
}
