/* A Good Time — one stylesheet, no web fonts, no external requests.
 * Palette from mobile/src/theme.ts: warm, dim, after dark. */

:root {
  --bg: #14110F;
  --bg-deep: #0E0C0A;
  --surface: #1E1A17;
  --border: #2E2823;
  --text: #E8DCC8;
  --text-dim: #A89D8D;   /* app's textDim (#9A8F80), a touch lighter for long reading */
  --text-faint: #6B6257; /* decorative only; too faint for body text */
  --accent: #C97B4A;
  --accent-soft: #D98E5E;
  --accent-dim: #7A4A2C;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --max: 68rem;
  --radius: 14px;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
body > main:focus { outline: none; }

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

a {
  color: var(--accent-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--text); }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
  hyphens: auto;
  overflow-wrap: break-word;
}

p { margin: 0; }

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 0.75rem; color: var(--bg); }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------------------------------------------------------------- header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.2rem;
  white-space: nowrap;
}
.brand svg { width: 1.6rem; height: 1.6rem; flex: none; }
.brand:hover { color: var(--text); }

.lang-switch ul {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.lang-switch a {
  display: inline-block;
  min-width: 2.5rem;
  padding: 0.45rem 0.4rem;
  text-align: center;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
}
.lang-switch a:hover { color: var(--text); }
@media (max-width: 359px) {
  .brand { font-size: 1.05rem; gap: 0.45rem; }
  .lang-switch a { min-width: 2rem; padding-inline: 0.25rem; }
}
.lang-switch a[aria-current="page"] {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 2rem 0 4.5rem;
}
.hero::before {
  /* Lamplight: a warm glow behind the phone that fades out well before the
   * edges of the section, so it never ends in a visible line. */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 78%, rgba(201, 123, 74, 0.13), rgba(201, 123, 74, 0) 42%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}
.eyebrow {
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.75rem, 9vw, 5.25rem);
  line-height: 1;
  margin-bottom: 1.25rem;
}
.hero .promise {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3.4vw, 1.6rem);
  line-height: 1.4;
  max-width: 30ch;
  margin-bottom: 1rem;
}
.hero .sub {
  color: var(--text-dim);
  margin-bottom: 2rem;
}

/* The store button: plain, no Google artwork. */
.store {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  line-height: 1.2;
  max-width: 100%;
}
@media (max-width: 360px) { .store { padding: 0.85rem 1.1rem; font-size: 0.95rem; gap: 0.55rem; } }
.store svg { width: 1.1rem; height: 1.1rem; flex: none; }
a.store {
  background: var(--accent);
  color: var(--bg);
}
a.store:hover { background: var(--accent-soft); color: var(--bg); }
/* Not a button while Play is unavailable: a quiet status line. */
.store--soon {
  padding: 0.25rem 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--text-dim);
  font-weight: 500;
}
.platform-note {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-dim);
}

@media (min-width: 880px) {
  .hero { padding: 3rem 0 6rem; }
  .hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 4rem; }
  .hero::before { background: radial-gradient(circle at 74% 52%, rgba(201, 123, 74, 0.14), rgba(201, 123, 74, 0) 34%); }
}

/* ---------------------------------------------------------------- mockup */

.phone-stage {
  display: flex;
  justify-content: center;
}
.phone {
  width: min(290px, 100%);
  border-radius: 40px;
  padding: 10px;
  background: #0A0908;
  border: 1px solid #2A2521;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.screen {
  border-radius: 31px;
  background: var(--bg);
  padding: 0.7rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  min-height: 560px;
  font-family: var(--sans);
  color: var(--text);
  overflow: hidden;
}
.status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 0 0.2rem 0.6rem;
  font-variant-numeric: tabular-nums;
}
.status .icons { display: flex; gap: 4px; align-items: center; }
.status .icons i {
  display: block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-faint);
}
.status .icons i:last-child { width: 14px; border-radius: 2px; background: var(--text-dim); }

.chips { display: flex; gap: 6px; flex-wrap: nowrap; overflow: hidden; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: #9A8F80;
  font-size: 0.78rem;
  white-space: nowrap;
}
.chip .tick {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--text-faint);
}
.chip.on { border-color: var(--accent); background: var(--surface); color: var(--text); font-weight: 600; }
.chip.on .tick { border-color: var(--accent); background: var(--accent); }
.chip.add { border-style: dashed; color: var(--text-faint); padding: 5px 11px; }
.toggle { font-size: 0.66rem; color: var(--accent); padding-top: 6px; }

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 0 0.4rem;
}
.gets {
  min-height: 2.9em;
  display: flex;
  align-items: center;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #9A8F80;
  max-width: 17em;
}
.record {
  position: relative;
  width: 150px;
  height: 150px;
  margin-top: 0.9rem;
  display: grid;
  place-items: center;
}
/* The idle look of mobile/src/record-button.tsx: halo and ring are invisible
   at rest and the core fills the ring, so only one circle shows. */
