/* TextSong — same design tokens as the iOS app (Theme.swift). */

:root {
  --bg: #0b0b0f;
  --surface: #16161c;
  --stroke: rgba(255, 255, 255, 0.07);
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.55);
  --text-3: rgba(255, 255, 255, 0.32);
  --heat-a: #ff2d78;
  --heat-b: #ff8a00;
  --radius-bubble: 22px;
  --radius-control: 16px;
  --margin: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The room the app lives in: warm glow over near-black. */
.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(420px 420px at 22% 8%, rgba(255, 45, 120, 0.16), transparent 70%),
    radial-gradient(520px 520px at 85% 100%, rgba(255, 138, 0, 0.10), transparent 70%),
    var(--bg);
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 var(--margin); }

h1, h2, h3, .display {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, sans-serif;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }

/* --- Nav --- */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--text-2);
}
.wordmark img { width: 28px; height: 28px; border-radius: 7px; }
nav .links { display: flex; gap: 22px; font-size: 14px; color: var(--text-2); }
nav .links a:hover { color: var(--text); }

/* --- Hero --- */
.hero { text-align: center; padding: 72px 0 56px; }
.hero h1 { font-size: clamp(40px, 7vw, 64px); font-weight: 700; line-height: 1.05; }
.hero .sub {
  margin: 18px auto 0;
  max-width: 480px;
  font-size: 18px;
  color: var(--text-2);
}
.hero .cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  height: 56px;
  padding: 0 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--heat-a), var(--heat-b));
  color: #fff;
  font-family: ui-rounded, -apple-system, sans-serif;
  font-size: 17px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(255, 45, 120, 0.35);
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.2s ease;
}
.hero .cta:hover { transform: scale(1.03); }
.hero .cta-note { margin-top: 12px; font-size: 13px; color: var(--text-3); }

/* --- Sections --- */
section { padding: 48px 0; }
section > h2 {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}
section > .section-sub {
  text-align: center;
  color: var(--text-2);
  font-size: 15px;
  margin-bottom: 36px;
}

/* --- How it works --- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 680px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-bubble);
  padding: 26px 22px;
}
.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--heat-a), var(--heat-b));
  font-family: ui-rounded, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 14px;
}
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--text-2); }

/* --- Examples --- */
.example {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-bubble);
  padding: 22px;
  margin-bottom: 16px;
}
.example .msg {
  position: relative;
  background: #0e1510;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 14px 18px;
  font-size: 15px;
  color: var(--text);
  max-width: 560px;
}
.example .msg::before {
  content: "THEY TEXTED";
  display: block;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-3);
  margin-bottom: 6px;
  font-weight: 600;
}
.player {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}
.play-btn {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #000;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.play-btn:hover { transform: scale(1.05); }
.player .bars {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 28px;
  flex: none;
}
.player .bars span {
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--heat-a), var(--heat-b));
  transition: height 0.2s ease;
}
.player.playing .bars span { animation: eq 0.9s ease-in-out infinite; }
.player.playing .bars span:nth-child(2) { animation-delay: 0.15s; }
.player.playing .bars span:nth-child(3) { animation-delay: 0.3s; }
.player.playing .bars span:nth-child(4) { animation-delay: 0.45s; }
.player.playing .bars span:nth-child(5) { animation-delay: 0.6s; }
@keyframes eq {
  0%, 100% { height: 8px; }
  50% { height: 26px; }
}
.scrub {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  position: relative;
}
.scrub .fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
}
.player .time {
  flex: none;
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  min-width: 42px;
  text-align: right;
}
.example .meta {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-3);
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--stroke);
  margin-top: 48px;
  padding: 36px 0 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-3);
}
footer .links { display: flex; gap: 20px; }
footer a:hover { color: var(--text-2); }

/* --- Legal pages --- */
.legal { max-width: 720px; margin: 0 auto; padding: 24px var(--margin) 80px; }
.legal h1 { font-size: 34px; margin: 40px 0 6px; }
.legal .updated { color: var(--text-3); font-size: 13px; margin-bottom: 36px; }
.legal h2 { font-size: 19px; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--text-2); font-size: 15px; margin-bottom: 12px; }
.legal ul { padding-left: 22px; }
.legal strong { color: var(--text); font-weight: 600; }
