/* PopHonest site — one layout, two themes (DESIGN-SPEC v1.0).
   Accent is only allowed in three places: the renewal row/cell, the primary CTA,
   and the "In writing" phrase. Everything else is ink or greyscale. */

/* ---------- fonts: self-hosted latin subsets, no CDN ---------- */
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 500;
  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+2192, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Host Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/host-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+2192, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-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+2192, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --surface: #F4F4F4;
  --ink: #111111;
  --muted: #6B6B6B;
  --accent: #1A4BE0;
  --accent-hover: #143CC0;
  --accent-ink: #FFFFFF;
  --line: #E4E4E4;
  --line-strong: #111111;
  --font-display: 'Schibsted Grotesk', system-ui, sans-serif;
  --font-text: 'Schibsted Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display-weight: 400;
  --tracking: -0.035em;
  --tracking-xl: -0.042em;
  --pad: 80px;
  --gutter: 24px;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #161C1A;
  --surface: #1F2725;
  --ink: #E3E2DA;
  --muted: #8E948D;
  --accent: #9FC7B8;
  --accent-hover: #B3D7C8;
  --accent-ink: #161C1A;
  --line: rgba(227, 226, 218, 0.13);
  --line-strong: rgba(227, 226, 218, 0.26);
  --font-display: 'Host Grotesk', system-ui, sans-serif;
  --font-text: 'Host Grotesk', system-ui, sans-serif;
  --display-weight: 500;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 500; }

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

.grid > * { min-width: 0; }

.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* ---------- header ---------- */
.site-head {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.site-head .wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.brand .mark {
  width: 18px;
  height: 18px;
  border: 1px solid var(--ink);
  position: relative;
  display: inline-block;
}

.brand .mark::after {
  content: '';
  position: absolute;
  left: 5px;
  right: 5px;
  top: 8px;
  height: 1px;
  background: var(--ink);
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: 16px;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.head-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.theme-toggle {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  padding: 7px 10px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle:active { transform: translateY(1px); }

.head-cta {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--bg);
  background: var(--ink);
  padding: 9px 15px;
  border-radius: 1px;
  transition: transform 0.12s ease, opacity 0.18s ease;
}

.head-cta:hover { opacity: 0.86; }
.head-cta:active { transform: translateY(1px); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.skip:focus { left: 16px; top: 16px; }

/* sub-page header block (same grid, smaller H1 than the home hero) */
.page-head {
  padding: 64px 0 52px;
  border-bottom: 1px solid var(--line);
}

.page-head h1 { font-size: clamp(34px, 4.4vw, 62px); }
.page-head .lede { max-width: 720px; }

/* ---------- hero ---------- */
.hero {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 48px 0 56px;
  position: relative;
}

/* one hairline column at the 8/4 split, as in the approved mockup */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--pad) + (min(100vw, 1440px) - 2 * var(--pad)) * 8 / 12);
  width: 1px;
  background: var(--line);
  pointer-events: none;
}

.hero .grid { width: 100%; align-items: center; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}

.eyebrow .tick {
  width: 28px;
  height: 1px;
  background: var(--muted);
  display: inline-block;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(40px, 5.4vw, 80px);
  line-height: 1.02;
  letter-spacing: var(--tracking-xl);
}

h2 {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: var(--tracking);
}

h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lede {
  margin: 26px 0 18px;
  max-width: 580px;
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--muted);
  letter-spacing: -0.004em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  border-radius: 1px;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: translateY(1px); }

.btn-primary .btn-price {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 400;
  opacity: 0.92;
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost:active { transform: translateY(1px); }

/* The only other accent placement: the "In writing" phrase. */
.in-writing {
  color: var(--accent);
  white-space: nowrap;
}

/* ---------- statement / price card ---------- */
.statement {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}

.statement-head,
.statement-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 22px;
}

.statement-head { border-bottom: 1px solid var(--line); }

.statement .label,
.statement .plan {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.price-block {
  padding: 20px 22px 22px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.price-block .amount {
  font-family: var(--font-display);
  font-size: 62px;
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.price-block .per {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin-left: 4px;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  font-variant-numeric: tabular-nums;
}

.rows li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}

.rows li:last-child { border-bottom: 0; }

.rows .k {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.rows .v {
  font-family: var(--font-mono);
  font-size: 17px;
}

.renewal .v,
.renewal.value,
tr.renewal td,
td.renewal {
  color: var(--accent);
  font-weight: 500;
}

.statement-foot {
  border-top: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.statement-foot .forever {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
}

/* ---------- sections ---------- */
.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  grid-column: span 12;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
}

.section-head h2 { margin: 0; max-width: 720px; }
.section-head .side { max-width: 420px; color: var(--muted); font-size: 16px; }

.note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  padding: 3px 7px;
  white-space: nowrap;
}

/* ---------- cards ---------- */
.cards {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
}

.cards.two { grid-template-columns: repeat(2, 1fr); }

.card {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 24px 22px 26px;
  background: var(--surface);
  transition: transform 0.12s ease, border-color 0.18s ease;
}

.card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.card .kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  display: block;
}
.card p { font-size: 15.5px; color: var(--muted); }
.card h3 { margin-bottom: 8px; }

/* ---------- tables ---------- */
.table-wrap {
  grid-column: span 12;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.ledger {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}

table.ledger caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 12px;
}

table.ledger th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 10px 14px 12px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

table.ledger td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.ledger tbody tr:hover td { background: var(--surface); }

table.ledger .num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 14.5px;
  white-space: nowrap;
}

