/* ============================================================
   PACY — DESIGN TOKENS
   ------------------------------------------------------------
   The shell is stadium-at-night; content sits on pale surfaces.
   That inversion is deliberate: scores read fastest on light
   panels, while dark chrome keeps the eye off navigation.
   ============================================================ */

/* Self-hosted Sora + Inter (variable, 400–700): no render-blocking
   third-party stylesheet; browsers fetch only the subsets a page uses. */
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url(../fonts/inter-cyrillic-ext.woff2) format('woff2');unicode-range:U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url(../fonts/inter-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url(../fonts/inter-greek-ext.woff2) format('woff2');unicode-range:U+1F00-1FFF}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url(../fonts/inter-greek.woff2) format('woff2');unicode-range:U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url(../fonts/inter-vietnamese.woff2) format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url(../fonts/inter-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url(../fonts/inter-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:'Sora';font-style:normal;font-weight:400 700;font-display:swap;src:url(../fonts/sora-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Sora';font-style:normal;font-weight:400 700;font-display:swap;src:url(../fonts/sora-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 {
  /* Tell the browser this page manages its own light/dark, so it renders
     native controls/scrollbars for the active theme and does NOT force-dark
     the light theme (which left a half-dark, mismatched page on some phones). */
  color-scheme: light;

  /* --- brand ------------------------------------------------ */
  --midnight:   #071B33;
  --deep-navy:  #0A2A52;
  --med-blue:   #174A7E;
  --electric:   #2563EB;
  --soft-white: #F7FAFF;
  --white:      #FFFFFF;

  /* Derived steps. Kept as explicit values rather than computed
     so every surface in the app is a named decision. */
  --navy-900: #04101F;
  --navy-800: var(--midnight);
  --navy-700: #08223F;
  --navy-600: var(--deep-navy);
  --navy-500: #10375F;
  --navy-400: var(--med-blue);
  --navy-300: #2A6099;

  --blue-600: #1D4FD8;
  --blue-500: var(--electric);
  --blue-400: #4E7FF3;
  --blue-300: #7FA5F8;
  --blue-100: #DCE7FD;
  --blue-050: #EEF3FE;

  /* --- semantic surfaces ------------------------------------ */
  /* The shell is the app frame — header, footer, page background and the
     backdrop the scores float on. In LIGHT theme it is light, so switching
     themes actually whitens the whole page; the dark values live in the
     [data-theme="dark"] block. Anything painting a shell surface must use
     these tokens (or --shell-strong / --shell-hover) rather than a raw navy,
     or it will stay dark in light theme. */
  --shell:         var(--soft-white);
  --shell-raised:  var(--white);
  --shell-strong:  var(--white);          /* solid header / footer bars */
  --shell-line:    #E2E9F5;
  --shell-hover:   rgba(11, 27, 48, .05); /* subtle overlay on the shell */
  --shell-hover-2: rgba(11, 27, 48, .09); /* stronger overlay / active */

  --surface:      var(--white);
  --surface-sunk: var(--soft-white);
  --surface-line: #E2E9F5;
  --surface-line-strong: #CBD7EA;

  /* --- text ------------------------------------------------- */
  --ink:        #0B1B30;
  --ink-mid:    #48607F;
  --ink-soft:   #6B819D;
  --ink-faint:  #93A4BC;

  /* On a light shell, "on-shell" text is simply the page ink. */
  --on-shell:        var(--ink);
  --on-shell-mid:    var(--ink-mid);
  --on-shell-soft:   var(--ink-soft);

  /* Text for surfaces that are ALWAYS dark regardless of theme — the news
     masthead, the desk panel, the dark feature cards. These never flip, so
     their text cannot use --on-shell (which now follows the theme). */
  --on-dark:      #EAF1FB;
  --on-dark-mid:  #9DB2CE;
  --on-dark-soft: #6D849F;

  /* --- status ----------------------------------------------- */
  --live:         #E5352B;
  --live-soft:    #FDECEA;
  --upcoming:     var(--med-blue);
  --upcoming-soft:#EAF0F9;
  --finished:     #52708F;
  --finished-soft:#EDF1F7;
  --warn:         #B25E00;
  --warn-soft:    #FFF3E4;
  --danger:       #B3261E;
  --good:         #0E7C55;
  --good-soft:    #E6F5EF;

  /* --- typography ------------------------------------------- */
  --font-display: "Sora", "Manrope", system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fluid scale. Floors respect the brief's minimums:
     body never below 16px, metadata never below 14px. */
  --t-score:    clamp(2.5rem, 1.6rem + 3.4vw, 4rem);      /* 40 → 64 */
  --t-score-sm: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --t-h1:       clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  --t-h2:       clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem);  /* 24 → 36 */
  --t-h3:       clamp(1.125rem, 1rem + .5vw, 1.375rem);
  --t-team:     clamp(1.125rem, 1rem + .6vw, 1.375rem);   /* 18 → 22 */
  --t-body:     1rem;                                      /* 16 */
  --t-meta:     .875rem;                                   /* 14 */
  --t-micro:    .75rem;   /* uppercase labels only, never prose */

  --lh-tight: 1.05;
  --lh-snug:  1.25;
  --lh-body:  1.55;

  --track-tight: -.02em;
  --track-label: .09em;

  /* --- space ------------------------------------------------ */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 20px;  --s-6: 24px;  --s-7: 32px;  --s-8: 40px;
  --s-9: 56px;  --s-10: 72px; --s-11: 96px;

  /* --- shape ------------------------------------------------ */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Minimum interactive size (WCAG 2.2 target size). */
  --tap: 44px;

  /* --- elevation -------------------------------------------- */
  --sh-1: 0 1px 2px rgba(7, 27, 51, .06),
          0 1px 3px rgba(7, 27, 51, .04);
  --sh-2: 0 2px 4px rgba(7, 27, 51, .05),
          0 6px 16px rgba(7, 27, 51, .07);
  --sh-3: 0 4px 8px rgba(7, 27, 51, .06),
          0 16px 40px rgba(7, 27, 51, .12);
  --sh-shell: 0 8px 32px rgba(4, 16, 31, .45);

  /* --- motion ----------------------------------------------- */
  /* Lightning is two-toned: an electric blue core with a warm amber
     edge. A single blue reads as a UI outline; the warm second tone
     is what makes it read as a strike. */
  --bolt-core: #7FC4FF;
  --bolt-hot:  #FFB020;
  --bolt-deep: var(--electric);

  --ease-out:  cubic-bezier(.22, .8, .3, 1);
  --ease-in-out: cubic-bezier(.6, 0, .3, 1);
  --ease-spring: cubic-bezier(.2, .9, .3, 1.35);

  --d-fast: 140ms;
  --d-med:  240ms;
  --d-slow: 420ms;
  /* Lightning Reveal total budget — brief specifies 700–1000ms. */
  --d-reveal: 900ms;
  --d-pulse:  620ms;

  /* --- layout ----------------------------------------------- */
  --page-max: 1360px;
  --content-max: 1080px;
  --header-h: 64px;
  --controls-h: 116px;
  --bottomnav-h: 62px;
}

/* ============================================================
   THE FACET MOTIF
   ------------------------------------------------------------
   The logo is a square cut into triangular planes at different
   blue values. Rather than reproduce it literally, the planes
   become a surface treatment: two hard-edged diagonal gradients
   that read as folded geometry rather than a soft glow.

   Used only on: page headers, skeletons, selected nav, empty
   states, and card detail edges. Not a general background.
   ============================================================ */

.facet {
  position: relative;
  isolation: isolate;
  background-color: var(--shell);
  background-image:
    linear-gradient(148deg,
      rgba(37, 99, 235, .30) 0%,
      rgba(37, 99, 235, .30) 26%,
      transparent 26.4%),
    linear-gradient(214deg,
      rgba(23, 74, 126, .55) 0%,
      rgba(23, 74, 126, .55) 42%,
      transparent 42.4%),
    linear-gradient(28deg,
      rgba(10, 42, 82, .70) 0%,
      rgba(10, 42, 82, .70) 34%,
      transparent 34.4%);
}

/* A single lightning bolt cut, matching the logo's negative space.
   Applied as a mask-friendly clip path on decorative elements. */
.bolt-clip {
  clip-path: polygon(58% 0%, 22% 52%, 46% 52%, 34% 100%, 78% 42%, 52% 42%);
}

/* ============================================================
   DARK CONTENT THEME
   Content surfaces invert; the shell is already dark.
   ============================================================ */

[data-theme="dark"] {
  color-scheme: dark;
  /* The shell returns to navy in dark theme; every shell token flips back so
     the frame, overlays and on-shell text stay legible on a dark bar. */
  --shell:         var(--navy-800);
  --shell-raised:  var(--navy-700);
  --shell-strong:  var(--navy-900);
  --shell-line:    rgba(255, 255, 255, .10);
  --shell-hover:   rgba(255, 255, 255, .07);
  --shell-hover-2: rgba(255, 255, 255, .12);

  --on-shell:      #EAF1FB;
  --on-shell-mid:  #9DB2CE;
  --on-shell-soft: #6D849F;

  --surface:      #0D2340;
  --surface-sunk: #0A1C33;
  --surface-line: rgba(255, 255, 255, .10);
  --surface-line-strong: rgba(255, 255, 255, .18);

  --ink:       #EAF1FB;
  --ink-mid:   #A9BDD8;
  --ink-soft:  #8299B7;
  --ink-faint: #62789A;

  --live-soft:     rgba(229, 53, 43, .16);
  --upcoming-soft: rgba(23, 74, 126, .34);
  --finished-soft: rgba(82, 112, 143, .20);
  --warn-soft:     rgba(178, 94, 0, .20);
  --good-soft:     rgba(14, 124, 85, .20);
  --blue-050:      rgba(37, 99, 235, .14);
  --blue-100:      rgba(37, 99, 235, .26);

  --sh-1: 0 1px 2px rgba(0, 0, 0, .35);
  --sh-2: 0 2px 6px rgba(0, 0, 0, .38), 0 8px 22px rgba(0, 0, 0, .30);
  --sh-3: 0 8px 20px rgba(0, 0, 0, .45), 0 24px 60px rgba(0, 0, 0, .40);
}
