/* Kin website. Tokens from docs/brand.md (Kin dark). No inline styles anywhere:
   the Content-Security-Policy in vercel.json only allows this file. */

@font-face { font-family: "Anton"; src: url("fonts/Anton-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #0F1712;
  --backdrop: #070B09;
  --surface: #19231D;
  --raised: #223029;
  --hairline: #2E3D35;
  --border-strong: #3A4B42;
  --text: #F3F5EF;
  --text-body: #D3DAD4;
  --text-secondary: #A9B4AC;
  --accent: #4EC98F;
  --on-accent: #0B1A12;
  --soon: #F5C451;
  --attention: #F2A08C;
  --on-colour: #14130F;
  --butter: #F5C451;
  --coral: #F2A08C;
  --sage: #B5DBA6;
  --sky: #9CC9F2;
  --lilac: #C7B5F2;
  --rose: #F2B3CF;
  --radius: 20px;
  --radius-hero: 28px;
  --gutter: clamp(16px, 4vw, 40px);
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

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

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #7ADBAE; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--accent); color: var(--on-accent);
  padding: 12px 18px; border-radius: 999px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 820px; }

/* Type */

.kicker {
  margin: 0 0 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--accent);
}
.display, .section-title, .tile h3, .price-card .price, .prose h1, .prose h2 {
  font-family: var(--display); font-weight: 400; letter-spacing: 0.5px;
}
.display { margin: 0; font-size: clamp(52px, 8.6vw, 120px); line-height: 0.94; }
.section-title { margin: 0; font-size: clamp(40px, 5.4vw, 68px); line-height: 1; }
.lede { margin: 24px auto 0; max-width: 31em; font-size: clamp(18px, 1.8vw, 21px); color: var(--text-body); }
.muted { color: var(--text-secondary); }

/* Header and footer */

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 20px;
}
.wordmark { display: inline-flex; padding: 6px 0; }
.wordmark svg { width: 66px; height: 32px; }
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--text-body); text-decoration: none; padding: 10px 0; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav .btn-pill { padding: 10px 20px; color: var(--on-accent); }
.site-nav .btn-pill:hover { color: var(--on-accent); }
@media (max-width: 680px) {
  .site-nav .nav-link { display: none; }
}

.btn-pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; text-decoration: none; border-radius: 999px;
}
.btn-pill:hover { background: #63D29E; color: var(--on-accent); }

.site-footer { padding-block: clamp(72px, 10vw, 128px) 40px; }
.site-footer .footer-row {
  border-top: 1px solid var(--hairline); padding-top: 32px;
  display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center;
  font-size: 15px; color: var(--text-secondary);
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer nav a { color: var(--text-body); padding: 10px 0; }
.site-footer nav a:hover { color: var(--text); }

/* Hero */

.hero { padding-top: clamp(32px, 7vw, 88px); text-align: center; overflow: hidden; }
.pill {
  display: inline-block; margin: 0 0 22px; padding: 6px 14px;
  border: 1px solid var(--hairline); border-radius: 999px;
  font-size: 14px; color: var(--text-body);
}
.pill strong { color: var(--accent); }
.hero-actions {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 24px;
  margin-top: 36px;
}
.store-badge { display: inline-block; padding: 0; border-radius: 10px; }
.store-badge img { height: 56px; width: auto; }
.hero-actions .text-link { color: var(--text-body); font-weight: 600; font-size: 15px; padding: 10px 0; }

.card-row {
  position: relative;
  margin-top: clamp(44px, 7vw, 80px);
  height: clamp(230px, 30vw, 330px);
}
.card-row::before {
  content: ""; position: absolute; left: 0; right: 0; top: 46%;
  height: 3px; background: var(--accent);
}
.card-track {
  position: absolute; left: 50%; top: 0;
  display: flex; align-items: center; gap: clamp(14px, 2.2vw, 28px);
  transform: translateX(-50%);
}
.card-track img { width: clamp(200px, 22vw, 280px); flex: none; }
.card-track img:nth-child(1) { rotate: -4deg; }
.card-track img:nth-child(2) { rotate: 3deg; }
.card-track img:nth-child(3) { width: clamp(240px, 27vw, 340px); }
.card-track img:nth-child(4) { rotate: -3deg; }
.card-track img:nth-child(5) { rotate: 4deg; }

/* Feature tiles */

.section { padding-top: clamp(72px, 10vw, 128px); }
.section-head { margin-bottom: 32px; }
.section-head--center { text-align: center; }
.section-head .lede { margin-top: 16px; }

.tiles { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--wide { grid-column: span 2; }
}
@media (min-width: 1040px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile--full { grid-column: 1 / -1; }
}

.tile {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-hero);
  padding: 32px; overflow: hidden;
  display: flex; flex-direction: column; gap: 22px;
}
.tile h3 { margin: 0; font-size: clamp(34px, 3.4vw, 42px); line-height: 1; }
.tile p { margin: 14px 0 0; color: var(--text-body); }
.tile .kicker { margin-bottom: 10px; }
.tile--shot { padding-bottom: 0; }
.tile--wide.tile--shot { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.tile--wide.tile--shot .tile-copy { flex: 1 1 240px; align-self: flex-start; padding-bottom: 32px; }
.tile--colour { border: 0; color: var(--on-colour); }
.tile--colour p, .tile--colour .kicker { color: var(--on-colour); }
.tile--sage { background: var(--sage); }
.tile--sky { background: var(--sky); }
.tile--butter { background: var(--butter); }

.phone-crop {
  flex: none; width: 240px; height: 300px; margin: auto auto 0;
  border-radius: 36px 36px 0 0; padding: 7px 7px 0;
  background: var(--backdrop); border: 1px solid var(--hairline); border-bottom: 0;
}
.phone-crop--short { height: 230px; }
.tile--colour .phone-crop { border: 0; }
.phone-crop img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  border-radius: 30px 30px 0 0;
}

.opener {
  display: flex; align-items: center; gap: 12px;
  background: var(--butter); color: var(--on-colour);
  border-radius: var(--radius); padding: 16px 18px; font-weight: 500;
}
.opener svg { flex: none; width: 18px; height: 18px; }
.opener span { flex: 1; }
.opener b { font-weight: 700; }

/* Pricing */

.price-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
@media (min-width: 860px) { .price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.price-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-hero);
  padding: 32px; display: flex; flex-direction: column; gap: 12px;
}
.price-card h3 { margin: 0; font-size: 18px; font-weight: 700; }
.price-card .price { margin: 0; font-size: 56px; line-height: 1; }
.price-card .per { display: block; margin-top: 8px; font-family: var(--sans); font-size: 16px; color: var(--text-secondary); letter-spacing: 0; }
.price-card p { margin: 0; color: var(--text-secondary); }
.price-card ul { margin: 6px 0 0; padding-left: 20px; color: var(--text-body); display: grid; gap: 6px; }
.price-card--best { border: 2px solid var(--accent); padding: 31px; }
.save-chip {
  position: absolute; top: -14px; left: 30px;
  background: var(--accent); color: var(--on-accent);
  font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
}
.price-notes { margin: 24px auto 0; max-width: 46em; text-align: center; font-size: 15px; color: var(--text-secondary); }
.price-notes p { margin: 6px 0 0; }

