/* LenguaTune website: the app's own colours, Apple's own fonts (nothing is loaded from anywhere else) */
:root {
  --ink: #1c1c1f;
  --panel: #26262a;
  --line: #3a3a40;
  --text: #e8e8ea;
  --muted: #9a9aa3;
  --teal: #2fa89a;
  --teal-soft: rgba(47, 168, 154, 0.22);
  --amber: #f2c14e;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --measure: 38rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: #46c3b4; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 68rem; margin: 0 auto; padding: 20px 28px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 17px; }
.brand img { border-radius: 7px; }
.top nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top nav a:not(.btn) { color: var(--muted); text-decoration: none; }
.top nav a:not(.btn):hover { color: var(--text); }

.btn {
  display: inline-block; background: var(--teal); color: #0f2421; text-decoration: none;
  font-weight: 650; font-size: 16px; padding: 12px 20px; border-radius: 9px;
}
.btn:hover { background: #3cbcad; color: #0f2421; }
.btn-small { font-size: 14px; padding: 7px 14px; border-radius: 8px; }

main { max-width: 68rem; margin: 0 auto; padding: 0 28px; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; }
.hero h1 {
  max-width: 18ch; margin: 0;
  font-size: clamp(36px, 5.6vw, 62px); line-height: 1.06; letter-spacing: -0.02em; font-weight: 700;
}
.lede { max-width: var(--measure); margin: 24px 0 0; color: #c9c9cf; font-size: 19px; }
.cta { margin-top: 32px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.fine { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- the demo: a track with clips, and the line being played ---------- */
.demo {
  margin: 24px 0 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.ruler {
  display: flex; justify-content: space-between; padding: 8px 16px 6px;
  border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums;
}
.lane { position: relative; height: 110px; background: #222226; }
.clip {
  position: absolute; top: 18px; bottom: 18px; left: var(--x); width: var(--w);
  background: var(--teal-soft); border: 1px solid rgba(47, 168, 154, 0.6); border-radius: 6px; overflow: hidden;
}
/* a waveform, drawn from a repeating pattern of bars */
.clip i {
  position: absolute; inset: 10px 6px;
  background:
    repeating-linear-gradient(90deg, rgba(127, 214, 203, 0.85) 0 2px, transparent 2px 5px);
  -webkit-mask: linear-gradient(180deg, transparent 0 20%, #000 20% 80%, transparent 80%),
                repeating-linear-gradient(90deg, #000 0 9px, rgba(0,0,0,0.35) 9px 14px, #000 14px 20px);
  mask: linear-gradient(180deg, transparent 0 20%, #000 20% 80%, transparent 80%),
        repeating-linear-gradient(90deg, #000 0 9px, rgba(0,0,0,0.35) 9px 14px, #000 14px 20px);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.clip.now { background: rgba(47, 168, 154, 0.42); border-color: var(--teal); }
.clip.now i { background: repeating-linear-gradient(90deg, #d4f7f2 0 2px, transparent 2px 5px); }
.playhead {
  position: absolute; top: -18px; bottom: -18px; left: 0; width: 2px; background: #f2f2f2;
  animation: play 7s linear infinite;
}
@keyframes play { from { left: 0; } 86% { left: 100%; } to { left: 100%; } }

.editor { padding: 22px 24px 20px; border-top: 1px solid var(--line); }
.line {
  margin: 0; font: 400 clamp(24px, 3.2vw, 34px)/1.25 var(--serif); color: #8d8d96;
}
/* each word lights up in turn as the playhead reaches it (7 words over 6 s, matching the playhead) */
.line span { animation: say 7s linear infinite; animation-delay: calc(var(--d) * 0.86s); }
@keyframes say {
  0% { color: var(--amber); }
  12% { color: var(--amber); }
  13%, 100% { color: var(--text); }
}
.gloss { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; font-size: 13px; }
.controls span { border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; color: #c9c9cf; }

/* ---------- sections ---------- */
section { padding: 88px 0 0; }
h2 { margin: 0 0 28px; font-size: 32px; line-height: 1.15; letter-spacing: -0.015em; font-weight: 700; }
h3 { margin: 0 0 8px; font-size: 19px; font-weight: 650; }
section p, section li, section dd { max-width: var(--measure); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 34px; }
.steps li { counter-increment: step; position: relative; padding-left: 56px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--teal);
  display: grid; place-items: center; color: var(--teal); font-weight: 650; font-size: 16px;
}
.steps p { margin: 0; color: #c9c9cf; }

.clip-tools dl { margin: 0; display: grid; grid-template-columns: 12rem 1fr; gap: 18px 32px; }
.clip-tools dt { font-weight: 650; }
.clip-tools dd { margin: 0; color: #c9c9cf; }

.download ul { margin: 0 0 28px; padding-left: 20px; color: #c9c9cf; }
.download li { margin: 6px 0; }
.download .fine { margin-top: 14px; }

.faq details { max-width: var(--measure); border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.faq details p { margin: 10px 0 0; color: #c9c9cf; }

/* ---------- text pages (privacy, extension) ---------- */
.page { max-width: 44rem; padding: 40px 0 0; }
.page h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 8px; }
.page .updated { color: var(--muted); font-size: 14px; margin: 0 0 32px; }
.page h2 { font-size: 22px; margin: 40px 0 10px; }
.page p, .page li { color: #c9c9cf; }
.page ul, .page ol { padding-left: 20px; }
.page li { margin: 6px 0; }
.page strong { color: var(--text); font-weight: 600; }

/* ---------- footer ---------- */
.foot {
  max-width: 68rem; margin: 96px auto 0; padding: 28px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px;
}
.foot p { margin: 0; }
.foot a { color: var(--muted); margin-left: 18px; }
.foot a:first-child { margin-left: 0; }
.foot a:hover { color: var(--text); }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .top { padding: 16px 20px; }
  .top nav a:not(.btn) { display: none; }
  main { padding: 0 20px; }
  .hero { padding-top: 40px; }
  .lane { height: 84px; }
  .clip { top: 14px; bottom: 14px; }
  .clip-tools dl { grid-template-columns: 1fr; gap: 4px; }
  .clip-tools dd { margin-bottom: 14px; }
  .steps li { padding-left: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .playhead { animation: none; left: 45%; }
  .line span { animation: none; color: var(--text); }
  .line span:nth-child(4) { color: var(--amber); }
}

.download h3 { margin: 40px 0 8px; font-size: 1.15rem; }
.download ol { margin: 0; padding-left: 20px; color: #c9c9cf; }
.download ol li { margin: 6px 0; }