.record .core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent-dim);
}
.record .label {
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  padding-left: 0.07em;
}
.photo-btn {
  margin-top: 1.1rem;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--accent-dim);
  font-size: 0.82rem;
}
.outbox { padding-top: 0.9rem; }
.outbox .heading {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.35rem;
}
.outbox .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.74rem;
  line-height: 1.35;
}
.outbox .row span { display: block; }
.outbox .row .to { color: #9A8F80; font-size: 0.68rem; }
.outbox .row .del { color: var(--text-faint); font-size: 0.66rem; }
.app-foot {
  display: flex;
  gap: 1.1rem;
  font-size: 0.66rem;
  color: var(--text-faint);
  padding-top: 0.7rem;
}

/* -------------------------------------------------------------- sections */

.section { padding: 4.5rem 0; }
.section + .section { border-top: 1px solid var(--border); }
.section h2 {
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  margin-bottom: 0.9rem;
}
.section .intro {
  color: var(--text-dim);
  font-size: 1.125rem;
  max-width: 40rem;
}

/* How it works: a day line that ends in 19:00. */
.day {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  gap: 2.5rem;
}
.day li { position: relative; padding-left: 2.25rem; }
/* The day line: one segment from each dot to the next, ending at 19:00. */
.day li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 7px;
  top: calc(0.35rem + 15px);
  bottom: calc(-2.5rem - 0.35rem);
  width: 1px;
  background: linear-gradient(var(--border), var(--accent-dim));
}
.day .dot {
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--text-faint);
}
.day li:nth-child(2) .dot { border-color: var(--accent-dim); }
.day li:last-child .dot { border-color: var(--accent); background: var(--accent); }
.day .time {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.4rem;
}
.day h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.day p { color: var(--text-dim); max-width: 34rem; }

.big-time {
  font-family: var(--serif);
  font-size: clamp(4.5rem, 20vw, 9rem);
  line-height: 0.9;
  color: var(--accent);
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums;
  margin: 0;
}

