/* Skinventry site system. Tokens mirror lib/theme.ts in the app repo:
   rose gold from the S on warm espresso. Nothing heavier than weight 600. */

/* Schibsted Grotesk, self hosted (SIL Open Font License 1.1), variable weight. */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/schibsted-grotesk-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: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/schibsted-grotesk-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;
}


:root {
  --bg: #F6F3F1;
  --surface: #FFFFFF;
  --surface-muted: #EFEAE7;
  --surface-raised: #FFFFFF;
  --ink: #1A1614;
  --ink-2: #645A55;
  --ink-3: #786D68;
  --line: #E7E0DC;
  --line-strong: #D5CCC7;
  --accent: #B9674F;
  --accent-text: #944634;
  --accent-soft: rgba(185, 103, 79, 0.13);
  --on-accent: #FFFFFF;
  --inverse: #1E1917;
  --on-inverse: #F6EFEB;
  --on-inverse-2: rgba(246, 239, 235, 0.62);
  --src-official: #645A55;
  --src-government: #3E5877;
  --src-independent: #6A557D;
  --src-official-soft: #EFEAE7;
  --src-government-soft: #E5EBF2;
  --src-independent-soft: #EEE8F3;
  --s-shadow: #933F34;
  --s-mid: #C67B69;
  --s-high: #E6A189;
  --shadow-lg: 0 30px 80px -40px rgba(58, 30, 20, 0.35);

  --r-card: 22px;
  --r-inner: 13px;
  --r-pill: 999px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #110F0E;
    --surface: #1A1716;
    --surface-muted: #231F1D;
    --surface-raised: #2A2523;
    --ink: #F6EFEB;
    --ink-2: #B5AAA5;
    --ink-3: #9A8D88;
    --line: #2F2926;
    --line-strong: #3F3734;
    --accent: #E3A08A;
    --accent-text: #EFB8A4;
    --accent-soft: rgba(227, 160, 138, 0.15);
    --on-accent: #1A1210;
    --inverse: #F6EFEB;
    --on-inverse: #1A1614;
    --on-inverse-2: rgba(26, 22, 20, 0.62);
    --src-official: #B5AAA5;
    --src-government: #9DB5D3;
    --src-independent: #C4AEDB;
    --src-official-soft: #2A2523;
    --src-government-soft: #1C2530;
    --src-independent-soft: #261F2D;
    --shadow-lg: 0 30px 80px -40px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #110F0E;
  --surface: #1A1716;
  --surface-muted: #231F1D;
  --surface-raised: #2A2523;
  --ink: #F6EFEB;
  --ink-2: #B5AAA5;
  --ink-3: #9A8D88;
  --line: #2F2926;
  --line-strong: #3F3734;
  --accent: #E3A08A;
  --accent-text: #EFB8A4;
  --accent-soft: rgba(227, 160, 138, 0.15);
  --on-accent: #1A1210;
  --inverse: #F6EFEB;
  --on-inverse: #1A1614;
  --on-inverse-2: rgba(26, 22, 20, 0.62);
  --src-official: #B5AAA5;
  --src-government: #9DB5D3;
  --src-independent: #C4AEDB;
  --src-official-soft: #2A2523;
  --src-government-soft: #1C2530;
  --src-independent-soft: #261F2D;
  --shadow-lg: 0 30px 80px -40px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.06; letter-spacing: -0.02em; text-wrap: balance; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-pill); text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.num { font-variant-numeric: lining-nums; }
table .num, td.num { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- type scale ---------- */

.display { font-size: clamp(44px, 7.4vw, 88px); line-height: 1.02; letter-spacing: -0.032em; font-weight: 600; }
.t1 { font-size: clamp(32px, 4.2vw, 50px); line-height: 1.08; letter-spacing: -0.025em; font-weight: 600; }
.t2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.12; font-weight: 600; letter-spacing: -0.018em; }
.t3 { font-size: 19px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.lede { font-size: clamp(19px, 1.9vw, 23px); line-height: 1.45; color: var(--ink-2); max-width: 34em; }
.small { font-size: 15px; line-height: 1.45; }
.foot { font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--ink-3); }
.muted { color: var(--ink-2); }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand span { font-weight: 600; font-size: 21px; letter-spacing: -0.025em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2); padding: 8px 12px; border-radius: var(--r-pill); }
.nav a:hover { color: var(--ink); background: var(--surface-muted); }
.nav .btn { margin-left: 8px; color: var(--on-inverse); }
.nav .btn:hover { color: var(--on-inverse); background: var(--inverse); }
@media (max-width: 720px) {
  .nav a:not(.btn) { display: none; }
}

.brand-mark { width: 24px; height: 24px; flex: none; color: var(--ink); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--inverse); color: var(--on-inverse);
  border: 0; border-radius: var(--r-pill);
  font-size: 16px; font-weight: 600; text-decoration: none; letter-spacing: -0.005em;
  cursor: pointer; transition: transform 0.15s ease, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn.small-btn { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn.btn-invert { background: #F6EFEB; color: #1A1614; }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.textlink { color: var(--accent-text); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ---------- source badges ---------- */

.src {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; line-height: 1; letter-spacing: 0.01em;
  padding: 6px 10px 6px 8px; border-radius: var(--r-pill);
  background: var(--surface-muted); color: var(--ink-2);
  text-decoration: none; white-space: nowrap; max-width: 100%;
}
.src svg { width: 14px; height: 14px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.src b { font-weight: 600; color: var(--ink); }
.src .pub { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
a.src:hover { filter: brightness(0.97); }
.src-official { color: var(--src-official); background: var(--src-official-soft); }
.src-government { color: var(--src-government); background: var(--src-government-soft); }
.src-independent { color: var(--src-independent); background: var(--src-independent-soft); }
.src-official b, .src-government b, .src-independent b { color: inherit; }
.srcs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ---------- sections ---------- */

.section { padding: clamp(80px, 11vw, 150px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .lede { margin-top: 20px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 56px 0 48px; margin-top: 40px; }
.site-footer .wrap { display: grid; gap: 32px; grid-template-columns: 1.4fr 2fr; align-items: start; }
.site-footer .tag { color: var(--ink-2); margin-top: 14px; max-width: 26em; font-size: 15px; }
.foot-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 24px; font-size: 15px; }
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.foot-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 28px; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .site-footer .wrap { grid-template-columns: 1fr; }
  .foot-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- simple pages (support, privacy, terms, 404) ---------- */

.page { padding: clamp(56px, 8vw, 96px) 0 40px; }
.page .wrap { max-width: 820px; }
.page h1 { margin-bottom: 20px; }
.page .lede { margin-bottom: 48px; }
.prose { font-size: 18px; line-height: 1.65; max-width: 68ch; }
.prose h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; margin: 52px 0 14px; }
.prose h3 { font-size: 19px; font-weight: 600; margin: 32px 0 10px; letter-spacing: -0.01em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.45em; }
.prose a { color: var(--accent-text); text-underline-offset: 3px; }
.prose strong { font-weight: 600; }
.panel { background: var(--surface); border-radius: var(--r-card); padding: clamp(22px, 3vw, 32px); }
.panel + .panel { margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
