@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/schibsted.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --paper: #f5f4fa;
  --surface: #ffffff;
  --ink: #17132b;
  --mute: #5d5977;
  --line: #dcd9ea;
  --violet: #6d28d9;
  --indigo: #4f46e5;
  --leaf: #23824f;
  --leaf-soft: #dff3e7;
  --shadow: 0 30px 60px -30px rgb(45 25 110 / 0.35);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #110e1d;
    --surface: #1b1730;
    --ink: #ecebf6;
    --mute: #a6a2c2;
    --line: #2e2948;
    --violet: #a78bfa;
    --indigo: #818cf8;
    --leaf: #5fd394;
    --leaf-soft: #173326;
    --shadow: 0 30px 60px -30px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Schibsted Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--violet); text-underline-offset: 0.18em; }
a:focus-visible, .btn:focus-visible, video:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 6px;
}
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 800; }
code { font-size: 0.9em; background: var(--surface); border: 1px solid var(--line); padding: 0.05em 0.35em; border-radius: 5px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 9; }

.bar, main > section, .foot, .doc {
  width: min(1160px, 100% - 32px);
  margin-inline: auto;
}
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.bar nav { display: flex; align-items: center; gap: 22px; }
.bar nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.bar nav a:hover { color: var(--violet); }

.btn {
  display: inline-block; padding: 0.8em 1.3em; border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  color: #fff !important; text-decoration: none; font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px var(--violet); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn.ghost { background: transparent; color: var(--ink) !important; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.small { padding: 0.45em 1em; }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  padding: clamp(32px, 7vw, 96px) 0 clamp(48px, 7vw, 96px);
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 900; letter-spacing: -0.035em; }
.lede { font-size: 1.2rem; color: var(--mute); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.fine { font-size: 0.92rem; color: var(--mute); }

/* Animated browser window */
.window {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
}
.tabs { display: flex; gap: 4px; padding: 8px 8px 0; background: color-mix(in srgb, var(--paper) 70%, var(--line)); }
.tab {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 6px;
  padding: 7px 9px; border-radius: 9px 9px 0 0; font-size: 0.8rem; font-weight: 500;
  transition: opacity 0.6s ease, filter 0.6s ease, background 0.3s ease;
  position: relative;
}
.tab.active { background: var(--surface); }
.tab .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav {
  flex: none; width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center;
  background: var(--c); color: #fff; font-size: 0.6rem; font-weight: 800;
  transition: transform 0.5s cubic-bezier(.3,1.6,.5,1);
}
.tab.asleep { opacity: 0.55; padding-right: 24px; }
.tab.asleep .fav { transform: scale(0.82); }
.tab::after {
  content: ""; position: absolute; right: 7px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  background: var(--leaf); opacity: 0; transform: scale(0.4) rotate(-30deg);
  /* leaf mark: a sleeping tab */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4C10 4 4 9 4 17c0 1 .1 2 .3 3C6 13 11 9 17 8c-5 2-9 6-11 12h2c1-4 4-8 9-10 2-1 3-4 3-6z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4C10 4 4 9 4 17c0 1 .1 2 .3 3C6 13 11 9 17 8c-5 2-9 6-11 12h2c1-4 4-8 9-10 2-1 3-4 3-6z'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(.3,1.6,.5,1);
}
.tab.asleep::after { opacity: 1; transform: none; }
.tab.asleep .fav, .tab.asleep .t { filter: grayscale(1); }
.badge.snd {
  flex: none; width: 10px; height: 10px; margin-left: auto; border-radius: 2px;
  background: linear-gradient(90deg, currentColor 0 2px, transparent 2px 4px, currentColor 4px 6px, transparent 6px 8px, currentColor 8px 10px);
  color: #e11d48; animation: eq 0.9s ease-in-out infinite alternate;
  transform-origin: bottom;
}
@keyframes eq { from { transform: scaleY(0.4); } to { transform: scaleY(1); } }
.toolbar {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.toolbar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.addr { flex: 1; font-size: 0.8rem; color: var(--mute); background: var(--paper); border-radius: 999px; padding: 4px 12px; }
.shield { width: 14px; height: 16px; background: var(--leaf); clip-path: polygon(50% 0, 100% 18%, 92% 65%, 50% 100%, 8% 65%, 0 18%); }
.page img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }
.meter {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border-top: 1px solid var(--line); font-size: 0.85rem;
}
.meter-label { font-weight: 600; }
.meter-note { color: var(--mute); min-width: 9.5em; text-align: right; font-variant-numeric: tabular-nums; }
.meter-track { height: 10px; border-radius: 999px; background: var(--paper); overflow: hidden; }
.meter-fill {
  display: block; height: 100%; width: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--leaf), var(--violet));
  transition: width 0.9s cubic-bezier(.2,.8,.2,1);
}

/* Sections */
.video { padding-bottom: clamp(48px, 8vw, 110px); }
.video video { width: 100%; border-radius: 14px; box-shadow: var(--shadow); background: #000; }

.features { padding-bottom: clamp(48px, 8vw, 110px); }
.features dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin: 0; }
.features dl > div { padding: 22px 0; border-top: 1px solid var(--line); }
.features dt { font-weight: 700; font-size: 1.15rem; margin-bottom: 4px; }
.features dd { margin: 0; color: var(--mute); max-width: 36em; }

.sync {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px;
  padding: clamp(32px, 5vw, 56px); margin-bottom: clamp(48px, 8vw, 110px);
  background: var(--leaf-soft); border-radius: 22px;
}
.sync h2 { color: var(--ink); }
.sync ul { padding-left: 1.2em; }
.sync li { margin: 6px 0; }
.sync li::marker { color: var(--leaf); }

.download { padding-bottom: clamp(48px, 8vw, 110px); max-width: 820px; }
table { width: 100%; border-collapse: collapse; margin: 18px 0; }
th, td { text-align: left; padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--mute); font-size: 0.92rem;
}
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--mute); }

/* Policy pages */
.doc { max-width: 720px; padding: 32px 0 80px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 900; }
.doc h2 { font-size: 1.5rem; margin-top: 2em; }
.doc h3 { font-size: 1.15rem; margin-top: 1.6em; }
.doc li { margin: 4px 0; }
.doc .updated { color: var(--mute); }
.doc table { font-size: 0.95rem; }

@media (max-width: 860px) {
  .hero, .sync { grid-template-columns: 1fr; }
  .features dl { grid-template-columns: 1fr; }
  .bar nav a:not(.btn) { display: none; }
  .tab:nth-child(n+5) { display: none; }
  .meter { grid-template-columns: 1fr auto; }
  .meter-label { display: none; }
  th, td { font-size: 0.9rem; }
  td code { word-break: break-all; }
}

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