/* Hookussi marketing site, B version. Tokens come from DESIGN.md; nothing below uses a raw colour. */
:root {
  --bg: #F6F6F3;
  --surface: #FFFFFF;
  --tint: #EEEFEB;
  --line: #E6E8EC;
  --text: #15171C;
  --muted: #5D6370;
  --accent: #2F4BE0;
  --accent-soft: #E8EBFC;
  --on-accent: #FFFFFF;
  --accent-inv: #6F84FF;   /* the accent on the ink block: the kit's dark-ground Cobalt */
  --on-accent-inv: #0B0D12;
  --ok: #187A4F;
  --warn: #94600F;
  --bad: #B23A35;

  --font-sans: "Schibsted Grotesk", "Helvetica Neue", sans-serif;
  --font-mono: "Geist Mono", "SF Mono", Menlo, monospace;
  --h-weight: 600;
  --h-opsz: none;
  --track-display: -0.04em;
  --track-heading: -0.02em;
  --track-small: -0.01em;
  --lh-display: 1.02;
  --lh-heading: 1.2;
  --lh-body: 1.55;

  --step-display: clamp(44px, 7vw, 88px);
  --step-h2: clamp(30px, 3.6vw, 44px);
  --step-lead: clamp(24px, 2.6vw, 32px);
  --step-h3: 20px;
  --step-body: 17px;
  --step-small: 14px;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-arch: clamp(56px, 9vw, 112px);
  --max: 1120px;
  --gutter: 16px;
  --section: 120px;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur: 200ms;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317; --surface: #191C21; --tint: #15181C; --line: #2A2E35; --text: #EDEEF0; --muted: #9AA0AB;
    --accent: #6F84FF; --accent-soft: #1F2550; --on-accent: #0B0D12; --accent-inv: #2F4BE0; --on-accent-inv: #FFFFFF;
    --ok: #4CC38A; --warn: #E0A84A; --bad: #EF7A72;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111317; --surface: #191C21; --tint: #15181C; --line: #2A2E35; --text: #EDEEF0; --muted: #9AA0AB;
  --accent: #6F84FF; --accent-soft: #1F2550; --on-accent: #0B0D12; --accent-inv: #2F4BE0; --on-accent-inv: #FFFFFF;
  --ok: #4CC38A; --warn: #E0A84A; --bad: #EF7A72;
  color-scheme: dark;
}
@media (min-width: 768px) { :root { --gutter: 24px } }
@media (min-width: 1120px) { :root { --gutter: 32px } }
@media (max-width: 767px) { :root { --section: 72px; --step-body: 16px } }

*, *::before, *::after { box-sizing: border-box; font-style: normal }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: var(--step-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3 {
  margin: 0; font-family: var(--font-sans); font-weight: var(--h-weight); font-optical-sizing: var(--h-opsz);
  line-height: var(--lh-heading); letter-spacing: var(--track-heading); text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; max-width: 62ch }
a { color: inherit }
::selection { background: var(--accent); color: var(--on-accent) }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px }
[id] { scroll-margin-top: 24px }

.wrap {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -9999px }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10 }
.muted { color: var(--muted) }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 16px/1 var(--font-sans); letter-spacing: var(--track-small);
  padding: 14px 20px; min-height: 48px; border-radius: var(--r-md); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:active { transform: scale(0.97) }
.btn[disabled] { cursor: default; opacity: 0.6 }
.btn-primary { background: var(--accent); color: var(--on-accent) }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)) }
.btn-quiet { background: var(--surface); color: var(--text); border-color: var(--line) }
.btn-quiet:hover { border-color: var(--muted) }
.btn-sm { padding: 10px 14px; min-height: 40px; font-size: 14px; border-radius: var(--r-sm) }
.link { color: var(--text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text) 30%, transparent); text-underline-offset: 4px; text-decoration-thickness: 2px; transition: text-decoration-color var(--dur) var(--ease) }
.link:hover { text-decoration-color: var(--accent) }

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 24px }
.brand { display: inline-flex; color: var(--text); border-radius: 6px }
.brand svg { height: 28px; width: auto; display: block }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 16px; font-weight: 500 }
.nav-links a:not(.btn) { text-decoration: none; color: var(--muted); transition: color var(--dur) var(--ease) }
.nav-links a:not(.btn):hover { color: var(--text) }
@media (max-width: 767px) { .nav-links a:not(.btn) { display: none } }

