/* ─────────────────────────────────────────────────────────────────
 * CueFlow · legal pages
 * Editorial-noir aesthetic, matched to the iOS app:
 *   ink #0F0E0B  ·  cream #EFE9DA  ·  tally #C53A2C
 * ───────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,300..900,0..100,0..1&family=DM+Sans:opsz,wght@9..40,300..700&family=JetBrains+Mono:wght@400..700&display=swap');

:root {
  --ink:        #0F0E0B;
  --ink-raised: #181612;
  --cream:      #EFE9DA;
  --cream-soft: #C8C2B3;
  --cream-faint:#7A7568;
  --tally:      #C53A2C;
  --tally-soft: rgba(197, 58, 44, 0.16);
  --hairline:   rgba(239, 233, 218, 0.10);
  --hairline-bright: rgba(239, 233, 218, 0.22);

  --serif: 'Fraunces', 'Iowan Old Style', 'Apple Garamond', 'Times New Roman', serif;
  --sans:  'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', 'Menlo', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  /* Soft, almost-imperceptible noise gradient pulled in from the
     bottom-right — mimics the app's brand backdrop without
     getting in the way of the type. */
  background:
    radial-gradient(circle at 100% 100%,
      rgba(197, 58, 44, 0.06) 0%,
      transparent 45%),
    var(--ink);
  min-height: 100vh;
}

/* ── Layout shell ────────────────────────────────────────────── */

.shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 88px 32px 96px;
  position: relative;
}

@media (max-width: 540px) {
  .shell { padding: 56px 22px 72px; }
}

/* Vertical brand thread — a thin red line on the left, echoes the
   tally accent in the app's masthead hairline. */
.shell::before {
  content: '';
  position: absolute;
  left: 32px;
  top: 88px;
  bottom: 96px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--tally) 0%,
    var(--tally) 28px,
    transparent 28px
  );
  opacity: 0.85;
}

@media (max-width: 540px) {
  .shell::before { left: 22px; top: 56px; bottom: 72px; }
}

/* ── Brand mark ──────────────────────────────────────────────── */

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
  color: var(--cream);
  margin-bottom: 56px;
}

.brand-mark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
}

.brand-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-faint);
}

/* ── Kicker (small mono label) ──────────────────────────────── */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tally);
  margin: 0 0 18px;
}

.kicker::after {
  content: '';
  flex: 0 0 96px;
  height: 1px;
  background: var(--hairline-bright);
}

/* ── Display headlines ──────────────────────────────────────── */

.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 7.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--cream);
  margin: 0 0 16px;
  font-variation-settings: 'opsz' 144, 'SOFT' 50, 'WONK' 0;
}

.display em {
  font-style: italic;
  font-weight: 300;
  color: var(--tally);
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}

.display-zh {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.18;
  letter-spacing: 0.02em;
  color: var(--cream-soft);
  margin: 0 0 48px;
}

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

p, li {
  color: var(--cream);
  line-height: 1.78;
  font-size: 16px;
}

.lede {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 21px;
  line-height: 1.55;
  color: var(--cream-soft);
  margin-bottom: 56px;
  letter-spacing: -0.005em;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
}

.section {
  padding-top: 32px;
  margin-bottom: 32px;
}

.section + .section {
  border-top: 1px solid var(--hairline);
}

.section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--cream);
  margin: 18px 0 18px;
}

.section h3 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin: 32px 0 10px;
}

/* ── List variants ──────────────────────────────────────────── */

ul.dot {
  list-style: none;
  padding: 0;
  margin: 14px 0;
}

ul.dot li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 14px;
}

ul.dot li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 14px;
  height: 1px;
  background: var(--tally);
}

ul.dot strong {
  color: var(--cream);
  font-weight: 600;
}

ul.dot li {
  color: var(--cream-soft);
}

/* ── Pull quote / emphasis card ─────────────────────────────── */

.pull {
  border-left: 2px solid var(--tally);
  padding: 4px 0 4px 24px;
  margin: 36px 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 19px;
  line-height: 1.55;
  color: var(--cream);
  font-variation-settings: 'opsz' 144, 'SOFT' 80;
}

/* ── Link cards (used on landing) ───────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 48px 0;
}

@media (max-width: 540px) {
  .cards { grid-template-columns: 1fr; }
}

.card {
  display: block;
  background: var(--ink-raised);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 22px 24px 24px;
  text-decoration: none;
  color: var(--cream);
  transition: border-color 200ms ease, transform 200ms ease;
}

.card:hover {
  border-color: var(--tally);
  transform: translateY(-2px);
}

.card-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--cream);
  margin: 0 0 4px;
}

.card-desc {
  font-size: 13px;
  color: var(--cream-soft);
  margin: 0;
  line-height: 1.6;
}

/* ── Inline links ───────────────────────────────────────────── */

a.inline {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid var(--tally);
  padding-bottom: 1px;
  transition: color 160ms ease;
}

a.inline:hover { color: var(--tally); }

/* ── Footer ─────────────────────────────────────────────────── */

footer.cf {
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-faint);
}

footer.cf a {
  color: var(--cream-faint);
  text-decoration: none;
  transition: color 160ms ease;
}

footer.cf a:hover { color: var(--tally); }

footer.cf .footer-mark {
  font-family: var(--serif);
  text-transform: none;
  letter-spacing: -0.01em;
  font-size: 14px;
  color: var(--cream-soft);
}

/* ── Decorative stamp on privacy page ───────────────────────── */

.stamp {
  position: absolute;
  top: 88px;
  right: 32px;
  width: 110px;
  height: 110px;
  border: 1px solid var(--hairline-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-faint);
  line-height: 1.5;
  padding: 18px;
  transform: rotate(-6deg);
}

@media (max-width: 720px) { .stamp { display: none; } }

.stamp strong {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--tally);
  margin-bottom: 4px;
  font-variation-settings: 'opsz' 144;
}

/* ── Bilingual divider ──────────────────────────────────────── */

.lang-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 80px 0 56px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cream-faint);
}

.lang-divider::before,
.lang-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

/* ── Lang switch (top-right pill) ───────────────────────────── */

.lang-switch {
  position: absolute;
  top: 88px;
  right: 32px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

@media (max-width: 540px) {
  .lang-switch { top: 56px; right: 22px; }
}

.lang-switch a {
  color: var(--cream-faint);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 12px;
  transition: color 160ms ease;
}

.lang-switch a + a { margin-left: 4px; }

.lang-switch a:hover { color: var(--cream); }

.lang-switch a.is-current {
  color: var(--cream);
  background: var(--ink-raised);
  border: 1px solid var(--hairline-bright);
}

/* ── Subtle motion on first paint ───────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .display, .display-zh, .lede, .kicker, .section, .cards {
    animation: rise 720ms cubic-bezier(.2, .7, .2, 1) both;
  }
  .display      { animation-delay: 60ms; }
  .display-zh   { animation-delay: 140ms; }
  .lede         { animation-delay: 220ms; }
  .cards        { animation-delay: 300ms; }
  .section      { animation-delay: 80ms; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Selection ──────────────────────────────────────────────── */

::selection {
  background: var(--tally);
  color: var(--ink);
}
