/* SvarKlar shared CHROME: the one header + footer, used on every page (main pages + /resources).
   Self-contained: carries its own tokens so it renders even on the resources pages, which do NOT
   load styles.css. Loaded on every page (build-preview.py injects /chrome.css). The header/footer
   rules are the home version, lifted from styles.css; styles.css still has its own copies (harmless
   duplicate on the main pages, chrome.css loads last + wins). Delete those copies from styles.css at
   go-live. ponytail: one markup partial + one stylesheet = one header, no per-page drift. */

/* Self-hosted Schibsted Grotesk (variable, weights 400-800) + Tanker wordmark. Declared HERE because
   chrome.css is the ONLY stylesheet on every page (main + /resources + legal + /book), so one set
   self-hosts the whole site with zero external font requests. Absolute /assets/fonts/ paths resolve
   from chrome.css at the site root on every page depth. unicode-ranges are Google's css2 latin /
   latin-ext split; each page <head> also preloads the latin woff2. ponytail: one source, no drift. */
@font-face { font-family: "Schibsted Grotesk"; src: url("/assets/fonts/schibsted-grotesk-latin.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; 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"; src: url("/assets/fonts/schibsted-grotesk-latin-ext.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; 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: "Tanker"; src: url("/assets/fonts/Tanker-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  /* ============================================================
     SINGLE SOURCE of shared design tokens for the whole site.
     chrome.css is the only stylesheet injected on EVERY page
     (build-preview.py), so the shared palette/fonts/effects live
     here. styles.css (main pages) and resources.css (/resources)
     consume these. A reskin = edit the values below, in one place.
     The --c-* / --r-* names are thin aliases kept so existing rules
     in this sheet and resources.css need no rewrite. */

  /* fonts */
  --headline-font: "Schibsted Grotesk", system-ui, sans-serif;
  --body-font: "Schibsted Grotesk", system-ui, sans-serif;
  --wordmark-font: "Tanker", system-ui, sans-serif;
  --headline-weight: 500;

  /* palette */
  --color-dark: #1c1917;
  --color-dark-2: #292524;
  --color-pop: #fbbf24;
  --color-pop-rgb: 251, 191, 36;        /* rgba(var(--color-pop-rgb), a) for amber overlays */
  --color-on-dark: #f3ece1;
  --color-on-pop: #422006;
  --color-accent: #b45309;
  --color-accent-rgb: 180, 83, 9;
  --color-surface: #faf7f2;
  --color-surface-2: #f4efe6;
  --color-card-soft: #fcfaf4;
  --color-paper: #fffdf9;               /* warm off-white card bg (was --r-paper / hire-card hex) */
  --color-heading: #1c1917;
  --color-text: #2b2622;
  --color-bg: #ffffff;
  --color-text-muted: #78716c;
  --color-border: #e7e1d8;
  --color-border-warm: #e8e0cf;
  --color-surface-accent: #f5efe4;
  --color-border-accent-hover: #ddd0bb;
  --color-border-on-dark: rgba(255, 255, 255, 0.12);
  --logo-svar: #1c1917;

  /* effects */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --header-shadow: 0 8px 16px rgba(28, 25, 23, 0.03);
  --border-pop: 2px solid var(--color-dark);
  --shadow-pop: 5px 5px 0 rgba(28, 25, 23, 0.92);
  --shadow-pop-sm: 3px 3px 0 rgba(28, 25, 23, 0.9);

  /* logo mark fills (inline SVG on every page) */
  --logo-mark: var(--color-accent);
  --logo-cream: #f7efe0;
  --logo-ink: #2b211a;

  /* aliases: existing rules use --c-*; keep them pointing at the master */
  --c-body-font: var(--body-font);
  --c-wordmark-font: var(--wordmark-font);
  --c-dark: var(--color-dark);
  --c-dark-2: var(--color-dark-2);
  --c-pop: var(--color-pop);
  --c-on-dark: var(--color-on-dark);
  --c-on-pop: var(--color-on-pop);
  --c-accent: var(--color-accent);
  --c-bg: var(--color-bg);
  --c-heading: var(--color-heading);
  --c-border: var(--color-border);
  --c-border-on-dark: var(--color-border-on-dark);
  --c-surface-2: var(--color-surface-2);
  --c-logo-svar: var(--logo-svar);
  --c-ease: var(--ease);
  --c-header-shadow: var(--header-shadow);
}

/* scoped resets so the chrome looks the same on both stylesheet worlds */
.site-header ul,
.mobile-menu ul,
.ftr ul { list-style: none; margin: 0; padding: 0; }
.site-header a,
.mobile-menu a,
.ftr a { text-decoration: none; color: inherit; }
.menu-btn { font: inherit; border: none; cursor: pointer; }

/* smooth in-page scroll on every page (anchor jumps glide: skip-link, /win#enter,
   /book#cal-inline). One source here since chrome.css loads on every page. Reduced-motion
   opt-out lives in the media block below. */
html { scroll-behavior: smooth; }

/* skip link */
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--c-dark); color: var(--c-on-dark);
  padding: 8px 16px; border-radius: 9999px; transition: top 0.2s var(--c-ease);
}
.skip-link:focus { top: 16px; }