/* FAQ */

.faq { display: grid; column-gap: 48px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .faq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.faq details { border-top: 1px solid var(--hairline); padding: 4px 0; }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 18px 40px 18px 0; font-size: 19px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 26px;
  width: 10px; height: 10px; border-right: 2px solid var(--text-secondary); border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 30px; }
.faq details > div { padding: 0 0 20px; color: var(--text-body); }
.faq details > div p { margin: 0 0 10px; }

/* Legal and support pages */

.page-head { padding-top: clamp(32px, 6vw, 72px); }
.prose { color: var(--text-body); font-size: 17px; line-height: 1.65; }
.prose h1 { margin: 0; color: var(--text); font-size: clamp(48px, 7vw, 88px); line-height: 0.95; }
.prose h2 { margin: 56px 0 12px; color: var(--text); font-size: clamp(30px, 3.6vw, 40px); line-height: 1.05; scroll-margin-top: 24px; }
.prose h3 { margin: 32px 0 8px; color: var(--text); font-size: 19px; font-weight: 700; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); }
.prose .updated { margin-top: 16px; color: var(--text-secondary); font-size: 15px; }
.prose .table-scroll { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--hairline); border-radius: var(--radius); }
.prose table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
.prose th { color: var(--text); background: var(--surface); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.callout {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 20px 22px; margin: 24px 0;
}
.callout p:last-child { margin-bottom: 0; }
.toc { columns: 2 220px; column-gap: 32px; padding-left: 20px; margin: 24px 0 0; }
.toc li { break-inside: avoid; }
.help-list { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin: 24px 0 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .help-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.help-list li { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 22px; margin: 0; }
.help-list h3 { margin: 0 0 8px; }
.help-list p:last-child { margin-bottom: 0; }

.not-found { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; text-align: center; }

/* Motion: only with scripts on and Reduce Motion off. Everything is visible
   without it. */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .card-track { animation: drift 28s ease-in-out infinite alternate; }
}
@keyframes drift {
  from { transform: translateX(calc(-50% - 60px)); }
  to { transform: translateX(calc(-50% + 60px)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* On phones, policy tables become one labelled card per row instead of
   scrolling sideways. */
@media (max-width: 640px) {
  .prose .table-scroll { overflow: visible; border: 0; border-radius: 0; }
  .prose table { min-width: 0; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
  .prose tr { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 6px 0; margin-bottom: 10px; }
  .prose td { border: 0; padding: 8px 16px; }
  .prose td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 2px; }
}