section { padding-block: var(--section) 0 }

/* ===== Hero: centred promise, then the product surface at full column width ===== */
.hero { padding-top: clamp(24px, 4vw, 48px); text-align: center }
.hero h1 { font-size: var(--step-display); line-height: var(--lh-display); letter-spacing: var(--track-display) }
.hero-sub { font-size: var(--step-h3); line-height: 1.45; max-width: 50ch; margin: 24px auto 0 }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 16px 24px; flex-wrap: wrap; margin-top: 28px; font-size: 16px; font-weight: 500 }
@media (max-width: 860px) { .hero h1 { font-size: clamp(38px, 10.8vw, 72px) } .hero-sub { font-size: 18px } }

/* ===== Product UI (faux product surfaces). Lines and mono are the product's own. ===== */
[data-ui] { font-size: var(--step-small); line-height: 1.45; color: var(--text); text-align: left }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-arch) var(--r-lg) var(--r-lg) var(--r-lg);
  overflow: hidden; min-width: 0;
}
.panel-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  min-height: 64px; padding: 14px 24px 14px calc(var(--r-arch) * 0.62 + 12px); border-bottom: 1px solid var(--line);
}
.panel-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex-wrap: wrap }
.panel-title b { font-weight: 600; font-size: 16px; letter-spacing: var(--track-small) }
.panel-foot { padding: 14px 24px; border-top: 1px solid var(--line); color: var(--muted) }

.st { display: inline-flex; align-items: baseline; gap: 6px; font-size: 14px; white-space: nowrap }
.st b { font-weight: 500 }
.st-warn b { font-size: 1.3em; line-height: 0.8 } /* the ↻ glyph is drawn small in the face */
.st-ok { color: var(--ok) } .st-warn { color: var(--warn) } .st-bad { color: var(--bad) } .st-q { color: var(--muted) }

/* hero panel: the webhook list, and your app beside it with the one control */
.hero-panel { margin-top: clamp(36px, 4vw, 52px) }
.hero-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px }
.hero-list { min-height: 349px } /* header plus six rows, so arrivals never move the page */
.log { width: 100%; border-collapse: collapse }
.log th { text-align: left; font-weight: 500; color: var(--muted); font-size: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap }
.log td { padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: baseline }
.log th:first-child, .log td:first-child { padding-left: 24px }
.log th:last-child, .log td:last-child { padding-right: 24px; text-align: right }
.log tr.is-waiting td { background: color-mix(in srgb, var(--warn) 7%, var(--surface)) }
.log td { transition: background-color 400ms var(--ease) }
.row-in { animation: row-in 360ms var(--ease) both }
@keyframes row-in { from { opacity: 0; transform: translateY(-12px) } to { opacity: 1; transform: none } }
.swap { display: inline-block; animation: swap-in var(--dur) var(--ease) both }
@keyframes swap-in { from { opacity: 0; transform: translateY(4px) } to { opacity: 1; transform: none } }

