/*
  Shared look for redesigned pages (home, start, …). Loaded after style.css, before any page CSS.
  Pages opt in with <body class="sr">. Theme comes from theme.js (data-theme on <html>).
*/

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('assets/fonts/bricolage-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('assets/fonts/bricolage-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;
}

/* ---------- tokens ---------- */
:root {
  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --h-bg: #f5f8fc;
  --h-surface: #ffffff;
  --h-fg: #0d1b2e;
  --h-muted: #5b6b80;
  --h-line: #dfe7f1;
  --h-blue: #1f7fe0;
  --h-ok: #17a673;
  --h-warm: #ffcf6b;
  --h-glow-card: rgba(31, 127, 224, 0.14);
}
:root[data-theme="dark"] {
  --h-bg: #08121f;
  --h-surface: #0e1d33;
  --h-fg: #eef4fb;
  --h-muted: #93a7c0;
  --h-line: #1d3350;
  --h-blue: #2f9bff;
  --h-ok: #3ee69a;
  --h-glow-card: rgba(47, 155, 255, 0.2);
}

body.sr { background: var(--h-bg); color: var(--h-fg); transition: background .6s, color .6s; }
body.sr .header { background: var(--h-bg); border-bottom-color: var(--h-line); }
body.sr .footer { border-top: 1px solid rgba(255,255,255,.06); }
body.sr .btn-primary { background: var(--h-blue); }
body.sr .btn-primary:hover { filter: brightness(1.08); }
body.sr :focus-visible { outline: 2px solid var(--h-blue); outline-offset: 3px; }

/* ---------- type & sections ---------- */
.sr-section { padding: 88px 0; }
.sr-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--h-blue); }
.sr-h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(38px, 6vw, 72px); line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }
.sr-h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.sr-lede { color: var(--h-muted); font-size: 17px; max-width: 52ch; }
.sr-head { display: grid; gap: 12px; margin-bottom: 40px; max-width: 640px; }
.sr-head.center { margin-inline: auto; text-align: center; justify-items: center; }

/* page hero for inner pages */
.sr-page-hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.sr-page-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 300px at 50% 0%, var(--h-glow-card), transparent 70%),
    radial-gradient(circle, color-mix(in srgb, var(--h-blue) 22%, transparent) 1px, transparent 1.5px) 0 0 / 22px 22px;
  mask-image: linear-gradient(#000, transparent 85%); }
.sr-page-hero .container { position: relative; display: grid; gap: 14px; justify-items: center; text-align: center; }
.sr-page-hero .sr-lede { font-size: 19px; }

/* ---------- cards: border, surface, glow follows the cursor (ui.js) ---------- */
.sr-card { position: relative; overflow: hidden; background: var(--h-surface); border: 1px solid var(--h-line); border-radius: 20px; transition: transform .3s, border-color .3s; }
.sr-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), var(--h-glow-card), transparent 60%); }
.sr-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--h-blue) 55%, var(--h-line)); }
.sr-card:hover::before { opacity: 1; }

/* ---------- final call-to-action box ---------- */
.sr-cta-box { text-align: center; border: 1px solid var(--h-line); border-radius: 28px; padding: 64px 24px; background: radial-gradient(520px 260px at 50% 0%, var(--h-glow-card), transparent 70%), var(--h-surface); display: grid; gap: 14px; justify-items: center; }
.sr-cta-box p { color: var(--h-muted); max-width: 46ch; margin-bottom: 10px; }

/* ---------- segmented switch (e.g. plan length) ---------- */
.sr-switch { display: inline-flex; position: relative; background: var(--h-surface); border: 1px solid var(--h-line); border-radius: 999px; padding: 4px; }
.sr-switch button { position: relative; z-index: 1; background: none; border: 0; color: var(--h-muted); font: 600 14px inherit; font-family: inherit; padding: 8px 18px; border-radius: 999px; cursor: pointer; transition: color .2s; }
.sr-switch button[aria-pressed="true"] { color: #fff; }
.sr-switch .pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: 0; border-radius: 999px; background: var(--h-blue); transition: left .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1); }

/* scroll-driven entrance where supported; content is fully visible without it */
@supports (animation-timeline: view()) {
  .rise-in { animation: sr-up linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  @keyframes sr-up { from { transform: translateY(36px); } to { transform: none; } }
}

@media (max-width: 640px) {
  .sr-section { padding: 60px 0; }
  .sr-page-hero { padding: 52px 0 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .rise-in { animation: none !important; }
  .sr-card, .sr-switch .pill { transition: none; }
}

/* ---------- SpotFox mascot slot: stays collapsed until an <img> is placed inside ---------- */
.fox-slot:empty { display: none; }
.fox-slot img { display: block; width: 100%; height: auto; }

/* ---------- carousel dots (ui.js carousel) ---------- */
.sr-dots { display: none; justify-content: center; gap: 8px; margin-top: 16px; }
.sr-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--h-fg) 22%, transparent); cursor: pointer; transition: width .3s, background .3s; }
.sr-dot.on { width: 22px; background: var(--h-blue); }

/* ---------- 404 ---------- */
.nf { min-height: 72vh; display: grid; align-items: center; padding: 56px 0; }

.nf-copy { display: grid; gap: 14px; justify-items: center; text-align: center; max-width: 640px; margin-inline: auto; }
.nf-code { font-family: var(--font-display); font-weight: 800; font-size: clamp(64px, 10vw, 112px); line-height: .9; letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 2px var(--h-blue); }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
body.sr .nf .btn-outline { color: var(--h-blue); border-color: var(--h-blue); }
