/* doc.css
 *
 * Long-form pages that live on melodreams.com itself, not on the legal
 * subdomain: /about and /promise.
 *
 * These are NOT legal documents and they should not look like one. They are the
 * two pages a person reads when they are deciding whether to trust us with the
 * page their name lives on, so they get the home page's world (dark, Onest,
 * calm) with an editorial rhythm on top: one column, generous measure, real
 * typographic hierarchy, and nothing competing with the words.
 *
 * The reference is DuckDuckGo's about page. Plain language, strong point of
 * view, no marketing furniture, and long enough to actually say something.
 */

:root {
  --doc-ink:      rgba(255, 255, 255, 0.92);
  --doc-body:     rgba(255, 255, 255, 0.66);
  --doc-mute:     rgba(255, 255, 255, 0.44);
  --doc-rule:     rgba(255, 255, 255, 0.10);
  --doc-rule-2:   rgba(255, 255, 255, 0.06);
  /* Brand primary. Same blue the home page uses for .text-anything, the phone
     glow and the progress bar. These pages sit one click from the homepage, so
     a different accent would read as a different site. */
  --doc-accent:   #3b82f6;
  --doc-accent-soft: rgba(59, 130, 246, 0.55);
  --doc-surface:  rgba(255, 255, 255, 0.03);
}

.doc {
  max-width: 44rem;              /* ~66 characters at this size */
  margin: 0 auto;
  padding: 140px 24px 120px;
  color: var(--doc-body);
  font-size: 17px;
  line-height: 1.72;
}

/* ── Masthead ─────────────────────────────────────────────────────────────── */

.doc__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--doc-mute);
  font-weight: 600;
}
.doc__eyebrow::before {
  content: '';
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.doc h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: #fff;
  text-wrap: balance;
}

.doc__lede {
  margin: 0 0 14px;
  font-size: clamp(19px, 2.4vw, 22px);
  line-height: 1.55;
  color: var(--doc-ink);
  text-wrap: pretty;
}

.doc__meta {
  margin: 0;
  font-size: 13px;
  color: var(--doc-mute);
}

.doc__masthead {
  padding-bottom: 44px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--doc-rule);
}

/* ── Body ─────────────────────────────────────────────────────────────────── */

.doc h2 {
  margin: 64px 0 18px;
  font-size: clamp(23px, 3vw, 28px);
  line-height: 1.22;
  letter-spacing: -0.015em;
  font-weight: 600;
  color: #fff;
  text-wrap: balance;
}

.doc h3 {
  margin: 40px 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--doc-ink);
}

.doc p { margin: 0 0 20px; }

.doc strong { color: var(--doc-ink); font-weight: 600; }
.doc em { color: var(--doc-ink); }

.doc a {
  color: var(--doc-ink);
  text-decoration: underline;
  text-decoration-color: var(--doc-accent-soft);
  text-underline-offset: 3px;
  transition: text-decoration-color 160ms ease, color 160ms ease;
}
.doc a:hover {
  color: #fff;
  text-decoration-color: var(--doc-accent);
}

.doc ul {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.doc ul li {
  position: relative;
  padding: 0 0 12px 22px;
}

.doc ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--doc-accent);
  opacity: 0.75;
}

.doc hr {
  margin: 64px 0;
  border: 0;
  border-top: 1px solid var(--doc-rule);
}

/* ── The one thing on the page that raises its voice ───────────────────────
   Used sparingly. If everything is emphasised, nothing is. */
.doc__pull {
  margin: 40px 0;
  padding: 26px 28px;
  border-left: 2px solid var(--doc-accent);
  background: var(--doc-surface);
  border-radius: 0 8px 8px 0;
  font-size: clamp(19px, 2.3vw, 21px);
  line-height: 1.5;
  color: #fff;
  text-wrap: pretty;
}
.doc__pull p { margin: 0; }
.doc__pull p + p { margin-top: 12px; }

/* ── Timeline (the story) ─────────────────────────────────────────────────── */

.doc__timeline {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  position: relative;
}

.doc__timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--doc-rule) 10%, var(--doc-rule) 90%, transparent);
}

.doc__timeline li {
  position: relative;
  padding: 0 0 34px 30px;
}
.doc__timeline li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--doc-accent);
  box-shadow: 0 0 0 4px #06060c;
}
.doc__timeline li:last-child { padding-bottom: 0; }

.doc__when {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--doc-accent);
  margin-bottom: 5px;
  font-variant-numeric: tabular-nums;
}

.doc__what {
  display: block;
  color: var(--doc-ink);
  font-weight: 600;
  margin-bottom: 4px;
}

.doc__timeline p { margin: 0; font-size: 15.5px; }

/* ── Small figure table (the "what it costs" bit) ──────────────────────────
   Numbers are tabular so the column does not wobble. A money column that
   wobbles reads as careless, and this is the page where careless is expensive. */
.doc__figures {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15.5px;
}

.doc__figures th,
.doc__figures td {
  padding: 13px 0;
  border-bottom: 1px solid var(--doc-rule-2);
  text-align: left;
  font-weight: 400;
  color: var(--doc-body);
}

.doc__figures tr:last-child th,
.doc__figures tr:last-child td { border-bottom: 0; }

.doc__figures td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--doc-ink);
  font-weight: 600;
}

/* ── Closing line ─────────────────────────────────────────────────────────── */
.doc__closing {
  margin: 72px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--doc-rule);
  text-align: center;
  font-size: 18px;
  color: var(--doc-ink);
}

/* ── Next / cross-link cards ──────────────────────────────────────────────── */
.doc__next {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.doc__next a {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--doc-rule);
  border-radius: 14px;
  background: var(--doc-surface);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}
.doc__next a:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.doc__next strong {
  display: block;
  color: #fff;
  font-size: 16px;
  margin-bottom: 3px;
}
.doc__next span {
  display: block;
  font-size: 14.5px;
  color: var(--doc-mute);
}

@media (prefers-reduced-motion: reduce) {
  .doc__next a { transition: none; }
  .doc__next a:hover { transform: none; }
}

@media (max-width: 640px) {
  .doc { padding: 112px 20px 80px; font-size: 16.5px; }
  .doc h2 { margin-top: 48px; }
  .doc__pull { padding: 20px 22px; }
}