.app-pane { display: grid; align-content: start; justify-items: start; gap: 8px; padding: 24px; border-left: 1px solid var(--line) }
.app-state .st { font-size: var(--step-lead); font-weight: var(--h-weight); letter-spacing: var(--track-heading); line-height: 1.2; gap: 10px }
.app-state .st b { font-weight: var(--h-weight) }
.app-note { color: var(--text); min-height: 4.4em; font-size: 16px; line-height: 1.45 }
.app-pane .btn { margin-top: 8px }
html:not(.js) #app-toggle { display: none }
@media (max-width: 860px) {
  .hero-body { grid-template-columns: 1fr }
  .app-pane { border-left: 0; border-bottom: 1px solid var(--line); order: -1; padding: 20px 24px 24px }
  .app-note { min-height: 2.9em }
  .hero-list { min-height: 251px } /* header plus four rows */
  .log tbody tr:nth-child(n+5) { display: none }
}
@media (max-width: 560px) {
  .log th, .log td { padding-inline: 12px }
  .log th:first-child, .log td:first-child { padding-left: 16px }
  .log th:last-child, .log td:last-child { padding-right: 16px }
  .panel-bar { padding-left: calc(var(--r-arch) * 0.62 + 4px); padding-right: 16px }
  .app-pane { padding-inline: 16px }
}

/* ===== How it works: a tinted band and one still picture of where Hookussi sits ===== */
.how { background: var(--tint); margin-top: var(--section); padding-block: var(--section) }
.how h2 { font-size: var(--step-h2); max-width: 20ch }
.how-sub { font-size: var(--step-h3); line-height: 1.45; max-width: 46ch; margin-top: 16px }
.between {
  list-style: none; padding: 0; margin: clamp(40px, 6vw, 72px) 0 0;
  display: grid; grid-template-columns: auto minmax(32px, 1fr) minmax(0, 460px) minmax(32px, 1fr) minmax(0, 200px); align-items: center;
}
.bt-end b { display: block; font-size: var(--step-lead); font-weight: 600; letter-spacing: var(--track-heading); line-height: 1.25 }
.bt-end span { display: block; color: var(--muted); font-size: var(--step-small); line-height: 1.45; max-width: 22ch; margin-top: 12px }
.bt-link { position: relative; height: 2px; background: var(--text); margin-inline: clamp(12px, 2vw, 24px) }
.bt-link::after {
  content: ""; position: absolute; right: 0; top: -4px; width: 10px; height: 10px; box-sizing: border-box;
  border-top: 2px solid var(--text); border-right: 2px solid var(--text); transform: rotate(45deg);
}
.bt-mid { padding: 36px 32px 28px clamp(32px, 4vw, 48px); border: 0 }
.bt-logo { display: block; height: 28px; width: auto; color: var(--text) }
.bt-mid ul { list-style: none; padding: 0; margin: 18px 0 0 }
.bt-mid li { display: grid; grid-template-columns: 6.2em 1fr; gap: 4px 16px; padding-block: 10px; line-height: 1.45 }
.bt-mid li b { font-weight: 600 }
@media (max-width: 860px) {
  .between { grid-template-columns: 1fr; justify-items: start }
  .bt-end b { display: inline; margin-right: 14px }
  .bt-end span { max-width: 34ch }
  .bt-link { width: 2px; height: 40px; margin: 16px 0 16px 20px }
  .bt-link::after { right: -4px; top: auto; bottom: 0; transform: rotate(135deg) }
  .bt-mid { width: 100%; max-width: 520px }
}
@media (max-width: 420px) { .bt-mid li { grid-template-columns: 1fr } }

/* ===== Product detail: two surfaces side by side at unequal widths, then one wide ===== */
.product-title { font-size: var(--step-h2); max-width: 20ch; margin-bottom: 56px }
.features { display: grid; grid-template-columns: 7fr 5fr; gap: 72px 32px }
.feature { display: grid; grid-template-rows: auto 1fr; gap: 24px; min-width: 0 }
.feature h3 { font-size: var(--step-lead); margin-bottom: 12px }
.feature-copy p { max-width: 44ch }
.feature .panel { display: flex; flex-direction: column }
.feature .panel-foot, .feature .replay-action { margin-top: auto }
.feature-wide { grid-column: 1 / -1; grid-template-rows: none; grid-template-columns: 5fr 7fr; gap: 24px 32px; align-items: center }
@media (max-width: 860px) {
  .product-title { margin-bottom: 32px }
  .features { grid-template-columns: 1fr; gap: 56px }
  .feature-wide { grid-template-columns: 1fr }
}

