/* Parametric AI — marketing site v2.
   Direction: institutional research note. Cool fog paper, harbour ink,
   survey-cobalt accent. Every stat cites the artifact it came from. */

:root {
  --paper:    #f6f7f3;
  --paper-2:  #eceee7;
  --card:     #fdfdfb;
  --ink:      #0e1a24;
  --ink-2:    #3f4d58;
  --ink-3:    #77828b;
  --line:     #d8dcd3;
  --line-2:   #c3c9bd;
  --cobalt:   #2244c2;
  --cobalt-2: #e6eafb;
  --pos:      #157a5b;
  --neg:      #b0492e;
  --night:    #0e1a24;
  --night-2:  #16242f;
  --night-ink:  #eef1ec;
  --night-dim:  rgba(238,241,236,0.55);
  --night-faint:rgba(238,241,236,0.28);
  --night-line: rgba(238,241,236,0.12);

  --disp: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --gutter: clamp(20px, 5vw, 72px);
  --r: 5px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--disp);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--cobalt); color: #fff; }

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

/* ── Type roles ─────────────────────────────────────────────── */
.d1 {
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.032em;
  font-weight: 700;
}
.d2 {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.d3 {
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.lede {
  font-family: var(--serif);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--ink-2);
  font-weight: 400;
}
.body-t {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-2);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.eyebrow .tick { color: var(--cobalt); }
.eyebrow .right { margin-left: auto; text-align: right; }
.cite {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.cite a { border-bottom: 1px dotted var(--line-2); }
.cite .src { color: var(--cobalt); }

/* ── Nav ────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 28px;
  padding: 0 var(--gutter);
  height: 60px;
  background: rgba(246,247,243,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  font-weight: 700; letter-spacing: -0.02em; font-size: 16px;
  display: flex; align-items: center; gap: 9px; flex-shrink: 0;
}
.nav-logo .mark {
  width: 13px; height: 13px; background: var(--cobalt);
  clip-path: polygon(0 100%, 0 35%, 50% 0, 100% 35%, 100% 100%, 62% 100%, 62% 62%, 38% 62%, 38% 100%);
}
.nav-links { display: flex; gap: 4px; font-size: 13.5px; font-weight: 500; }
.nav-links a { padding: 7px 12px; border-radius: var(--r); color: var(--ink-2); transition: background .15s, color .15s; }
.nav-links a:hover { background: rgba(14,26,36,0.06); color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--cobalt); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.nav-note {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  letter-spacing: 0.05em; margin-right: 6px;
}
.nav-menu {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  margin-left: auto;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--r);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
  transition: background .15s;
}
.nav-toggle:hover { background: rgba(14,26,36,0.06); }
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform .22s ease, opacity .15s ease;
}
.nav.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 960px) {
  .nav { height: 60px; flex-wrap: nowrap; }
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 59;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    max-height: calc(100vh - 60px);
    padding: 24px var(--gutter) 32px;
    background: rgba(246,247,243,0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(14,26,36,0.08);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
    pointer-events: none;
  }
  .nav.is-open .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 2px;
    font-size: 15px;
  }
  .nav-links a {
    padding: 14px 16px;
    border-radius: var(--r);
  }
  .nav-links a[aria-current="page"] {
    background: var(--cobalt-2);
    color: var(--cobalt);
  }
  .nav-cta {
    margin-left: 0;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .nav-note {
    display: block;
    margin-right: 0;
    text-align: center;
    padding-bottom: 4px;
  }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 960px) and (prefers-reduced-motion: reduce) {
  .nav-menu { transition: none; transform: none; }
  .nav-toggle-bar { transition: none; }
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--disp); font-weight: 600; font-size: 14px;
  padding: 11px 20px; border-radius: var(--r);
  border: 1px solid var(--line-2); color: var(--ink);
  background: transparent; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: var(--ink-3); background: rgba(14,26,36,0.04); }
.btn.fill { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.btn.fill:hover { background: #1a37a3; border-color: #1a37a3; }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn.on-night { border-color: rgba(238,241,236,0.3); color: var(--night-ink); }
.btn.on-night:hover { border-color: rgba(238,241,236,0.6); background: rgba(238,241,236,0.06); }

/* ── Layout ─────────────────────────────────────────────────── */
.section { padding: clamp(56px, 8vw, 104px) var(--gutter); }
.section.tight { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(36px, 5vw, 64px); }
.section.flat { background: var(--paper-2); }
.wrap { max-width: 1240px; margin: 0 auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(36px, 5vw, 80px);
  padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(48px, 6vw, 80px);
  max-width: 1320px; margin: 0 auto;
  align-items: center;
}
@media (max-width: 980px) { .hero { grid-template-columns: 1fr; } }
.hero h1 em { font-style: normal; color: var(--cobalt); }
.hero .lede { max-width: 52ch; }

/* dotted survey-grid backdrop behind the hero card */
.hero-right {
  position: relative;
  padding: clamp(16px, 2vw, 32px);
}
.hero-right::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--line-2) 1px, transparent 1px);
  background-size: 22px 22px;
  border-radius: 8px;
  opacity: 0.55;
}

