/* usepillarbox.com. Pillar-box red owns whole panels, navy carries the type,
   and the real app does the talking. Gabarito (OFL) is self-hosted. */

@font-face {
  font-family: "Gabarito";
  src: url("/fonts/gabarito-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "Gabarito";
  src: url("/fonts/gabarito-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --red: #c8102e;
  --red-ink: #b30e29;
  --on-red: #ffffff;
  --on-red-soft: #ffe1e6;
  --navy: #0f1e33;
  --navy-raised: #1b2c47;
  --on-navy-soft: #b9c4d6;
  --ink: #0f1e33;
  --ink-soft: #46546a;
  --ground: #ffffff;
  --steel: #f2f4f7;
  --rule: #dfe4eb;
  --display: "Gabarito", "Avenir Next", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --panel-radius: clamp(24px, 3.4vw, 40px);
  --gutter: clamp(16px, 2vw, 24px);
  color-scheme: light;
  scrollbar-color: #b9c4d6 var(--ground);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 18px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--red);
}
::selection { background: var(--red); color: #fff; }
img { display: block; max-width: 100%; }

a { color: var(--red-ink); text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 8px; }
.on-red :focus-visible, .on-navy :focus-visible { outline-color: #fff; }

h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 76px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px;
}
.site-nav a:hover { background: var(--steel); }
.site-nav a[aria-current="page"] { color: var(--red-ink); }
.site-nav .pill { margin-left: 6px; }
@media (max-width: 560px) {
  .site-nav .text-link { display: none; }
}

/* Buttons */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap;
}
.pill.navy, .site-nav a.pill.navy { background: var(--navy); color: #fff; }
.pill.navy:hover, .site-nav a.pill.navy:hover { background: var(--navy-raised); }
.pill.white { background: #fff; color: var(--navy); }
.pill.white:hover { background: var(--on-red-soft); }
.pill.ghost { color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.pill.ghost:hover { background: rgba(255, 255, 255, 0.12); }
@media (max-width: 640px) { .hero .pill.ghost { display: none; } }
.site-nav .pill { min-height: 44px; font-size: 16px; padding: 0 18px; }

/* Panels: whole rounded fields of colour, inset from the window like Monzo's */
.panel { margin: 0 var(--gutter); border-radius: var(--panel-radius); overflow: hidden; position: relative; }
.on-red { background: var(--red); color: var(--on-red); }
.on-navy { background: var(--navy); color: #fff; }
.on-steel { background: var(--steel); }

/* Hero */
.hero { text-align: center; padding: clamp(48px, 7vw, 88px) 0 0; }
.hero h1 { font-size: clamp(52px, 9.4vw, 112px); line-height: 0.92; letter-spacing: -0.03em; }
.hero .offer { font-size: clamp(19px, 2.1vw, 23px); line-height: 1.45; color: var(--on-red-soft); max-width: 26em; margin: 24px auto 32px; padding: 0 var(--gutter); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero .practical { margin: 20px 0 0; padding: 0 var(--gutter); font-size: 15px; color: var(--on-red-soft); }

/* Phones */
.phone {
  background: var(--navy); padding: 9px; border-radius: 50px;
  box-shadow: 0 30px 60px -18px rgba(15, 30, 51, 0.55);
}
.phone > img { border-radius: 41px; width: 100%; height: auto; aspect-ratio: 1206 / 2622; background: #f2f2f7; }
.stage {
  display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: start;
  gap: clamp(12px, 3vw, 40px); max-width: 940px; margin: clamp(48px, 7vw, 72px) auto 0; padding: 0 var(--gutter);
  height: clamp(300px, 52vw, 560px); overflow: hidden;
}
.stage .phone:nth-child(1), .stage .phone:nth-child(3) { margin-top: clamp(40px, 7vw, 90px); }
@media (max-width: 640px) {
  .stage { grid-template-columns: 1fr; max-width: 300px; height: 380px; }
  .stage .phone:nth-child(1), .stage .phone:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .stage > * { animation: rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .stage > :nth-child(2) { animation-delay: 0.08s; }
  .stage > :nth-child(3) { animation-delay: 0.16s; }
  @keyframes rise { from { transform: translateY(70px); } }
}
.demo-note { font-size: 14px; color: var(--ink-soft); text-align: center; margin: 14px var(--gutter) 0; }

/* Chapters */
.chapter { padding: clamp(72px, 10vw, 128px) 0; }
.chapter h2, .chat-chapter h2 { font-size: clamp(36px, 5.6vw, 64px); line-height: 1; letter-spacing: -0.025em; max-width: 13em; }
.chapter .intro, .chat-chapter .intro { font-size: clamp(18px, 1.8vw, 21px); color: var(--ink-soft); max-width: 34em; margin: 20px 0 0; }

.split { display: grid; gap: clamp(40px, 6vw, 88px); align-items: center; margin-top: clamp(40px, 6vw, 64px); }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); } }
.split .phone { max-width: 340px; width: 100%; justify-self: center; }

.evidence { position: relative; margin: 0; justify-self: center; width: 100%; max-width: 420px; }
.evidence .phone { max-width: 320px; margin: 0 auto; }
.evidence .phone { position: relative; }
/* Centred on its source row: the crop spans 1025–1275 of the 2622px capture. */
.evidence .zoom {
  position: absolute; left: -16%; right: -10%; top: calc(9px + (100% - 18px) * 0.4386); transform: translateY(-50%);
  background: #fff; border-radius: 20px; padding: 6px 10px;
  box-shadow: 0 2px 4px rgba(15, 30, 51, 0.08), 0 24px 48px -12px rgba(15, 30, 51, 0.35);
}
.evidence .zoom img { width: 100%; height: auto; border-radius: 12px; }
.evidence figcaption { text-align: center; margin-top: 16px; font-family: var(--display); font-weight: 700; font-size: 18px; }
@media (max-width: 640px) { .evidence .zoom { left: -8%; right: -8%; } }
.tools { list-style: none; margin: 0; padding: 0; }
.tools li { padding: 22px 0; border-top: 2px solid var(--rule); display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 16px; }
.tools li:last-child { border-bottom: 2px solid var(--rule); }
.tools svg { width: 30px; height: 30px; color: var(--red); grid-row: span 2; margin-top: 2px; }
.tools h3 { font-size: 26px; letter-spacing: -0.015em; }
.tools p { margin: 0; color: var(--ink-soft); }

/* Chat chapter on navy */
.chat-chapter { padding: clamp(64px, 9vw, 112px) 0 0; }
.chat-chapter h2 { color: #fff; }
.chat-chapter .intro { color: var(--on-navy-soft); }
.chat-grid { display: grid; gap: 40px; align-items: end; }
@media (min-width: 900px) { .chat-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.chat-points { list-style: none; padding: 0; margin: 36px 0 clamp(48px, 7vw, 96px); display: grid; gap: 18px; }
.chat-points li { padding-left: 30px; position: relative; color: var(--on-navy-soft); }
.chat-points li b { color: #fff; font-weight: 600; }
.chat-points li::before {
  content: ""; position: absolute; left: 0; top: 0.42em; width: 14px; height: 12px;
  background: var(--red); border-radius: 7px 7px 7px 2px;
}
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 24px); align-items: start; height: clamp(340px, 36vw, 470px); overflow: hidden; }
.pair > :nth-child(2) { margin-top: clamp(40px, 6vw, 80px); }
.on-navy .phone { background: var(--navy-raised); box-shadow: inset 0 0 0 1.5px rgba(185, 196, 214, 0.35); }
@media (max-width: 640px) {
  .pair { grid-template-columns: 1fr; max-width: 300px; margin: 0 auto; height: 420px; }
  .pair > :first-child { display: none; }
  .pair > :nth-child(2) { margin-top: 0; }
}

/* Promise band on red */
.promise { padding: clamp(64px, 9vw, 112px) 0; margin-top: var(--gutter); }
.promise h2 { font-size: clamp(40px, 6.6vw, 80px); line-height: 0.98; letter-spacing: -0.03em; max-width: 11em; }
.promise-cols { display: grid; gap: 28px 48px; margin-top: clamp(40px, 5vw, 56px); }
@media (min-width: 760px) { .promise-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.promise-cols h3 { font-size: 24px; margin-bottom: 8px; }
.promise-cols p { margin: 0; color: var(--on-red-soft); }

/* Chapters that carry their own evidence beside the text */
.with-phone { display: grid; gap: clamp(40px, 6vw, 72px); align-items: start; }
@media (min-width: 900px) { .with-phone { grid-template-columns: minmax(0, 1fr) 300px; } }
.with-phone > .phone { max-width: 300px; width: 100%; justify-self: center; }
.promise .with-phone { align-items: end; }
.promise .rise { height: clamp(360px, 40vw, 440px); overflow: hidden; max-width: 300px; width: 100%; justify-self: center; margin-bottom: calc(-1 * clamp(64px, 9vw, 112px)); }
.promise .with-phone > div:first-child { padding-bottom: 0; }
@media (min-width: 900px) { .promise .promise-cols { grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 34em; } }
.on-red .phone { box-shadow: 0 30px 60px -18px rgba(70, 0, 15, 0.5); }

/* Privacy */
.facts { list-style: none; margin: clamp(36px, 5vw, 56px) 0 0; padding: 0; display: grid; gap: 0 56px; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.facts li { padding: 22px 0; border-top: 2px solid var(--rule); color: var(--ink-soft); }
.facts h3 { font-size: 22px; color: var(--ink); margin-bottom: 6px; }
.privacy-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 36px; }
.limited { margin: 0; font-size: 15px; color: var(--ink-soft); max-width: 46em; flex: 1 1 380px; }

/* Close */
.close { text-align: center; padding: clamp(64px, 9vw, 112px) var(--gutter); }
.close h2 { font-size: clamp(36px, 5.6vw, 64px); line-height: 1; letter-spacing: -0.025em; }
.close p { color: var(--ink-soft); font-size: 20px; max-width: 30em; margin: 18px auto 30px; }

/* Footer */
.site-foot { padding: 40px 0 48px; font-size: 15px; color: var(--ink-soft); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-foot a { color: var(--ink); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.site-foot a:hover { text-decoration: underline; }

/* Documents (privacy, terms, 404) */
.doc { min-height: 100vh; display: flex; flex-direction: column; }
.doc main { padding: 8px 0 48px; flex: 1; }
.doc .doc-head { padding: clamp(40px, 6vw, 72px) var(--gutter); }
.doc .doc-head h1 { font-size: clamp(44px, 7vw, 80px); line-height: 0.95; letter-spacing: -0.03em; max-width: 712px; margin: 0 auto; }
.doc article { max-width: 760px; margin: 0 auto; padding: clamp(32px, 5vw, 56px) var(--gutter) 0; overflow-wrap: anywhere; }
.doc article > h1:first-child { display: none; }
.doc h2 { font-size: 28px; line-height: 1.15; margin: 48px 0 12px; scroll-margin-top: 24px; }
.doc h3 { font-size: 21px; margin: 32px 0 8px; scroll-margin-top: 24px; }
.doc .lede { font-size: 21px; color: var(--ink-soft); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li + li { margin-top: 6px; }
.doc li::marker { color: var(--red); }
.doc hr { border: 0; border-top: 2px solid var(--rule); margin: 40px 0; }
.doc blockquote { margin: 20px 0; padding: 4px 0 4px 20px; box-shadow: inset 2px 0 0 var(--rule); color: var(--ink-soft); }
.doc code { font: 0.88em ui-monospace, "SF Mono", Menlo, monospace; background: var(--steel); padding: 1px 5px; border-radius: 6px; }
.doc .table { overflow-x: auto; margin: 24px 0; border-radius: 16px; background: var(--steel); }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; min-width: 9em; }
.doc th { font-weight: 700; font-size: 14px; }
.doc tbody td { border-top: 1px solid var(--rule); }
.doc mark.todo { background: #ffe58a; color: inherit; padding: 0 3px; border-radius: 4px; }
.doc .draft { background: #ffe58a; padding: 12px 16px; border-radius: 14px; font-weight: 600; margin: 0 0 24px; }

@media (prefers-reduced-motion: no-preference) {
  .pill, .site-nav a { transition: background-color 0.15s ease; }
}