.attempts { width: 100%; border-collapse: collapse }
.attempts td { padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap }
.attempts tr:last-child td { border-bottom: 0 }
.attempts td:first-child { padding-left: 24px; color: var(--muted) }
.attempts td:nth-child(2) { width: 100% }
.attempts td:last-child { padding-right: 24px; text-align: right; color: var(--muted) }

.replay-list { list-style: none; margin: 0; padding: 0 }
.replay-list li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 13px 24px; border-bottom: 1px solid var(--line); align-items: baseline }
.replay-list li.more { border-bottom: 0 }
.replay-action { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 24px 20px; border-top: 1px solid var(--line) }

.ip-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr }
.ip-list li { display: grid; gap: 4px; padding: 28px 24px }
.ip-list li + li { border-left: 1px solid var(--line) }
.ip { font-size: var(--step-lead); font-weight: var(--h-weight); letter-spacing: var(--track-heading); line-height: 1.2 }
@media (max-width: 560px) {
  .ip-list { grid-template-columns: 1fr }
  .ip-list li { padding: 20px 24px }
  .ip-list li + li { border-left: 0; border-top: 1px solid var(--line) }
  .attempts td { padding-inline: 10px } .attempts td:first-child { padding-left: 16px } .attempts td:last-child { padding-right: 16px }
  .replay-list li, .replay-action, .panel-foot { padding-inline: 16px }
}

/* ===== Pricing: one row per plan ===== */
.price-head { display: grid; grid-template-columns: 5fr 7fr; gap: 16px 32px; align-items: end; margin-bottom: 48px }
.price-head h2 { font-size: var(--step-h2) }
.price-head p { max-width: 58ch }
.plans-wrap { background: var(--surface); border-radius: var(--r-lg); overflow: hidden }
.plans { width: 100%; border-collapse: collapse }
.plans thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%) } /* column names for screen readers; each row reads on its own */
.plans tbody th, .plans tbody td { padding: 28px 24px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line) }
.plans tbody tr:last-child th, .plans tbody tr:last-child td { border-bottom: 0 }
.plans tbody th { font-size: var(--step-h3); font-weight: 600; letter-spacing: var(--track-heading); width: 14% }
.plan-price { width: 20%; white-space: nowrap }
.plan-price b { font-size: var(--step-h2); font-weight: var(--h-weight); letter-spacing: var(--track-heading); line-height: 1; font-variant-numeric: tabular-nums }
.plan-price span { margin-left: 8px; color: var(--muted); font-size: 16px }
.plan-what b { display: block; font-weight: 600 }
.plan-what span { display: block; margin-top: 4px; max-width: 52ch; font-size: 16px }
.plan-go { width: 1%; white-space: nowrap; text-align: right }
.plans .btn { min-width: 152px }
.plans tr.is-pick th, .plans tr.is-pick td { background: color-mix(in srgb, var(--accent) 9%, var(--surface)) }
.plans-foot { margin-top: 20px }
@media (max-width: 860px) {
  .price-head { grid-template-columns: 1fr; margin-bottom: 32px }
  .plans, .plans tbody { display: block }
  .plans tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; align-items: baseline; padding: 24px 20px; border-bottom: 1px solid var(--line) }
  .plans tbody tr:last-child { border-bottom: 0 }
  .plans tbody th, .plans tbody td { padding: 0; border: 0; width: auto; background: transparent }
  .plans tr.is-pick th, .plans tr.is-pick td { background: transparent }
  .plans tr.is-pick { background: color-mix(in srgb, var(--accent) 9%, var(--surface)) }
  .plan-price { text-align: right }
  .plan-what, .plan-go { grid-column: 1 / -1; text-align: left }
  .plans .btn { min-width: 0 }
}

