:root {
  --background: #111116;
  --surface: #191921;
  --surface-raised: #22222c;
  --border: #2e2e3a;

  --text-primary: #f2f2f7;
  --text-secondary: #9797a6;
  --text-muted: #5c5c6b;

  --accent: #6c6cf2;
  --accent-muted: #3a3a66;

  --waveform: #ebafae;
  --checkpoint: #4cd5a8;
  --danger: #f26d6d;

  --max-width: 960px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--background);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

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

/* Header */

.site-header {
  padding: 24px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.brand .accent {
  color: var(--accent);
}

/* Hero */

.hero {
  padding: 64px 0 48px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.1;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero p.tagline {
  font-size: clamp(16px, 2.5vw, 19px);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
}

/* Store badges */

.store-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Both are official pre-made badge artwork (own baked-in shape/border), not plain icons — so
 * unlike a custom icon+label badge, these get no extra chrome of their own, just matched sizing.
 * The two source files have different intrinsic aspect ratios (Apple's is ~3:1, Google's ~3.4:1),
 * so locking both to the same *height* (width auto) is what actually makes them read as a
 * matched pair — forcing identical width/height on both would stretch one of them. */
.store-badge {
  display: flex;
  cursor: default;
  /* Not a real link (no <a>, no href) and visually dimmed on purpose — these are placeholders
   * until the app is actually published to each store. */
  opacity: 0.7;
  pointer-events: none;
}

.store-badge img {
  height: 44px;
  width: auto;
  display: block;
}

.demo-cta {
  margin-top: 8px;
}

.button {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
}

.button:hover {
  background: #7d7df5;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.button.secondary:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.hero-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Interactive demo */

.demo-section {
  padding: 24px 0 64px;
}

.demo-player {
  max-width: 720px;
  margin: 0 auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 20px;
}

.demo-waveform-wrap {
  position: relative;
}

.demo-waveform {
  width: 100%;
  height: 140px;
  display: block;
  border-radius: 10px;
  background: var(--background);
  /* Dragging a loop checkpoint on touch shouldn't also scroll the page. */
  touch-action: none;
  cursor: pointer;
}

.demo-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

.demo-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.demo-play-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.demo-play-btn:hover {
  background: #7d7df5;
}

.demo-time {
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  font-size: 14px;
  min-width: 88px;
}

.demo-speed {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.demo-speed-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 2px;
}

.speed-step-btn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.speed-step-btn:hover {
  border-color: var(--accent);
}

.demo-speed-value {
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  font-size: 14px;
  min-width: 40px;
  text-align: center;
}

.speed-presets {
  display: flex;
  gap: 6px;
  margin-left: 6px;
}

.speed-preset-btn {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
}

.speed-preset-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

/* Checkpoint tiles — same idea as the app's checkpoint chips: a small pill showing a name and an
 * editable time, teal-accented to match the app's checkpoint color. */
.loop-chips {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.loop-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--checkpoint);
  background: var(--background);
}

.loop-chip-name {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.loop-chip-edit {
  display: flex;
  align-items: center;
  gap: 4px;
}

.loop-chip-time {
  width: 46px;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--checkpoint);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-family: inherit;
  text-align: right;
}

.loop-chip-time:hover {
  border-color: var(--border);
}

.loop-chip-time:focus {
  outline: none;
  background: var(--surface-raised);
  border-color: var(--checkpoint);
}

.loop-chip-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.demo-hint {
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
}

.demo-credit {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 480px) {
  .demo-speed {
    margin-left: 0;
    width: 100%;
  }
}

/* Features */

.features {
  padding: 24px 0 72px;
}

.features h2 {
  text-align: center;
  font-size: clamp(24px, 4vw, 30px);
  margin: 0 0 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}

.feature-card .feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* "Get early access" form */

.interest-section {
  padding: 8px 0 72px;
}

.interest-card {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}

.interest-card h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 4vw, 26px);
}

.interest-intro {
  margin: 0 0 26px;
  color: var(--text-secondary);
  font-size: 14px;
}

.interest-form {
  text-align: left;
}

.form-row {
  margin: 0 0 16px;
  padding: 0;
  border: none;
}

.form-row label,
.form-row legend {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0;
}

.form-row input[type='text'],
.form-row input[type='email'] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
}

.form-row input[type='text']:focus,
.form-row input[type='email']:focus {
  outline: none;
  border-color: var(--accent);
}

.radio-group {
  display: flex;
  gap: 20px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: none;
  letter-spacing: normal;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 0;
}

.radio-group input[type='radio'],
.radio-group input[type='checkbox'] {
  accent-color: var(--accent);
}

.interest-form .button {
  width: 100%;
  border: none;
  font: inherit;
}

.form-message {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--checkpoint);
}

.form-message-error {
  color: var(--danger);
}

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

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: var(--text-secondary);
}

/* Legal pages (privacy / terms) */

.legal {
  padding: 56px 0 80px;
}

.legal .back-link {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--text-secondary);
}

.legal h1 {
  font-size: 32px;
  margin: 0 0 6px;
}

.legal .updated {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 36px;
}

.legal h2 {
  font-size: 19px;
  margin: 36px 0 12px;
  color: var(--text-primary);
}

.legal p,
.legal li {
  color: var(--text-secondary);
  font-size: 15px;
}

.legal ul {
  padding-left: 22px;
}

.legal strong {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .site-footer .wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}
