/*
 * karuo.app. Colours mirror apps/mobile/src/theme/tokens.ts (and derive.ts); the type is the app's,
 * Atkinson Hyperlegible Next (OFL, fonts/OFL.txt). No outside requests. Pictures carry the meaning;
 * words (strings/<lang>.json) sit beside them, so nothing to translate is ever inside an image.
 */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/fonts/AtkinsonHyperlegibleNext-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/fonts/AtkinsonHyperlegibleNext-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #fbf9f4;
  --ground: #f1eee6;
  --ink: #1f1d19;
  --ink-2: #615f5b;
  --ink-3: #9a9894;
  --line: #dcdad5;
  --quote: #f0eee9;
  --brand: #d4901f;
  --brand-ink: #fbf9f4;
  --brand-soft: #f5e8d2;
  --rec: #c8453a;
  --moss: #5b6e3a;
  --moss-tint: #e5e6da;
  --slate: #4a6c8c;
  --slate-tint: #e2e5e5;
  --plum: #8a5a7a;
  --plum-tint: #ebe3e3;
  /* Skies for the time-zone pictures. */
  --day: #f7e9cc;
  --night: #27304a;
  --night-ink: #e9e4d6;
  --frame: #1f1d19;
  --shadow: 0 30px 60px -30px rgba(31, 29, 25, 0.35), 0 12px 24px -16px rgba(31, 29, 25, 0.2);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1916;
    --ground: #121110;
    --ink: #eeeae2;
    --ink-2: #afaba5;
    --ink-3: #787570;
    --line: #393633;
    --quote: #262320;
    --brand: #e8ab45;
    --brand-ink: #1b1916;
    --brand-soft: #544223;
    --rec: #e56a5c;
    --moss: #9db36b;
    --moss-tint: #323525;
    --slate: #8fb0cc;
    --slate-tint: #303437;
    --plum: #c293b3;
    --plum-tint: #392f32;
    --day: #3b3322;
    --night: #1a2030;
    --night-ink: #d9d3c4;
    --frame: #3a3733;
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7), 0 12px 24px -16px rgba(0, 0, 0, 0.5);
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font:
    17px/1.55 'Atkinson Hyperlegible Next',
    system-ui,
    sans-serif;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
img,
svg {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3 {
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}
.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 720px) {
  .wrap {
    padding: 0 28px;
  }
}

/* Header */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.2rem;
  text-decoration: none;
}
.brand svg {
  width: 40px;
}
.bar nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.95rem;
}
.bar nav a:not(.pill) {
  color: var(--ink-2);
  text-decoration: none;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
}
.pill.big {
  font-size: 1.05rem;
  padding: 0.85rem 1.5rem;
}
.pill.quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

/* Language menu: works without script (details/summary). */
.lang {
  position: relative;
}
.lang summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-2);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}
.lang summary::-webkit-details-marker {
  display: none;
}
.lang summary:hover,
.lang[open] summary {
  background: var(--paper);
}
.lang summary svg {
  width: 18px;
  height: 18px;
}
.lang .short {
  display: none;
  font-weight: 600;
  font-size: 0.85rem;
}
.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 10;
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  min-width: 13rem;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.lang ul a {
  display: block;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
}
.lang ul a:hover {
  background: var(--ground);
}
.lang ul a[aria-current] {
  font-weight: 600;
  color: var(--brand);
}
@media (max-width: 560px) {
  .bar nav {
    gap: 0.5rem;
  }
  .bar nav .wide,
  .lang .long {
    display: none;
  }
  .lang .short {
    display: inline;
  }
}
@media (max-width: 400px) {
  .bar .brand {
    font-size: 1.05rem;
    gap: 0.45rem;
  }
  .bar .brand svg {
    width: 34px;
  }
  .bar .pill {
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
  }
  .lang summary {
    padding: 0.4rem 0.45rem;
  }
}