.evening { display: grid; gap: 1.5rem; align-items: center; margin-top: 3.5rem; }
.notif-block { display: grid; gap: 1rem; }
.notif {
  max-width: 24rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.2rem 0.75rem;
  align-items: center;
  padding: 0.9rem 1.1rem;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.9);
}
.notif .icon {
  grid-row: span 2;
  width: 2.2rem; height: 2.2rem;
  border-radius: 50%;
  background: var(--bg);
  display: grid;
  place-items: center;
}
.notif .icon svg { width: 1.25rem; height: 1.25rem; }
.notif .app { font-size: 0.8rem; color: var(--text-dim); }
.notif .when { font-size: 0.8rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.notif .body { grid-column: 2 / 4; font-size: 0.98rem; }
.notif-caption { color: var(--text-dim); max-width: 26rem; }
.timing-note {
  margin-top: 2rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  max-width: 40rem;
}
@media (min-width: 720px) {
  .day { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .day li:not(:last-child)::before { left: 15px; right: -2rem; top: 7px; bottom: auto; width: auto; height: 1px;
    background: linear-gradient(90deg, var(--border), var(--accent-dim)); }
  .day li { padding-left: 0; padding-top: 2.25rem; }
  .day .dot { top: 0; }
  .evening { grid-template-columns: auto 1fr; gap: 3.5rem; }
}

/* What it is not */
.nots {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.75rem 2.5rem;
}
.nots li { border-top: 1px solid var(--border); padding-top: 1.1rem; }
.nots h3 {
  font-size: 1.3rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.nots h3::before {
  content: "";
  width: 0.85rem;
  height: 1.5px;
  background: var(--accent);
  flex: none;
}
.nots p { color: var(--text-dim); }
@media (min-width: 640px) { .nots { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .nots { grid-template-columns: repeat(3, 1fr); } }

/* Details */
.cards {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem;
}
.card h3 { font-size: 1.25rem; margin-bottom: 0.45rem; }
.card p { color: var(--text-dim); font-size: 0.98rem; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }

/* Privacy summary */
.privacy-panel {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  padding: 2rem 1.4rem;
  background: linear-gradient(160deg, var(--surface), var(--bg) 70%);
}
.privacy-panel ul {
  margin: 1.75rem 0 2rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
  max-width: 44rem;
}
.privacy-panel li { position: relative; padding-left: 1.5rem; }
.privacy-panel li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.text-link {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
}
.text-link:hover { border-color: var(--accent); color: var(--text); }
@media (min-width: 720px) { .privacy-panel { padding: 3rem; } }

/* FAQ */
.faq { margin-top: 2rem; max-width: 46rem; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--sans);
  color: var(--accent-soft);
  font-size: 1.4rem;
  line-height: 1;
  flex: none;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--text-dim); padding: 0 0 1.3rem; max-width: 40rem; }

/* Closing */
.closing { text-align: center; padding: 6rem 0; position: relative; overflow: hidden; }
.closing::before {
  content: "";
  position: absolute;
  inset: 20% -10% -40%;
  background: radial-gradient(ellipse at 50% 70%, rgba(201, 123, 74, 0.12), rgba(201, 123, 74, 0) 60%);
  pointer-events: none;
}
.closing .wrap { position: relative; }
.closing .moon { width: 3.25rem; height: 3.25rem; margin: 0 auto 1.75rem; }
.closing h2 { font-size: clamp(2.2rem, 7vw, 3.75rem); margin-bottom: 0.9rem; }
.closing p { color: var(--text-dim); font-size: 1.15rem; margin-bottom: 2rem; }

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  padding: 2.5rem 0 3rem;
  font-size: 0.9375rem;
}
.site-footer .wrap { display: grid; gap: 1.5rem; }
.site-footer .tagline { color: var(--text-dim); display: flex; gap: 0.6rem; align-items: center; }
.site-footer .tagline svg { width: 1.2rem; height: 1.2rem; flex: none; }
.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.site-footer nav a { color: var(--text); text-decoration: none; padding: 0.25rem 0; display: inline-block; }
.site-footer nav a:hover { color: var(--accent-soft); text-decoration: underline; }
@media (min-width: 720px) {
  .site-footer .wrap { grid-template-columns: 1fr auto auto; align-items: center; gap: 2rem; }
}

/* ------------------------------------------------------------ prose pages */

.page { padding: 2.5rem 0 5rem; }
.prose { max-width: 44rem; }
.prose h1 { font-size: clamp(1.8rem, 7vw, 3.25rem); margin-bottom: 1.25rem; }
.prose h2 { font-size: 1.6rem; margin: 3rem 0 1rem; }
.prose h3 { font-size: 1.25rem; margin: 2rem 0 0.6rem; }
.prose p, .prose ul, .prose ol, .prose dl, .prose address { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--accent-soft); }
.prose .lede { font-size: 1.15rem; color: var(--text-dim); }
.prose .meta-line { font-size: 0.875rem; color: var(--text-dim); margin-bottom: 2rem; }
.prose address {
  font-style: normal;
  padding: 1rem 1.2rem;
  border-left: 2px solid var(--accent-dim);
  background: var(--surface);
  border-radius: 0 8px 8px 0;
}
.prose strong { font-weight: 600; color: var(--text); }
.prose .note { color: var(--text-dim); }
.prose a { overflow-wrap: anywhere; }

.data-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 0.4rem;
  margin: 0 0 1rem;
  background: var(--surface);
}
.data-item h3 { margin: 0 0 0.8rem; }
.data-item dl { margin: 0; }
.data-item dt {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
.data-item dd { margin: 0.15rem 0 0.9rem; color: var(--text); }
.data-item .note { margin: 0 0 1rem; font-size: 0.95rem; }

mark.todo {
  background: #5A2E1C;
  color: #FFE8D6;
  padding: 0.05em 0.3em;
  border-radius: 4px;
  outline: 1px dashed var(--accent);
  overflow-wrap: anywhere;
}

.draft-banner {
  font-size: 0.875rem;
  color: #FFE8D6;
  background: #3A2217;
  border: 1px dashed var(--accent);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps li { counter-increment: step; position: relative; padding-left: 2.6rem; margin-bottom: 1rem; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -0.05rem;
  width: 1.8rem; height: 1.8rem;
  border-radius: 50%;
  border: 1px solid var(--accent-dim);
  display: grid;
  place-items: center;
  font-size: 0.875rem;
  color: var(--accent-soft);
}

/* ------------------------------------------------------------------- 404 */

.lost { padding: 5rem 0 7rem; text-align: center; }
.lost .moon { width: 3rem; height: 3rem; margin: 0 auto 1.5rem; }
.lost h1 { font-size: clamp(2.2rem, 7vw, 3.25rem); margin-bottom: 0.8rem; }
.lost p { color: var(--text-dim); margin-bottom: 2rem; }
.lost ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; justify-items: center; }

/* ------------------------------------------------------------- behaviour */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .faq summary::after { transition: transform 0.2s ease; }
  a, .text-link, .store { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
}

@media (forced-colors: active) {
  .chip.on, a.store, .text-link, .card, .data-item { border: 1px solid CanvasText; }
}

@media print {
  body { background: #fff; color: #000; }
  .site-header nav, .skip-link, .hero::before, .closing::before { display: none; }
  a { color: #000; }
}