/* keyboard focus ring on every page. styles.css carries its own copy; defining it here also
   covers the /resources pages, which do not load styles.css. */
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* shared dark CTA pill */
.btn-pill {
  position: relative; display: inline-flex; align-items: center; justify-content: space-between;
  gap: 20px; background: var(--c-dark); border-radius: 9999px; padding: 6px 6px 6px 24px;
  overflow: hidden; cursor: pointer;
}
.btn-label {
  position: relative; z-index: 10; font-family: var(--c-body-font);
  font-size: 16px; font-weight: 500; color: var(--c-on-dark); white-space: nowrap;
}
.btn-bg {
  position: absolute; inset: 0; z-index: 0; background: var(--c-dark-2);
  border-radius: 9999px; transform: translateX(0); transition: transform 0.5s var(--c-ease);
}
.btn-pill:hover .btn-bg { transform: translateX(-100%); }
.btn-circle {
  position: relative; z-index: 10; flex: 0 0 auto; width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px;
  background: var(--c-pop); color: var(--c-on-pop);
}
.btn-circle svg { transition: transform 0.3s var(--c-ease); }
.btn-pill:hover .btn-circle svg { transform: rotate(-45deg); }

/* header: fixed floating pill -> docked bar on scroll */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 30;
  display: flex; justify-content: center; align-items: center; padding: 20px 24px;
  background: transparent;
  transition: padding 0.5s var(--c-ease), background-color 0.3s var(--c-ease), box-shadow 0.3s var(--c-ease);
}
.site-header.scrolled { padding-top: 0; padding-bottom: 0; background: var(--c-bg); box-shadow: var(--c-header-shadow); }
.site-header.scrolled .header-bar { box-shadow: none; }
.header-bar {
  position: relative; z-index: 40; display: flex; flex: 1; align-items: center;
  justify-content: space-between; height: 64px; padding: 0 24px; background: var(--c-bg);
  border-radius: 9999px; box-shadow: var(--c-header-shadow);
}
.logo { display: inline-flex; align-items: center; gap: 9px; }
.logo-mark { width: 30px; height: 30px; border-radius: 7px; }
.logo-wm { font-family: var(--c-wordmark-font); font-size: 23px; font-weight: 500; letter-spacing: -0.01em; line-height: 1; }
.logo-svar { color: var(--c-logo-svar); }
.logo-klar { color: var(--c-accent); }
.nav-desktop { display: none; }
.nav-desktop ul { display: flex; gap: 32px; }
.nav-desktop a { font-family: var(--c-body-font); font-size: 16px; font-weight: 400; color: var(--c-heading); transition: color 0.15s var(--c-ease); }
.nav-desktop a:hover { color: var(--c-accent); }
.nav-cta { display: none; }
/* bare orange hamburger that morphs to an X on open (pure CSS, transform + opacity only,
   GPU-cheap). Faint accent-tint bg on hover. Fred 2026-06-23 */
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 8px;
  min-width: 44px; min-height: 44px;
  background: none; color: var(--c-accent); border-radius: 9999px;
  transition: background-color 0.2s var(--c-ease);
}
.menu-btn:hover { background: color-mix(in srgb, var(--c-accent) 10%, transparent); }
.burger { position: relative; display: block; width: 24px; height: 16px; }
.burger span {
  position: absolute; left: 0; width: 100%; height: 3px; border-radius: 2px; background: currentColor;
  transition: transform 0.25s var(--c-ease), opacity 0.2s var(--c-ease);
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 50%; margin-top: -1.5px; }
.burger span:nth-child(3) { bottom: 0; }
.menu-btn[aria-expanded="true"] .burger span:nth-child(1) { top: 50%; margin-top: -1.5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .burger span:nth-child(3) { bottom: auto; top: 50%; margin-top: -1.5px; transform: rotate(-45deg); }

@media (min-width: 641px) {
  .header-bar { padding-right: 12px; }
  .nav-desktop, .nav-cta { display: flex; }
  .menu-btn { display: none; }
}
@media (min-width: 1101px) { .header-bar { max-width: 1280px; } }

/* mobile menu: full-screen blurred backdrop + white rounded panel under the header.
   Centered nav with air, full-width centered CTA, hamburger->X on open (Fred 2026-06-23) */
.mobile-menu { display: none; }
@media (max-width: 640px) {
  .mobile-menu.open {
    display: block; position: fixed; inset: 0; z-index: 29;
    background: rgba(28, 25, 23, 0.28);
    -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  }
  .mobile-panel { margin: 88px 16px 0; background: var(--c-bg); border-radius: 20px; padding: 8px 24px 28px; }
  .mobile-menu ul { display: flex; flex-direction: column; }
  .mobile-menu nav a {
    display: block; text-align: center;
    font-family: var(--c-body-font); font-size: 18px; font-weight: 500;
    color: var(--c-heading); padding: 18px 0; border-bottom: 1px solid var(--c-border);
    transition: color 0.15s var(--c-ease);
  }
  .mobile-menu nav a:hover { color: var(--c-accent); }
  .mobile-menu .btn-pill {
    display: flex; width: 100%; justify-content: center; gap: 12px; margin-top: 24px; padding: 12px 24px;
  }
}
@media (min-width: 641px) { .mobile-menu { display: none !important; } }

/* footer */
.ftr { background: var(--c-dark); position: relative; }
.ftr::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c-accent) 65%, transparent), transparent);
}
.ftr-inner { max-width: 1280px; margin: 0 auto; padding: 40px 24px 0; }
.ftr-top { display: flex; flex-direction: column; gap: 48px; justify-content: space-between; }
.ftr-brand { display: flex; flex-direction: column; gap: 20px; }
.ftr-logo { display: inline-flex; align-items: center; gap: 9px; }
.ftr-logo-mark { width: 38px; height: 38px; border-radius: 9px; }
.ftr-logo-wm { font-family: var(--c-wordmark-font); font-size: 28px; font-weight: 500; letter-spacing: -0.01em; line-height: 1; }
.ftr-logo-svar { color: var(--c-on-dark); }
.ftr-logo-klar { color: var(--c-accent); }
.ftr-tagline { margin: 0; font-family: var(--c-body-font); font-size: 16px; font-weight: 400; line-height: 1.5; color: var(--c-on-dark); max-width: 260px; }
.ftr-cols { display: flex; flex-direction: column; gap: 40px; }
.ftr-col h3 { margin: 0 0 20px; font-family: var(--c-body-font); font-size: 16px; font-weight: 600; color: var(--c-bg); letter-spacing: -0.01em; }
.ftr-col ul { display: flex; flex-direction: column; gap: 10px; }
.ftr-col a { font-family: var(--c-body-font); font-size: 20px; font-weight: 400; line-height: 1.3; color: var(--c-on-dark); transition: color 0.15s var(--c-ease); }
.ftr-col a:hover { color: var(--c-accent); }
.ftr-legal {
  display: flex; flex-direction: column; gap: 8px; justify-content: center; align-items: center;
  border-top: 1px solid var(--c-border-on-dark); margin-top: 64px; padding: 20px 0;
  font-family: var(--c-body-font); font-size: 12px; font-weight: 400; color: var(--c-on-dark);
}
.ftr-copy { opacity: 0.55; }
/* mobile: center the whole footer + airy spacing (Fred 2026-06-23) */
@media (max-width: 639px) {
  .ftr-inner { padding-top: 56px; }
  .ftr-top { gap: 56px; }
  .ftr-brand { align-items: center; text-align: center; gap: 24px; }
  .ftr-cols { align-items: center; gap: 48px; }
  .ftr-col { text-align: center; }
  .ftr-col ul { align-items: center; }
  .ftr-legal { margin-top: 72px; }
}
/* ipad: center brand + columns, tagline one line (Fred 2026-06-23) */
@media (min-width: 640px) and (max-width: 1100px) {
  .ftr-brand { align-items: center; text-align: center; }
  .ftr-tagline { max-width: none; }
  .ftr-col { text-align: center; }
  .ftr-col ul { align-items: center; }
}
@media (min-width: 640px) {
  .ftr-inner { padding-top: 64px; }
  .ftr-cols { flex-direction: row; justify-content: space-between; }
  .ftr-col { flex: 1; }
  .ftr-legal { flex-direction: row; align-items: center; margin-top: 80px; }
}
@media (min-width: 1101px) {
  .ftr-inner { padding-top: 80px; }
  .ftr-top { flex-direction: row; }
  .ftr-brand { width: 25%; }
  .ftr-cols { width: 70%; gap: 24px; }
  .ftr-legal { margin-top: 96px; }
}