table.ledger th.num { text-align: right; }

table.ledger td.renewal { font-family: var(--font-mono); font-size: 14.5px; }

table.ledger .name { font-weight: 500; }
table.ledger .small { font-size: 13.5px; color: var(--muted); }
table.ledger .small a { border-bottom: 1px solid var(--line-strong); }

/* ---------- calculator ---------- */
.calc {
  grid-column: span 12;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  display: grid;
  grid-template-columns: 4fr 7fr;
  gap: 0;
}

.calc-form {
  padding: 24px 22px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field { display: flex; flex-direction: column; gap: 7px; }

.field label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.field select,
.field input {
  font-family: var(--font-mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  padding: 9px 10px;
  appearance: none;
}

.field output {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}

.calc-out { padding: 0; }
.calc-out table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.calc-out th,
.calc-out td { border-bottom: 1px solid var(--line); padding: 13px 18px; text-align: left; }
.calc-out tr:last-child th,
.calc-out tr:last-child td { border-bottom: 0; }
.calc-out th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.calc-out td.num { text-align: right; font-family: var(--font-mono); font-size: 15px; }
.calc-note { padding: 12px 18px 14px; border-top: 1px solid var(--line); }

/* ---------- quotes ---------- */
.quote {
  margin: 0;
  border-left: 1px solid var(--line-strong);
  padding: 4px 0 4px 20px;
  font-size: 17.5px;
  line-height: 1.55;
}

.quote cite {
  display: block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-style: normal;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.stack { display: flex; flex-direction: column; gap: 28px; }

/* ---------- honest lists ---------- */
ul.checks,
ol.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

ul.checks li,
ol.steps li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}

ul.checks li:first-child,
ol.steps li:first-child { border-top: 1px solid var(--line); }

ul.checks .mark {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  min-width: 70px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

ol.steps li { counter-increment: step; }
ol.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding-top: 3px;
}

ul.checks .body,
ol.steps .body { flex: 1; }
ol.steps .body strong { font-weight: 500; }

.callout {
  grid-column: span 12;
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-strong);
  padding: 18px 20px;
  font-size: 15.5px;
  color: var(--muted);
  background: var(--surface);
}

.callout strong { color: var(--ink); font-weight: 500; }

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 22px;
  font-size: 15px;
}

.link-row a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.link-row a:hover { color: var(--muted); border-bottom-color: var(--muted); }

.cta-band {
  padding: 64px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-band h2 { margin: 0; max-width: 640px; }

/* ---------- prose pages (legal) ---------- */
.prose { max-width: 760px; padding: 56px 0 72px; }
.prose h1 { font-size: clamp(32px, 4vw, 52px); margin-bottom: 20px; }
.prose h2 { font-size: 24px; margin: 36px 0 12px; }
.prose p, .prose li { font-size: 16px; color: var(--muted); }
.prose ul { padding-left: 20px; }
.prose a { border-bottom: 1px solid var(--line-strong); }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  font-size: 14px;
  color: var(--muted);
}

.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.foot-grid h4 {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink);
}

.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 7px; }
.foot-grid a { transition: color 0.18s ease; }
.foot-grid a:hover { color: var(--ink); }

.foot-legal {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .calc { grid-template-columns: 1fr; }
  .calc-form { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 900px) {
  :root { --pad: 24px; }
  .hero { min-height: 0; padding: 40px 0 48px; }
  .hero::before { display: none; }
  /* one column: the 12-column grid plus its 11 gutters cannot fit a phone */
  .grid { grid-template-columns: minmax(0, 1fr); column-gap: 0; row-gap: 32px; }
  .col-4, .col-5, .col-6, .col-7, .col-8, .col-12,
  .section-head, .cards, .cards.two, .table-wrap, .calc, .callout { grid-column: 1 / -1; }
  .cards, .cards.two { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 52px 0; }
  .quote { font-size: 16.5px; }
}

@media (max-width: 560px) {
  .site-head .wrap { gap: 12px; min-height: 64px; }
  .brand { font-size: 16px; }
  .head-end { gap: 8px; }
  .theme-toggle { padding: 6px 8px; font-size: 10px; letter-spacing: 0.06em; }
  .head-cta { padding: 8px 10px; font-size: 12.5px; }
  .btn { width: 100%; justify-content: center; }
  .actions { gap: 10px; }
  .foot-legal { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .card:hover { transform: none; }
}
