﻿@layer tokens, base, components, layout, utilities;

@font-face {
  font-family: "Satoshi";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/satoshi-variable.woff2") format("woff2-variations"),
       url("../fonts/satoshi-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 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: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/inter-latin-wght-normal.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;
}

@layer tokens {
  :root {
    color-scheme: light;

    --navy-950: #0a1040;
    --navy-900: #0f1852;
    --navy-800: #141e63;
    --navy-700: #192675;
    --navy-600: #1a3a8d;
    --blue-600: #074ba1;
    --blue-500: #2a64c4;
    --blue-300: #9db8ff;
    --blue-100: #e3ebfb;
    --blue-50:  #f1f5fd;

    --orange-500: #ff4e00;
    --orange-600: #c43a00;
    --orange-700: #a33000;
    --orange-100: #ffe9df;

    --red-600: #c4171c;
    --red-100: #fde9ea;
    --green-700: #166c32;
    --green-100: #e6f4ea;
    --amber-800: #8a5300;
    --amber-100: #fff4d6;

    --gray-0:   #ffffff;
    --gray-50:  #f6f7fb;
    --gray-100: #eef0f5;
    --gray-200: #dde1ec;
    --gray-300: #c3c9d9;
    --gray-400: #9aa2b8;
    --gray-500: #6b7390;
    --gray-600: #4f5672;
    --gray-700: #373d56;
    --gray-800: #23283d;
    --gray-900: #1b2033;
    --gray-950: #0b0e18;

    --color-bg: var(--gray-50);
    --color-surface: var(--gray-0);
    --color-surface-2: var(--gray-100);
    --color-surface-inverse: var(--navy-900);
    --color-text: var(--gray-900);
    --color-text-muted: var(--gray-600);
    --color-text-inverse: #ffffff;
    --color-border: var(--gray-200);
    --color-border-strong: var(--gray-400);

    --color-primary: var(--navy-700);
    --color-primary-hover: var(--navy-900);
    --color-on-primary: #ffffff;
    --color-primary-soft: var(--blue-100);
    --color-accent: var(--orange-500);
    --color-accent-strong: var(--orange-600);
    --color-accent-strong-hover: var(--orange-700);
    --color-on-accent: #ffffff;
    --color-link: var(--blue-600);
    --color-link-hover: var(--navy-700);
    --color-focus: var(--orange-500);
    --color-danger: var(--red-600);
    --color-danger-hover: #9e1015;
    --color-on-danger: #ffffff;
    --color-nav: var(--navy-600);
    --color-nav-hover: var(--blue-600);

    --tone-neutral-fg: var(--gray-600);  --tone-neutral-bg: var(--gray-100);  --tone-neutral-bd: var(--gray-300);
    --tone-info-fg:    var(--navy-600);  --tone-info-bg:    #e8eefa;          --tone-info-bd:    #b7c7ec;
    --tone-success-fg: var(--green-700); --tone-success-bg: var(--green-100); --tone-success-bd: #a9d8b7;
    --tone-warning-fg: var(--amber-800); --tone-warning-bg: var(--amber-100); --tone-warning-bd: #f0cf7a;
    --tone-danger-fg:  var(--red-600);   --tone-danger-bg:  var(--red-100);   --tone-danger-bd:  #f1b3b6;

    --skeleton-base: var(--gray-100);
    --skeleton-shine: var(--gray-50);
    --backdrop: rgb(10 16 64 / 0.55);

    --font-sans: "Satoshi", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

    --text-xs: 0.8125rem;
    --text-sm: 0.84375rem;
    --text-base: 0.9375rem;
    --text-lg: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);
    --text-xl: clamp(1.0625rem, 1.02rem + 0.2vw, 1.1875rem);
    --text-2xl: clamp(1.25rem, 1.12rem + 0.5vw, 1.5625rem);
    --text-3xl: clamp(1.5rem, 1.3rem + 0.75vw, 2.0625rem);
    --text-4xl: clamp(1.875rem, 1.5rem + 1.4vw, 2.75rem);

    --nav-size: clamp(0.84375rem, 0.69rem + 0.2404vw, 0.90625rem);
    --nav-size-compact: 0.84375rem;
    --nav-weight: 400;
    --nav-tracking: 0.005em;
    --nav-leading: 1.2;

    --leading-tight: 1.15;
    --leading-snug: 1.3;
    --leading-normal: 1.55;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-black: 800;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 6rem;
    --section-gap: clamp(2.5rem, 4vw + 0.75rem, 4.5rem);

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgb(15 24 82 / 0.06), 0 1px 1px rgb(15 24 82 / 0.04);
    --shadow-md: 0 4px 12px -2px rgb(15 24 82 / 0.10), 0 2px 4px -2px rgb(15 24 82 / 0.06);
    --shadow-lg: 0 18px 40px -12px rgb(15 24 82 / 0.25), 0 6px 12px -6px rgb(15 24 82 / 0.10);
    --ring: 0 0 0 3px var(--color-focus);

    --container-max: 88rem;
    --container-narrow: 48rem;
    --gutter: clamp(1rem, 3vw, 2rem);
    --header-h: 4.5rem;
    --control-h: 2.75rem;
    --control-h-sm: 2.375rem;

    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
    --duration-fast: 120ms;
    --duration-base: 200ms;
    --duration-slow: 320ms;

    --z-header: 50;
    --z-dialog: 100;
  }

  :root[data-theme="dark"] {
      color-scheme: dark;
      --color-bg: var(--gray-950);
      --color-surface: #151927;
      --color-surface-2: #1d2236;
      --color-surface-inverse: #070a1c;
      --color-text: #e8eaf2;
      --color-text-muted: #a3aac2;
      --color-text-inverse: #ffffff;
      --color-border: #2c3350;
      --color-border-strong: #4a5276;

      --color-primary: #3a5bd0;
      --color-primary-hover: #4d6fe6;
      --color-on-primary: #ffffff;
      --color-primary-soft: #1a2350;
      --color-accent: #ff6a26;
      --color-accent-strong: var(--orange-600);
      --color-accent-strong-hover: #d84300;
      --color-link: var(--blue-300);
      --color-link-hover: #c6d6ff;
      --color-focus: #ff8a4c;
      --color-danger: #e5484d;
      --color-danger-hover: #f2555a;
      --color-nav: #d3ddf7;
      --color-nav-hover: #ffffff;

      --tone-neutral-fg: #c2c8dc; --tone-neutral-bg: #1f2436; --tone-neutral-bd: #3a4160;
      --tone-info-fg:    #a9c1ff; --tone-info-bg:    #141d3a; --tone-info-bd:    #2d3f7a;
      --tone-success-fg: #7ad893; --tone-success-bg: #10261a; --tone-success-bd: #24573a;
      --tone-warning-fg: #ffc95c; --tone-warning-bg: #2a2110; --tone-warning-bd: #5e4818;
      --tone-danger-fg:  #ff8a8f; --tone-danger-bg:  #2c1416; --tone-danger-bd:  #6a2a2e;

      --skeleton-base: #1d2236;
      --skeleton-shine: #262c45;
      --backdrop: rgb(0 0 0 / 0.65);

      --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
      --shadow-md: 0 6px 16px -4px rgb(0 0 0 / 0.5);
      --shadow-lg: 0 20px 44px -12px rgb(0 0 0 / 0.65);
  }
}
