/* Design tokens.

   Style: Swiss minimal. No background effects -- structure comes from the surfaces
   themselves. Sections alternate between two flat grounds (--bg and --bg-alt), each
   separated by a hairline, and the hero and footer sit on a deep band (--band) so the
   page reads as a clear stack of blocks.

   Palette: "Arctic reflection" -- steel blue #5289AD, deep slate #243C4C, frost
   #ACBCBF, ice #F4FCFB and slate teal #698696. Light mode sits on cool ice grounds
   with slate ink and a deep-slate band (header/hero/footer); steel blue is the
   primary accent, slate teal labels sections, and the brand mark runs steel blue
   into deep slate. Dark mode swaps to near-black slates with frost text.
   Text-bearing shades are deepened/lightened from the palette so every pairing
   clears WCAG AA (4.5:1).

   Light mode deliberately avoids pure white: the lightest ground is a cool ice and
   cards sit a shade below it, so the page does not glare.

   Mode: the inline script in index.html resolves light/dark before first paint and
   writes data-theme, so the two blocks below are the only palette definitions. */

:root {
  /* Apple's SF Pro where it exists (macOS/iOS Safari & Chrome), Inter elsewhere. */
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "Geist Mono", Menlo, monospace;

  --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: 4.5rem;
  --space-9: 6rem;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  --tap: 44px;
  --shell-max: 1160px;
  --header-h: 64px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 180ms var(--ease-out);
}

/* ── Light ──────────────────────────────────────────────────────────────── */
:root,
:root[data-theme="light"] {
  color-scheme: light;

  /* No #fff anywhere: cool ice grounds (from #F4FCFB), cards a shade below the page. */
  --bg:        #eef5f6;
  --bg-alt:    #e4edef;
  --surface:   #e7eff1;
  --surface-2: #dce6e9;
  --surface-hover: #d0dde1;

  /* One deep slate (drawn from #243C4C) behind header, hero and footer, so the
     top and bottom of the stack read as a single frame. */
  --band:        #13222c;
  --band-2:      #243c4c;
  --band-text:   #f4fcfb;
  --band-soft:   #c9d6d9;
  --band-line:   rgba(172, 188, 191, 0.18);

  --header-bg:   var(--band);
  --header-2:    var(--band-2);
  --footer-bg:   var(--band);

  /* Hero: a step lighter than the frame, so the intro lifts off header and footer. */
  --hero-bg:     #182a36;
  --hero-2:      #2a4555;

  --text:      #15242e;
  --text-soft: #344e5d;
  --text-mute: #475f6d;

  --line:        #cfdcdf;
  --line-strong: #acbcbf;  /* frost */

  --accent:      #3d6f93;  /* steel blue #5289AD, deepened for 5.2:1 under ice ink */
  --accent-hover:#2c5674;
  --accent-ink:  #f4fcfb;
  --accent-soft: #d6e5ef;
  --accent-text: #325f80;

  --accent-2:      #243c4c;  /* deep slate */
  --accent-2-soft: #d9e3e7;
  --accent-2-text: #243c4c;

  --accent-3:      #698696;  /* slate teal */
  --accent-3-soft: #dbe6ea;
  --accent-3-text: #3e6070;  /* deepened: #698696 is only 3.6:1 on ice */

  --band-accent:       #9cc6e0;
  --band-accent-hover: #f4fcfb;

  /* Brand mark ("HN" box + favicon): steel blue into deep slate, same in both modes. */
  --brand:      #5289ad;
  --brand-deep: #243c4c;
  --brand-ink:  #f4fcfb;

  --ok:     #3e6070;
  --danger: #a8392f;

  --shadow-sm: 0 1px 2px rgba(21, 36, 46, 0.06);
  --shadow-md: 0 1px 2px rgba(21, 36, 46, 0.05), 0 10px 28px -16px rgba(21, 36, 46, 0.3);
}

/* ── Dark ───────────────────────────────────────────────────────────────── */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:        #111b22;
  --bg-alt:    #152129;
  --surface:   #17242d;
  --surface-2: #1d2c36;
  --surface-hover: #253743;

  --band:        #0b141a;
  --band-2:      #172630;
  --band-text:   #e6f0f1;
  --band-soft:   #b8c7cb;
  --band-line:   rgba(172, 188, 191, 0.12);

  --header-bg:   var(--band);
  --header-2:    var(--band-2);
  --footer-bg:   var(--band);
  --hero-bg:     var(--band);
  --hero-2:      var(--band-2);

  --text:      #e6f0f1;
  --text-soft: #b8c7cb;
  --text-mute: #97aab1;

  --line:        #23333d;
  --line-strong: #324651;

  --accent:      #86b5d4;
  --accent-hover:#b0cfe3;
  --accent-ink:  #0f1d26;
  --accent-soft: #1a2d3b;
  --accent-text: #86b5d4;

  --accent-2:      #acbcbf;
  --accent-2-soft: #1f2c33;
  --accent-2-text: #c1ced1;

  --accent-3:      #8fb3c3;
  --accent-3-soft: #172a33;
  --accent-3-text: #8fb3c3;

  --band-accent:       #86b5d4;
  --band-accent-hover: #b0cfe3;

  --brand:      #5289ad;
  --brand-deep: #243c4c;
  --brand-ink:  #f4fcfb;

  --ok:     #8fb3c3;
  --danger: #f0938c;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -16px rgba(0, 0, 0, 0.8);
}
