/* Kalimah landing page at /. Loaded after styles.css, which gives the tokens, buttons, cards and
 * the word card the preview reuses. Everything here is scoped under body.landing, and colours come
 * only from the tokens, so the page follows the device's light or dark setting. */

.landing {
  min-height: 100dvh;
}

/* Only the inline sides, so each section keeps its own vertical padding. */
.landing .landing-wrap {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 20px;
}

.landing h2 {
  margin: 0 0 12px;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.landing h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

/* Scrolling to a #section, or to an element that gets focus, stops below the sticky top bar. */
html:has(> body.landing) {
  scroll-padding-top: calc(var(--bar-h) + env(safe-area-inset-top) + 12px);
}

/* ---------- top bar */
.landing .landing-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
}

.landing .landing-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--bar-h);
}

.landing-nav {
  display: flex;
  gap: 4px;
}

.landing-nav a {
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: var(--text-md);
  font-weight: 600;
  text-decoration: none;
}

.landing-nav a:active {
  background: var(--surface-2);
}

/* ---------- hero */
.landing .landing-hero {
  display: grid;
  gap: 32px;
  padding-top: 36px;
  padding-bottom: 48px;
}

.landing-hero h1 {
  margin: 0;
  font-size: clamp(32px, 8vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.landing-hero .promise {
  margin: 16px 0 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.5;
}

.landing-hero .promise [data-cover] {
  color: var(--text);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-actions .btn {
  min-height: var(--control-lg);
  padding: 0 22px;
}

.hero-actions .btn[hidden] {
  display: none;
}

.hero-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: var(--text-md);
}

.preview {
  margin: 0;
}

.preview .word-card {
  box-shadow: var(--shadow-raised);
}

.preview .ayah {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.preview figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: var(--text-sm);
  text-align: center;
}

/* ---------- sections */
.landing main > section {
  padding-top: 48px;
  padding-bottom: 48px;
}

.landing .band {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.landing .lead {
  max-width: 40em;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 17px;
}

.landing .fine-print {
  margin: 20px 0 0;
  max-width: 40em;
  font-size: var(--text-md);
}

/* The coverage story: one bar per group of words, drawn at the share it names. */
.cover-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cover-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 16px;
}

.cover-label {
  font-weight: 600;
}

.cover-list b {
  grid-row: 1;
  grid-column: 2;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.cover-bar {
  grid-column: 1 / -1;
  height: 12px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.cover-bar > span {
  display: block;
  width: var(--share);
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

/* How it works: three numbered steps. */
.how-steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.how-steps li {
  position: relative;
  padding: 20px 20px 20px 68px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  counter-increment: step;
}

.how-steps li::before {
  content: counter(step);
  position: absolute;
  top: 18px;
  left: 20px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.how-steps p,
.features p {
  margin: 6px 0 0;
  color: var(--muted);
}

/* What you get. */
.features {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features svg {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  color: var(--primary);
}

/* Sources and care. */
.landing .sources {
  max-width: 44em;
  margin: 0;
  padding-left: 20px;
}

.landing .sources li + li {
  margin-top: 8px;
}

/* Questions: native disclosure widgets, so Enter and Space open them. */
.faq {
  display: grid;
  gap: 10px;
  max-width: 48em;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.faq summary {
  padding: 14px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}

.faq details p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
}

.landing .closing {
  text-align: center;
}

.landing .closing p {
  margin: 0 0 20px;
  color: var(--muted);
}

/* ---------- privacy page: one narrow column of text */
.landing .privacy {
  max-width: 44rem;
  padding-top: 40px;
  padding-bottom: 56px;
}

.landing .privacy h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 8vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* Not the padding of the landing page's full-width sections. */
.landing .privacy section {
  margin-top: 36px;
  padding-block: 0;
}

.landing .privacy h2 {
  font-size: 22px;
}

.landing .privacy p,
.landing .privacy li {
  line-height: 1.6;
}

.landing .privacy ul {
  display: grid;
  gap: 8px;
  padding-inline-start: 22px;
}

/* ---------- footer */
.landing-footer {
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--text-md);
}

.landing-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.landing-footer a {
  font-weight: 600;
}

.landing-footer p {
  margin: 12px 0 0;
}

/* ---------- small phones: the section links leave room for the name */
@media (max-width: 420px) {
  .landing-nav a {
    padding: 6px 5px;
  }

  .landing .brand-name {
    display: none;
  }
}

/* ---------- wider screens */
@media (min-width: 720px) {
  .how-steps,
  .features {
    grid-template-columns: repeat(3, 1fr);
  }

  .features {
    gap: 32px;
  }

  .how-steps li {
    padding: 64px 20px 20px;
  }

  .how-steps li::before {
    top: 20px;
  }
}

@media (min-width: 960px) {
  .landing .landing-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .landing main > section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .landing h2 {
    font-size: 30px;
  }
}