/* Hero */
.hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}
@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    padding-top: 3rem;
    padding-bottom: 6rem;
  }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-2);
  background: var(--paper);
  border-radius: 999px;
  padding: 0.3rem 0.8rem 0.3rem 0.6rem;
  margin-bottom: 1.25rem;
}
.eyebrow svg {
  width: 16px;
  height: 16px;
}
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.hero .lead {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  color: var(--ink-2);
  max-width: 34rem;
  margin-bottom: 2rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* A phone showing a conversation, drawn the way the app draws it (docs/design/mockup.html). */
.phone {
  justify-self: center;
  width: min(100%, 340px);
  background: var(--paper);
  border: 10px solid var(--frame);
  border-radius: 44px;
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
}
.phone .top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.6rem 1rem 0.7rem;
  border-bottom: 1px solid var(--line);
}
.phone .top b {
  font-size: 1.15rem;
}
.there {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--ink-2);
  background: var(--ground);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-variant-numeric: tabular-nums;
}
.there svg {
  width: 13px;
  height: 13px;
}
.feed {
  padding: 1rem 1rem 0.5rem;
}
.msg {
  display: grid;
  grid-template-columns: 22px 1fr;
  column-gap: 10px;
  margin-bottom: 1rem;
}
.gutter {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: 0.7rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.rail {
  flex: 1;
  width: 3px;
  border-radius: 2px;
  margin-top: 4px;
  background: linear-gradient(var(--line) var(--heard, 0%), currentColor var(--heard, 0%));
}
.who {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  line-height: 22px;
  color: var(--ink-3);
}
.who b {
  font-weight: 600;
}
.moss {
  color: var(--moss);
}
.slate {
  color: var(--slate);
}
.words {
  margin-top: 0.15rem;
  color: var(--ink);
}
.words .heard {
  color: var(--ink-3);
}
.words .picked {
  background: var(--brand-soft);
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.quote {
  border-left: 3px solid var(--moss);
  background: var(--quote);
  border-radius: 0 8px 8px 0;
  padding: 0.4rem 0.6rem;
  margin: 0.3rem 0 0.4rem;
  color: var(--ink-2);
}
.quote b {
  display: block;
  font-size: 0.72rem;
  color: var(--moss);
}
.chip {
  display: inline-flex;
  gap: 0.3rem;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  border: 1px solid var(--line);
  background: var(--slate-tint);
  border-radius: 10px;
  padding: 0 0.45rem;
  color: var(--slate);
  font-variant-numeric: tabular-nums;
}
.controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.9rem 1.2rem;
  border-top: 1px solid var(--line);
}
.controls .sq {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--ground);
  display: grid;
  place-items: center;
}
.controls .play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand);
  display: grid;
  place-items: center;
}
.controls .mic {
  flex: 1;
  height: 46px;
  border-radius: 18px;
  background: var(--rec);
  display: grid;
  place-items: center;
}
.controls svg {
  width: 18px;
  height: 18px;
}

/* Sections */
section {
  padding: 4rem 0;
}
@media (min-width: 880px) {
  section {
    padding: 5.5rem 0;
  }
}
.band {
  background: var(--paper);
}
.head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 3rem;
}
.head h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.head p {
  margin-top: 0.75rem;
  color: var(--ink-2);
  font-size: 1.1rem;
}

/* Across time zones: three moments, one after another. */
.moments {
  display: grid;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: moment;
}
@media (min-width: 760px) {
  .moments {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.25rem;
  }
  .moments li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 38%;
    right: -1.7rem;
    width: 1.2rem;
    height: 1.2rem;
    border-top: 3px solid var(--brand);
    border-right: 3px solid var(--brand);
    transform: rotate(45deg);
    border-radius: 2px;
  }
}
.moments li {
  position: relative;
  max-width: 26rem;
  width: 100%;
  margin: 0 auto;
}
.moments svg {
  width: 100%;
  height: auto;
  border-radius: 22px;
}
.moments p {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 1.05rem;
}

