/* SideTape website. Colours are the app's own, from Palette.swift in the app:
   paper, surface, card, ink, groupTitle (muted), live, mineTint (your part), cueWash (your cue),
   partLilac (another part), partnerText, and the three stage pens. Red is kept for live states only. */

:root {
  color-scheme: light dark;
  --paper: #F7F5EE;
  --surface: #FFFFFF;
  --card: #E7E4DC;
  --ink: #161616;
  --muted: #5A5A55;
  --rule: rgba(22, 22, 22, 0.14);
  --live: #C62828;
  --mine: #F4D35E;
  --cue: #F9CDBA;
  --other: #E6E0F2;
  --partner: #405F82;
  --learn-pen: #B9E3B0;
  --rehearse-pen: #BCD0F7;
  --selftape-pen: #DDCDEA;
  --band: #161616;
  --band-text: #F7F5EE;
  --band-muted: #C9C6BE;
  --shadow: 0 1px 2px rgba(22, 22, 22, 0.06), 0 12px 32px rgba(22, 22, 22, 0.08);

  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --wordmark: Georgia, ui-serif, "New York", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 13px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121212;
    --surface: #1E1E1E;
    --card: #2A2A2A;
    --ink: #EDEBE6;
    --muted: #B8B6B0;
    --rule: rgba(237, 235, 230, 0.16);
    --live: #E53935;
    --mine: #725B1A;
    --cue: #5A2A1E;
    --other: #2F2A42;
    --partner: #A6C4E3;
    --learn-pen: #1F4A31;
    --rehearse-pen: #24386E;
    --selftape-pen: #3A2A4E;
    --band: #1E1E1E;
    --band-text: #EDEBE6;
    --band-muted: #B8B6B0;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--sans);
  overflow-wrap: break-word;
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.6rem + 3.4vw, 4rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.35rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

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

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Header ------------------------------------------------------------------------------------- */

.site-header { border-bottom: 1px solid var(--rule); }

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand img { width: 40px; height: 40px; border-radius: 22%; }
.wordmark { font-family: var(--wordmark); font-size: 1.5rem; letter-spacing: -0.01em; }

.site-nav ul,
.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-nav a {
  display: inline-block;
  padding: 0.5rem 0;
  font-size: 0.98rem;
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; }
@media (max-width: 30rem) {
  .site-nav ul { gap: 0 0.85rem; }
  .site-nav a { font-size: 0.9rem; }
}
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: currentColor;
}

/* Buttons and small type --------------------------------------------------------------------- */

.eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.lede { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem); max-width: 34em; }
.fine { font-size: 0.92rem; color: var(--muted); max-width: 34em; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 1.25rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}
.button:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.button-quiet { background: transparent; color: var(--ink); }

/* The highlighter swipe behind a word, as the app marks your part and the selected stage. */
.swipe {
  background: linear-gradient(transparent 58%, var(--mine) 58%, var(--mine) 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 0.08em;
}
.pen-learn { --pen: var(--learn-pen); }
.pen-rehearse { --pen: var(--rehearse-pen); }
.pen-selftape { --pen: var(--selftape-pen); }
.pen {
  background: linear-gradient(transparent 52%, var(--pen) 52%, var(--pen) 94%, transparent 94%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 0.1em;
}

/* The live dot: the only red on the site, and only where something is listening or recording. */
.live-dot {
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--live);
  flex: none;
}
@media (prefers-reduced-motion: no-preference) {
  .live-dot.pulse { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: 0.35; } }
}

/* Sections ----------------------------------------------------------------------------------- */

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-intro { max-width: 40rem; margin-bottom: 2.25rem; }
.section-intro p { color: var(--muted); font-size: 1.1rem; }

.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.page-head .lede { color: var(--ink); }

/* Home hero ---------------------------------------------------------------------------------- */

.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: 1.1fr 1fr; }
}