/* the comparison: three bars on one scale */
.compare { margin-top: 96px }
.compare h3 { font-size: var(--step-lead); margin-bottom: 12px }
.bars { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 12px }
.bars li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; align-items: center }
.bar-name { font-weight: 500 }
.bar-track { display: flex; align-items: center; gap: 16px; min-width: 0 }
.bar-track i { flex: none; display: block; height: 48px; width: calc((100% - 7.5em) * var(--v) / 685); min-width: 8px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--text) 16%, var(--bg)); transform-origin: left center }
.bar-track b { font-size: var(--step-h3); font-weight: 600; letter-spacing: var(--track-heading); white-space: nowrap }
.bars .us .bar-name { font-weight: 600 }
.bars .us i { background: var(--accent) }
.bars .us b { color: var(--accent) }
@media (max-width: 860px) { .compare { margin-top: 64px } }
@media (max-width: 560px) {
  .bars { gap: 20px }
  .bars li { grid-template-columns: 1fr; gap: 6px }
  .bar-track i { height: 40px; width: calc((100% - 9em) * var(--v) / 685) }
}

/* ===== Final call to action: the page's one field of ink ===== */
.cta { padding-block: var(--section) }
.cta-block {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 48px; align-items: end;
  background: var(--text); color: var(--bg);
  border-radius: var(--r-arch) var(--r-lg) var(--r-lg) var(--r-lg);
  padding: clamp(40px, 7vw, 88px);
  --accent: var(--accent-inv); --on-accent: var(--on-accent-inv);
}
.cta h2 { font-size: clamp(32px, 5.2vw, 64px); line-height: var(--lh-display); letter-spacing: var(--track-display); max-width: 12ch }
.cta-actions { margin-top: 40px; display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap }
.cta-actions p { color: color-mix(in srgb, var(--bg) 72%, var(--text)) }
.cta-block .btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--bg)) }
.cta-mark { display: block; width: clamp(120px, 18vw, 224px); height: auto; color: var(--bg) }
@media (max-width: 860px) {
  .cta-block { grid-template-columns: 1fr; padding: 48px 24px 32px 28px }
  .cta-mark { width: 88px; justify-self: end }
}

/* ===== Footer ===== */
.foot { background: var(--tint); padding-block: 72px 40px }
.foot-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px 32px; align-items: start }
.foot-brand { display: block; height: 32px; width: auto; color: var(--text) }
.foot-lines { display: grid; gap: 4px; margin-top: 20px }
.foot-lines p:first-child { font-weight: 600 }
.foot-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; font-size: 16px }
.foot-links h3 { font-size: 16px; letter-spacing: var(--track-small); margin-bottom: 12px }
.foot-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px }
.foot-links a { text-decoration: none; color: var(--muted); transition: color var(--dur) var(--ease) }
.foot-links a:hover { color: var(--text) }
.foot-base { margin-top: 64px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px }
.theme-toggle { font: 500 14px/1 var(--font-sans); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; cursor: pointer; transition: border-color var(--dur) var(--ease) }
.theme-toggle:hover { border-color: var(--muted) }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr } }
@media (max-width: 480px) { .foot-links { grid-template-columns: 1fr 1fr } }

/* ===== Entrances (only when JS is running and motion is welcome; content is visible without either) ===== */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 520ms var(--ease), transform 520ms var(--ease); transition-delay: calc(var(--i, 0) * 70ms) }
  .js [data-reveal].is-in { opacity: 1; transform: none }
  .js .bars li i { transform: scaleX(0); transition: transform 700ms var(--ease); transition-delay: calc(var(--i, 0) * 70ms + 160ms) }
  .js .bars li.is-in i { transform: none }
}
@media (prefers-reduced-motion: reduce) {
  .row-in, .swap { animation: none }
  .log td, .btn { transition: none }
}