/* ── Worksheet (signature card) ─────────────────────────────── */
.sheet {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(14,26,36,0.05), 0 12px 32px -12px rgba(14,26,36,0.18);
  overflow: hidden;
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--cobalt); color: #fff;
  padding: 10px 18px;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.sheet-head .dim { color: rgba(255,255,255,0.6); }
.sheet-body { padding: 22px 22px 18px; }
.sheet-addr { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.sheet-specs { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.sheet-price {
  font-size: clamp(34px, 3.2vw, 44px); font-weight: 700; letter-spacing: -0.03em;
  margin: 14px 0 2px;
}
.sheet-conf {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.03em;
}
.sheet-rule { border: 0; border-top: 1px solid var(--line); margin: 18px 0 14px; }
.sheet-sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px;
}
.factor { display: grid; grid-template-columns: minmax(148px, auto) 1fr 64px; gap: 12px; align-items: center; margin-bottom: 9px; }
.factor .f-name { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.factor .f-track { height: 6px; background: var(--paper-2); border-radius: 3px; overflow: hidden; }
.factor .f-fill { height: 100%; border-radius: 3px; background: var(--pos); width: 0; transition: width 1s cubic-bezier(.2,.7,.2,1); }
.factor .f-fill.neg { background: var(--neg); }
.factor.drawn .f-fill { width: var(--w); }
.factor .f-val { font-family: var(--mono); font-size: 11.5px; text-align: right; color: var(--pos); }
.factor .f-val.neg { color: var(--neg); }
.factor.rest .f-name, .factor.rest .f-val { color: var(--ink-3); }
.sheet-foot {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  background: #f8f9f5;
  font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.03em;
}
@media (prefers-reduced-motion: reduce) {
  .factor .f-fill { transition: none; }
  .factor .f-fill { width: var(--w); }
}

/* ── Fact band (real numbers strip) ─────────────────────────── */
.facts {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--card);
}
.facts-inner {
  max-width: 1320px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 0 var(--gutter);
}
.fact { padding: 20px 18px 18px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; }
.fact .f-num { font-size: clamp(22px, 2.2vw, 30px); font-weight: 700; letter-spacing: -0.02em; }
.fact .f-num small { font-size: 0.62em; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.fact .f-lab { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-top: 4px; }
@media (max-width: 900px) {
  .facts-inner { grid-template-columns: 1fr 1fr; }
  .fact { border-left: 0; border-top: 1px solid var(--line); }
  .fact:nth-child(-n+2) { border-top: 0; }
  .fact:nth-child(even) { border-left: 1px solid var(--line); }
}

/* ── Cards / list rows ──────────────────────────────────────── */
.cardset { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--line); }
.cardset .cell { background: var(--card); padding: 26px 26px 24px; }
.cardset .cell h4 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.cardset .cell p { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.cardset .cell .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cobalt); display: block; margin-bottom: 12px; }

.rows { border-top: 1px solid var(--line); }
.row-item {
  display: grid; grid-template-columns: 150px 1fr; gap: 20px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.row-item .r-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cobalt); }
.row-item .r-v { font-size: 15px; color: var(--ink-2); }
@media (max-width: 640px) { .row-item { grid-template-columns: 1fr; gap: 4px; } }