/* What it does */
.features {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.feature {
  background: var(--paper);
  border-radius: 24px;
  padding: 1.5rem 1.5rem 1.75rem;
}
.band .feature {
  background: var(--ground);
}
.feature svg {
  width: 100%;
  height: auto;
  margin-bottom: 1.25rem;
}
.feature h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
.feature p {
  color: var(--ink-2);
}

/* How to get it */
.steps {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  background: var(--ground);
  border-radius: 20px;
  padding: 1.25rem 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.band .steps li {
  background: var(--ground);
}
.steps svg {
  flex: none;
  width: 48px;
  height: 48px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
}
.center {
  text-align: center;
}
.note {
  color: var(--ink-3);
  font-size: 0.95rem;
}

/* Footer */
footer {
  padding: 2.5rem 0 3rem;
  color: var(--ink-3);
  font-size: 0.9rem;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}
footer .brand {
  font-size: 1rem;
  color: var(--ink-2);
}
footer .brand svg {
  width: 28px;
}

/* Single pages: privacy, invite, download */
.doc {
  max-width: 40rem;
  padding-bottom: 3rem;
}
.doc h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 1rem 0 1rem;
}
.doc h2 {
  font-size: 1.2rem;
  margin: 2.25rem 0 0.5rem;
}
.doc p {
  color: var(--ink-2);
  margin-bottom: 0.9rem;
}
.doc .lead {
  font-size: 1.15rem;
  color: var(--ink);
}
.card {
  background: var(--paper);
  border-radius: 28px;
  padding: 2rem 1.5rem;
  margin-top: 1rem;
}
@media (min-width: 600px) {
  .card {
    padding: 2.5rem 2.5rem;
  }
}
.card > svg.picture {
  width: 100%;
  height: auto;
  margin-bottom: 1.5rem;
}
.card .pill {
  width: 100%;
  justify-content: center;
  margin: 0.75rem 0;
}
.card .steps {
  grid-template-columns: 1fr;
  margin: 1.75rem 0 1rem;
}
.card .steps li {
  flex-direction: row;
  align-items: center;
  padding: 0.9rem 3rem 0.9rem 1rem;
}
.card .steps li::before {
  top: 50%;
  transform: translateY(-50%);
}
.card .steps svg {
  width: 36px;
  height: 36px;
}

/* Picture palette: inline SVGs colour themselves from the tokens, in light and dark. */
.f-paper {
  fill: var(--paper);
}
.f-ground {
  fill: var(--ground);
}
.f-line {
  fill: var(--line);
}
.f-ink {
  fill: var(--ink);
}
.f-ink3 {
  fill: var(--ink-3);
}
.f-brand {
  fill: var(--brand);
}
.f-brand-soft {
  fill: var(--brand-soft);
}
.f-rec {
  fill: var(--rec);
}
.f-moss {
  fill: var(--moss);
}
.f-moss-tint {
  fill: var(--moss-tint);
}
.f-slate {
  fill: var(--slate);
}
.f-slate-tint {
  fill: var(--slate-tint);
}
.f-plum {
  fill: var(--plum);
}
.f-plum-tint {
  fill: var(--plum-tint);
}
.f-day {
  fill: var(--day);
}
.f-night {
  fill: var(--night);
}
.f-night-ink {
  fill: var(--night-ink);
}
.f-frame {
  fill: var(--frame);
}
.s-line,
.s-brand,
.s-ink,
.s-ink3,
.s-paper,
.s-moss,
.s-slate,
.s-frame,
.s-night-ink,
.s-rec,
.s-current {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.s-line {
  stroke: var(--line);
}
.s-brand {
  stroke: var(--brand);
}
.s-ink {
  stroke: var(--ink);
}
.s-ink3 {
  stroke: var(--ink-3);
}
.s-paper {
  stroke: var(--paper);
}
.s-moss {
  stroke: var(--moss);
}
.s-slate {
  stroke: var(--slate);
}
.s-frame {
  stroke: var(--frame);
}
.s-night-ink {
  stroke: var(--night-ink);
}
.s-rec {
  stroke: var(--rec);
}
.s-current {
  stroke: currentColor;
}
.t-time {
  fill: var(--ink);
  font:
    600 15px 'Atkinson Hyperlegible Next',
    system-ui,
    sans-serif;
  font-variant-numeric: tabular-nums;
}
.t-time.night {
  fill: var(--night-ink);
}

/* The account deletion form (delete-account.html, ADR 0027). */
form.delete {
  display: grid;
  gap: 12px;
  max-width: 420px;
  margin: 8px 0 16px;
}
form.delete label {
  display: grid;
  gap: 6px;
  color: var(--ink-2);
}
form.delete input {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
form.delete input:focus {
  outline: none;
  border-color: var(--brand);
}
form.delete .step {
  display: grid;
  gap: 12px;
}
form.delete .step[hidden] {
  display: none;
}
.pill.danger {
  background: var(--rec);
  color: var(--brand-ink);
}
form.delete .status:empty {
  display: none;
}
button.pill {
  border: 0;
  cursor: pointer;
  font: inherit;
  justify-self: start;
}
