/* Front page only. Shared parts live in rekhyt-ui.css. */
.rain { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: none; }
html[data-style="night"] .rain { display: block; }
.page { position: relative; z-index: 1; }

.hero { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: 56px; align-items: center; padding: 72px 0 40px; }
.hero h1 { margin: 0; color: var(--ink); font: 700 clamp(40px, 5.4vw, 66px)/1.04 var(--ui); letter-spacing: -.025em; }
.hero-sub { margin: 22px 0 30px; max-width: 34em; color: var(--muted); font-size: 19px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { min-height: 50px; padding: 0 24px; font-size: 16.5px; }
.hero-note { margin: 16px 0 0; color: var(--muted); font-size: 14.5px; }

/* the live preview */
.demo { position: relative; padding: 22px 26px 18px; }
.demo-head { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13.5px; }
.demo-text { margin: 16px 0 22px; color: var(--ink); font: 400 clamp(20px, 2vw, 25px)/1.62 var(--read); }
.demo-text .w { border-radius: 4px; padding: 0 1px; cursor: pointer; transition: background-color .12s; }
.demo-text .w:hover { background: var(--brand-soft); }
.demo-text .w.now { background: var(--spoken); }
.demo-text .w.picked { outline: 2px solid var(--brand); outline-offset: 1px; background: var(--brand-soft); }
.demo-bar { display: flex; align-items: center; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.play {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px;
  border: 0; border-radius: 50%; background: var(--brand); color: var(--brand-ink); cursor: pointer;
}
.play:hover { background: var(--brand-hover); }
.play svg { width: 16px; height: 16px; }
.track { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.track i { display: block; width: 0; height: 100%; background: var(--brand); transition: width .25s linear; }
.speed { color: var(--muted); font-size: 13.5px; }
.demo-hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

/* The meaning opens under the play bar, inside the card, so it never covers the text. */
.meaning {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center;
  margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2);
}
.meaning-word { margin: 0; color: var(--ink); font: 600 22px/1.2 var(--read); }
.meaning-info { margin: 2px 0 4px; color: var(--muted); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; }
.meaning-text { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--text); }
.meaning > p { grid-column: 1; }
.meaning-actions { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-direction: column; gap: 8px; }
.meaning-note { grid-column: 1 / -1 !important; }
.meaning-actions .btn { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.meaning-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.meaning-note a { color: var(--brand); }

/* three steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 28px 0 8px; scroll-margin-top: 90px; }
.step { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; box-shadow: none; }
.step-n { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 14px; }
.step h2 { margin: 2px 0 3px; color: var(--ink); font-size: 16.5px; font-weight: 600; line-height: 1.3; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }

.langs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding: 22px 0 0; color: var(--text); font-size: 15.5px; }
.langs .muted { margin-right: 2px; }
.langs [lang="ar"] { font-family: var(--arabic); }

/* everything else, one tap away */
.more { padding: 56px 0 0; }
.more h2 { margin: 0 0 6px; color: var(--ink); font-size: 24px; letter-spacing: -.01em; }
.more > p { margin: 0 0 22px; color: var(--muted); }
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.tools li { border-bottom: 1px solid var(--line); }
.tool { display: flex; align-items: baseline; gap: 14px; padding: 15px 2px; text-decoration: none; }
.tool strong { flex: none; min-width: 9.5em; color: var(--ink); font-size: 16px; font-weight: 600; }
.tool span { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.tool:hover strong { color: var(--brand); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding: 40px 0 24px; }
  .hero-sub { font-size: 17.5px; margin: 18px 0 24px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .demo { padding: 18px 18px 16px; }
  .steps { grid-template-columns: 1fr; gap: 10px; }
  .tools { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .tool { flex-direction: column; gap: 2px; }
  .demo-head span:first-child { max-width: 70%; }
}