/* ── Data table ─────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
table.tbl.tbl-2col { min-width: 0; }
.tbl th {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500; text-align: left;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f8f9f5;
}
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.tbl .hl td { background: var(--cobalt-2); color: var(--ink); }
.tbl .pos { color: var(--pos); }
.tbl .neg { color: var(--neg); }
.tbl td .note { font-family: var(--mono); font-size: 10px; color: var(--ink-3); display: block; margin-top: 2px; }

/* ── Night sections ─────────────────────────────────────────── */
.night { background: var(--night); color: var(--night-ink); }
.night .eyebrow { color: var(--night-faint); }
.night .eyebrow .tick { color: #7d95ec; }
.night .lede, .night .body-t { color: var(--night-dim); }
.night .cite { color: var(--night-faint); }
.night .cite .src { color: #7d95ec; }
.night-stat { border-left: 1px solid var(--night-line); padding: 4px 0 4px 20px; }
.night-stat .n { font-size: clamp(28px, 3vw, 40px); font-weight: 700; letter-spacing: -0.02em; }
.night-stat .l { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--night-faint); margin-top: 4px; }

/* ── Ledger (methodology signature) ─────────────────────────── */
.ledger { border-left: 2px solid var(--cobalt); }
.ledger-row {
  display: grid; grid-template-columns: 92px 1fr; gap: 18px;
  padding: 14px 0 14px 22px; border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.ledger-row:last-child { border-bottom: 0; }
.ledger-row .lv { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.ledger-row .lm { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--ink); }
.ledger-row .lm .delta { font-size: 10.5px; color: var(--pos); margin-left: 6px; }
.ledger-row .lw { font-size: 14px; color: var(--ink-2); }
.ledger-row.first .lm { color: var(--ink-3); }
@media (max-width: 640px) {
  .ledger-row { grid-template-columns: 80px 1fr; }
  .ledger-row .lw { grid-column: 1 / -1; }
}

/* ── Phones ─────────────────────────────────────────────────── */
.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
@media (max-width: 800px) { .phones { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; } }
.phone {
  border: 1px solid var(--line-2); border-radius: 26px; overflow: hidden;
  background: var(--card); box-shadow: 0 16px 40px -18px rgba(14,26,36,0.25);
}
.phone img { width: 100%; }
.phone-cap { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; margin-top: 12px; text-align: center; }

/* ── Forms ──────────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px;
  font-family: var(--disp); font-size: 14.5px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cobalt); }
.field ::placeholder { color: var(--ink-3); }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 36px var(--gutter) 44px;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  align-items: baseline;
}
.footer .f-brand { font-weight: 700; letter-spacing: -0.02em; }
.footer .f-meta { display: flex; gap: 26px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; }

/* ── App walkthrough (scroll-through steps) ──────────────────── */
.walk { display: grid; gap: clamp(56px, 9vw, 130px); margin-top: clamp(40px, 6vw, 76px); }
.walk-step {
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.walk-step:nth-child(even) .walk-media { order: 2; }
.walk-media { display: flex; justify-content: center; }
.walk-media .phone { max-width: 296px; width: 100%; }
.walk-media.walk-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 22px); align-items: start; justify-content: center; }
.walk-pair .phone-slot { display: flex; flex-direction: column; align-items: center; }
.walk-pair .phone-slot:nth-child(2) { margin-top: clamp(24px, 5vw, 56px); }
.walk-pair .phone-slot .phone { max-width: 236px; width: 100%; }
.phone.pending {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1179 / 2556; border-style: dashed; box-shadow: none;
  background: linear-gradient(180deg, var(--card) 0%, rgba(14,26,36,0.035) 100%);
}
.phone.pending span {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.03em;
  color: var(--ink-3); text-align: center; padding: 0 16px; line-height: 1.55;
}
.phone-slot .phone-cap { margin-top: 10px; }
.phone.redact-addr { position: relative; }
.phone.redact-addr .redact {
  position: absolute; left: 5%; right: 5%; top: 46%; height: 3.6%;
  border-radius: 6px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  background: rgba(244,246,248,0.28);
}
.walk-num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--cobalt);
  display: flex; align-items: center; gap: 12px;
}
.walk-num::before { content: ""; width: 26px; height: 1px; background: var(--cobalt); }
.walk-copy h3 {
  font-size: clamp(22px, 2.6vw, 30px); font-weight: 700;
  letter-spacing: -0.02em; margin: 16px 0 12px;
}
.walk-copy p { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); max-width: 42ch; }
.walk-copy .walk-meta {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  letter-spacing: 0.06em; text-transform: uppercase; margin-top: 18px;
}
@media (max-width: 800px) {
  .walk-step { grid-template-columns: 1fr; gap: 22px; justify-items: center; text-align: center; }
  .walk-step:nth-child(even) .walk-media { order: 0; }
  .walk-media .phone { max-width: 260px; }
  .walk-media.walk-pair { max-width: 380px; gap: 12px; }
  .walk-pair .phone-slot .phone { max-width: none; }
  .walk-pair .phone-slot:nth-child(2) { margin-top: 0; }
  .walk-num { justify-content: center; }
  .walk-copy p { max-width: 46ch; }
}

/* ── Reveal ─────────────────────────────────────────────────── */
html.js .rv { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
html.js .rv.in { opacity: 1; transform: none; }
/* Directional variants for the app walkthrough — slide each side in */
html.js .rv.slide-l { transform: translateX(-42px); }
html.js .rv.slide-r { transform: translateX(42px); }
html.js .rv.slide-l.in, html.js .rv.slide-r.in { transform: none; }
html.js .walk-copy.rv { transition-delay: .12s; }
@media (prefers-reduced-motion: reduce) {
  .rv, html.js .rv.slide-l, html.js .rv.slide-r { opacity: 1; transform: none; transition: none; }
}