/* The script card: the sample scene as it looks in Rehearse. */
.scene {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: clamp(1.1rem, 3.5vw, 1.75rem);
  font-family: var(--serif);
}
.scene-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
  padding-bottom: 0.9rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.9rem;
}
.scene-title { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--card);
  font-weight: 600;
}
.scene-line { margin: 0 0 1.1rem; }
.scene-line:last-of-type { margin-bottom: 0; }
.who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.3rem;
  font-family: var(--sans);
  font-size: 0.8rem;
}
.name {
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}
.name-mine { background: var(--mine); }
.name-other { background: var(--other); }
.tag { color: var(--muted); }
.said { margin: 0; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); line-height: 1.45; }
.scene-line.other .said { color: var(--partner); }
.scene-line.waiting { border-left: 2px dashed var(--rule); padding-left: 0.75rem; }
.scene-line.waiting .said { color: var(--muted); }
.cue { background: var(--cue); color: var(--ink); padding: 0.05em 0.15em; border-radius: 4px; }
.scene figcaption {
  margin-top: 1.25rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--muted);
}

/* Feature cards ------------------------------------------------------------------------------ */

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.1rem;
}
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--muted); margin-bottom: 0.4rem; }
.card .more { margin-top: 0.6rem; }

.after-cards { margin-top: 1.75rem; }

/* Spoken commands and headphone presses ------------------------------------------------------ */

.split { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) {
  .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
}

.commands {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}
.commands li {
  font-family: var(--serif);
  font-size: 1.15rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--rule);
}

.presses { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.presses li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.presses li:first-child { border-top: 1px solid var(--rule); }
.press { font-weight: 600; white-space: nowrap; }

/* Privacy band ------------------------------------------------------------------------------- */

.band {
  background: var(--band);
  color: var(--band-text);
  border-block: 1px solid var(--rule);
}
.band .section-intro p,
.band li span { color: var(--band-muted); }
.band :focus-visible { outline-color: var(--band-text); }
.promises {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}
.promises li { border-top: 1px solid rgba(247, 245, 238, 0.25); padding-top: 1rem; }
.promises strong { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin-bottom: 0.3rem; }

/* How it works steps ------------------------------------------------------------------------- */

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 2rem;
  padding: 2.25rem 0;
  border-top: 1px solid var(--rule);
}
.step::before {
  content: counter(step);
  font-family: var(--serif);
  font-size: 2.75rem;
  line-height: 1;
  color: var(--muted);
}
@media (min-width: 48rem) {
  .step { grid-template-columns: 5rem 1fr; }
}
.step h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }
.step-body { max-width: 42rem; }
.step-body ul { padding-left: 1.2rem; margin: 0 0 1em; }
.step-body li { margin-bottom: 0.35rem; }

/* Long reading pages: features, about, contact, privacy -------------------------------------- */

.prose { max-width: 42rem; }
.prose h2 { margin-top: 2.2em; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.45rem; }
.prose code { font-size: 0.92em; }

.policy { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); }
.policy h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem); }
.policy h1 + p { color: var(--muted); }

.feature-group { padding: clamp(2rem, 5vw, 3rem) 0; border-top: 1px solid var(--rule); }
.feature-group > h2 { max-width: 40rem; }
.feature-group > p { max-width: 40rem; color: var(--muted); font-size: 1.1rem; }
.feature-list {
  display: grid;
  gap: 1.5rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.feature-list h3 { font-size: 1.15rem; margin-bottom: 0.25rem; }
.feature-list p { margin: 0; color: var(--muted); }

.notice {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  max-width: 42rem;
}
.notice p:last-child { margin-bottom: 0; }

.email-large {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1rem + 2.2vw, 2.25rem);
  overflow-wrap: anywhere;
}

.closing { text-align: left; }

/* Footer ------------------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.site-footer a { color: var(--ink); }
.footer-grid { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 48rem) {
  .footer-grid { grid-template-columns: 1.4fr 1fr; }
}
.footer-brand { font-family: var(--wordmark); font-size: 1.3rem; color: var(--ink); margin-bottom: 0.4rem; }
.site-footer nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.2rem 1.5rem; }
.site-footer nav a { display: inline-block; padding: 0.35rem 0; }
.email { overflow-wrap: anywhere; }
.legal { font-size: 0.85rem; margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--rule); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header nav, .skip, .actions { display: none; }
  body { background: #fff; color: #000; }
}