/* cookie notice (ported from v2 .t-cookie, restyled to the chrome tokens). Lives in chrome.css so it
   styles on every page, /resources included (they do not load styles.css). */
.ck-bar {
  position: fixed; left: 0; right: 0; bottom: 20px; margin-inline: auto; z-index: 40;
  width: min(600px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 16px;
  padding: 12px 12px 12px 20px;
  background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 16px;
  box-shadow: 0 10px 30px rgba(28, 25, 23, 0.16);
  animation: ck-in 0.3s var(--c-ease) both;
}
.ck-bar[hidden] { display: none; }
@keyframes ck-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.ck-text { flex: 1 1 auto; min-width: 0; margin: 0; font-family: var(--c-body-font); font-size: 14px; line-height: 1.45; color: var(--c-heading); }
.ck-text a { color: var(--c-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ck-text a:hover { color: var(--c-dark); }
.ck-btn {
  flex: 0 0 auto; font-family: var(--c-body-font); font-weight: 600; font-size: 14px;
  color: var(--c-on-dark); background: var(--c-dark); border: 0; border-radius: 9999px;
  padding: 9px 20px; cursor: pointer; transition: transform 0.15s var(--c-ease), background-color 0.2s var(--c-ease);
}
.ck-btn:hover { background: var(--c-dark-2); transform: translateY(-1px); }
.ck-btn:active { transform: translateY(0); }
.ck-actions { flex: 0 0 auto; display: flex; gap: 8px; }
.ck-btn--ghost { color: var(--c-heading); background: transparent; border: 1px solid var(--c-border); }
.ck-btn--ghost:hover { background: var(--c-surface-2, rgba(28, 25, 23, 0.05)); transform: translateY(-1px); }
@media (max-width: 480px) {
  .ck-bar { bottom: 14px; gap: 12px; padding: 11px 12px 11px 16px; flex-direction: column; align-items: stretch; }
  .ck-actions { justify-content: flex-end; }
}

/* honor reduced-motion: keep the end states, drop the animation (Fred 2026-06-23) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header *, .mobile-menu *, .ftr *, .skip-link, .ck-bar { transition-duration: 0.01ms !important; animation: none !important; }
}
