/* Landing page. Mobile first; the two-column desktop layout starts at 1000px. */

.landing {
  --page: #F8F7F4;
  --ink-soft: #6E6E69;
  --pad: var(--frame-pad);
  background: var(--page);
}

.landing main { display: block; }

/* ── Shared pieces ── */

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.landing h1,
.landing h2,
.landing h3 { font-family: var(--font-serif); font-weight: 400; color: var(--charcoal); }

.landing h2 { font-size: 32px; line-height: 36px; letter-spacing: -0.01em; }

.section-head { display: flex; flex-direction: column; gap: 12px; }

.section-lede { max-width: 560px; font-size: 16px; line-height: 26px; color: var(--mid-gray); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--brand);
}

/* Call-to-action buttons: 54px high, 14px corners. */
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  border-radius: 14px;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.cta:hover { opacity: 0.88; }

.cta svg { flex-shrink: 0; }

.cta-play {
  flex: 1 1 100%;
  gap: 10px;
  padding: 0 22px 0 20px;
  background: var(--brand);
  color: var(--white);
  font-size: 17px;
  font-weight: 600;
  line-height: 21px;
  letter-spacing: -0.01em;
}

.cta-store { flex: 1 1 0; gap: 10px; padding: 0 12px 0 10px; background: var(--charcoal); color: var(--white); }

.cta-text { display: flex; flex-direction: column; }

.cta-text small { font-size: 11px; font-weight: 500; line-height: 13px; color: rgba(255, 255, 255, 0.75); }

.cta-text span { font-size: 17px; font-weight: 600; line-height: 21px; letter-spacing: -0.01em; }

.cta-row.on-green .cta { background: var(--white); }

.cta-row.on-green .cta-play { color: var(--brand); }

.cta-row.on-green .cta-store { flex: 1 1 100%; gap: 12px; padding: 0 22px 0 18px; color: var(--charcoal); }

.cta-row.on-green .cta-text small { color: var(--ink-soft); }

/* A small letter grid (hero, how to play, widget). */
.hero-grid,
.how-grid,
.phone-grid,
.widget-grid { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; }

.hero-grid i,
.how-grid i,
.phone-grid i,
.widget-grid i {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 700;
  color: var(--charcoal);
}

/* ── Hero ── */

.hero {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 28px var(--pad) 52px;
}

.hero-copy { display: flex; flex-direction: column; gap: 18px; }

.hero h1 { font-size: 44px; line-height: 46px; letter-spacing: -0.015em; }

.hero-lede { max-width: 500px; font-size: 17px; line-height: 27px; color: var(--mid-gray); }

.hero-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 10px; }

.cta-note { font-size: 14px; line-height: 20px; color: var(--ink-soft); }

.hero-how, .hero-phone { display: none; }

.hero-grid { gap: 10px; padding-top: 8px; }

.hero-grid i {
  width: min(104px, (100vw - 2 * var(--gutter) - 20px) / 3);
  aspect-ratio: 1;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  font-size: 32px;
  line-height: 32px;
}

.hero-grid i.center { background: var(--brand); color: var(--white); }

.hero-how-mobile { align-self: center; }

/* ── How to play ── */

.how {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 56px var(--pad);
  background: var(--white);
  scroll-margin-top: 0;
}

.how-body { display: flex; flex-direction: column; gap: 28px; }

.how-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 28px 0 32px;
  border-radius: 24px;
  background: var(--page);
}

.how-art b { font-size: 17px; font-weight: 600; line-height: 17px; letter-spacing: 2.5px; }

.how-grid { gap: 7px; }

.how-grid i {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  box-shadow: var(--shadow-flat);
  font-size: 20px;
  line-height: 20px;
  letter-spacing: 0.4px;
}

.how-grid i.used { position: relative; top: 3px; background: #BFBFBF; box-shadow: none; color: rgba(26, 26, 26, 0.5); }

.how-grid i.center.used { background: #0F3424; color: rgba(255, 255, 255, 0.5); }

.how-text { display: flex; flex-direction: column; gap: 28px; }

.rules { display: flex; flex-direction: column; gap: 12px; list-style: none; counter-reset: rule; }

.rules li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 16px;
  line-height: 28px;
  counter-increment: rule;
}

.rules li::before {
  content: counter(rule);
  flex: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
}

.ranks { display: flex; flex-direction: column; gap: 8px; }

.ranks p { font-size: 16px; line-height: 26px; color: var(--mid-gray); }

.ranks ul { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; list-style: none; }

.ranks li { font-family: var(--font-serif); font-style: italic; font-size: 19px; line-height: 26px; }

/* ── Features ── */

.features { display: flex; flex-direction: column; gap: 32px; padding: 56px var(--pad); background: var(--page); }

.cards { display: grid; grid-template-columns: 1fr; gap: 32px; }

.card {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
  padding: 24px;
  border-radius: 24px;
  background: var(--white);
}

.card-art { display: flex; align-items: center; width: 100%; }

.card-text { display: flex; flex-direction: column; gap: 8px; }

.card h3 { font-size: 28px; line-height: 32px; }

.card-text p { font-size: 16px; line-height: 26px; color: var(--mid-gray); }

/* Leaderboard */
.lb { display: flex; flex-direction: column; gap: 2px; width: 100%; }

.lb-row { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; }

.lb-row.you { background: var(--page); }

.lb-pos, .lb-score { font-family: var(--font-mono); font-size: 18px; font-weight: 700; line-height: 22px; }

.lb-pos { width: 18px; }

.lb-row.you .lb-pos { color: var(--ink-soft); }

.lb-who { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; }

.lb-who span { font-size: 15px; font-weight: 600; line-height: 20px; }

.lb-who em { font-family: var(--font-serif); font-size: 15px; line-height: 18px; }

/* Private group */
.group { display: flex; flex-direction: column; gap: 22px; width: 100%; }

.group-head { display: flex; align-items: center; gap: 14px; }

.group-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #2B4F6E;
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 26px;
}

.group-head > span:last-child { display: flex; flex-direction: column; gap: 2px; }

.group-head b { font-size: 18px; font-weight: 700; line-height: 24px; }

.group-head small { font-size: 14px; line-height: 18px; color: var(--ink-soft); }

.group-members { display: flex; gap: 6px; }

.group-members i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--white);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 14px;
}

.group-code { display: flex; flex-direction: column; gap: 10px; }

.group-code small { font-size: 13px; font-weight: 600; line-height: 16px; letter-spacing: 0.12em; color: var(--ink-soft); }

.group-code div { display: flex; gap: 6px; }

.group-code i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 46px;
  border-radius: 10px;
  background: var(--page);
  font-family: var(--font-mono);
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 20px;
}

/* Streak */
.streak { display: flex; flex-direction: column; gap: 26px; width: 100%; }

.streak-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.streak-count { display: flex; align-items: baseline; gap: 10px; }

.streak-count b { font-family: var(--font-serif); font-size: 64px; font-weight: 400; line-height: 60px; }

.streak-count span { font-size: 16px; font-weight: 500; line-height: 24px; color: var(--mid-gray); white-space: nowrap; }

.streak-badges { display: flex; gap: 8px; }

.streak-badges i { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; }

.streak-days { display: flex; justify-content: space-between; }

.streak-days span { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.streak-days i { width: 30px; height: 30px; border-radius: 50%; background: #F1F1EE; }

.streak-days small { font-size: 12px; font-weight: 600; line-height: 14px; color: var(--ink-soft); }

/* Home screen widget */
.widget-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 28px 16px;
  border-radius: 20px;
  background: var(--charcoal);
}

.widget { display: flex; gap: 14px; padding: 14px; border-radius: 22px; background: var(--white); }

.widget-grid { gap: 4px; }

.widget-grid i { width: 34px; height: 34px; border-radius: 8px; background: #F1F1EE; font-size: 14px; line-height: 14px; }

.widget-grid i.center { background: var(--brand); color: var(--white); }

.widget-side { display: flex; flex-direction: column; justify-content: space-between; min-width: 96px; }

.widget-name { display: flex; flex-direction: column; }

.widget-name b { font-family: var(--font-serif); font-size: 20px; font-weight: 400; line-height: 22px; }

.widget small { font-size: 12px; line-height: 16px; color: var(--ink-soft); }

.widget-stats { display: flex; align-items: flex-end; justify-content: space-between; }

.widget-stats > span:first-child { display: flex; flex-direction: column; gap: 2px; }

.widget-count { display: flex; align-items: baseline; gap: 4px; }

.widget-count b, .widget-place b { font-family: var(--font-mono); font-size: 26px; font-weight: 700; line-height: 26px; }

.widget-stats em { font-family: var(--font-serif); font-size: 15px; line-height: 18px; color: var(--brand); }

.widget-place { display: flex; align-items: flex-start; gap: 1px; color: var(--brand); }

.widget-place small { font-size: 11px; font-weight: 700; line-height: 14px; color: var(--brand); }

/* ── Closing band ── */

.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 56px var(--pad);
  background: var(--brand);
  text-align: center;
}

.landing .closing h2 { font-size: 36px; line-height: 40px; color: var(--white); }

.closing p { font-size: 16px; line-height: 26px; color: rgba(255, 255, 255, 0.82); }

.closing .cta-row { max-width: 420px; }

/* ── Tablet: two cards per row ── */

@media (min-width: 700px) and (max-width: 999.98px) {
  .hero-cta { width: 100%; max-width: 440px; }
  .how-art { max-width: 480px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* ── Desktop ── */

@media (min-width: 1000px) {
  .landing h2 { font-size: 44px; line-height: 48px; }

  .section-lede { font-size: 17px; line-height: 28px; }

  .cta-row { flex-wrap: nowrap; gap: 12px; width: auto; }

  .cta-play, .cta-store, .cta-row.on-green .cta-store { flex: 0 0 auto; }

  .cta-store { gap: 12px; padding: 0 22px 0 18px; }

  /* Hero */
  .hero {
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(32px, 5vw, 72px);
    max-width: none;
    height: 760px;
    padding: 36px var(--pad) 0;
    overflow: hidden;
  }

  .hero-copy { flex: 1 1 0; min-width: 0; height: 668px; justify-content: center; gap: 22px; }

  .hero h1 { font-size: clamp(54px, 5.28vw, 76px); line-height: 1.026; white-space: nowrap; }

  .hero-lede { max-width: 465px; font-size: 20px; line-height: 32px; }

  .hero-how { display: inline-flex; align-self: flex-start; margin-top: 6px; }

  .hero-grid, .hero-how-mobile { display: none; }

  .hero-phone { display: block; flex: 0 0 auto; width: 420px; height: 724px; }

  .phone {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 420px;
    height: 720px;
    border-radius: 58px 58px 0 0;
    background: var(--canvas);
    box-shadow: 0 -8px 48px rgba(0, 0, 0, 0.1);
    overflow: hidden;
  }

  .phone-status {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    padding: 20px 34px 0 44px;
    flex-shrink: 0;
  }

  .phone-status span { font-family: system-ui, sans-serif; font-size: 17px; font-weight: 600; line-height: 22px; color: #111111; }

  .phone-island { position: absolute; left: 151px; top: 13px; width: 118px; height: 35px; border-radius: 20px; background: #000000; }

  .phone-head { display: flex; align-items: center; justify-content: space-between; height: 62px; padding: 18px 25px 0; flex-shrink: 0; }

  .phone-title { font-family: var(--font-serif); font-size: 30px; line-height: 36px; letter-spacing: -0.01em; }

  .phone-head-end { display: flex; align-items: center; gap: 18px; }

  .phone-place { display: flex; align-items: flex-start; color: var(--brand); }

  .phone-place b { font-family: var(--font-mono); font-size: 22px; font-weight: 700; line-height: 26px; }

  .phone-place small { font-size: 11px; font-weight: 600; line-height: 14px; }

  .phone-progress { display: flex; flex-direction: column; gap: 10px; padding: 16px 25px 0; }

  .phone-progress-top { display: flex; align-items: baseline; justify-content: space-between; }

  .phone-progress-top > span { display: flex; align-items: baseline; gap: 6px; }

  .phone-progress-top em { font-family: var(--font-serif); font-size: 19px; line-height: 24px; color: var(--brand); }

  .phone-progress-top i { font-size: 12px; font-style: normal; line-height: 16px; color: #B5B5B0; }

  .phone-progress-top b { font-size: 13px; font-weight: 700; line-height: 16px; color: var(--brand); }

  .phone-progress-top small,
  .phone-recent-head span { font-size: 11px; font-weight: 600; line-height: 14px; letter-spacing: 0.1em; color: var(--cool-gray); }

  .phone-bar { display: flex; align-items: center; gap: 4px; height: 10px; }

  .phone-bar i { flex: 1 1 0; height: 7px; border-radius: 4px; background: var(--track); }

  .phone-bar i.on { background: var(--brand); }

  .phone-bar i.mark { flex: 0 0 2px; height: 13px; border-radius: 1px; background: var(--brand); }

  .phone-recent { display: flex; flex-direction: column; gap: 10px; padding: 22px 0 0 25px; }

  .phone-recent-head { display: flex; justify-content: space-between; padding-right: 25px; }

  .phone-recent-head span { letter-spacing: 0.12em; }

  .phone-pills { display: flex; gap: 8px; overflow: hidden; }

  .phone-pills span {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 37px;
    padding: 0 18px;
    border-radius: 999px;
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    line-height: 18px;
    letter-spacing: 0.03em;
  }

  .phone-input { display: flex; align-items: center; justify-content: space-between; padding: 42px 25px 0; }

  .phone-input b { font-size: 19px; font-weight: 600; line-height: 24px; letter-spacing: 0.16em; }

  .phone-round {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  .phone-grid { gap: 11px; padding-top: 30px; }

  .phone-grid i { width: 97px; height: 97px; border-radius: 15px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07); font-size: 30px; line-height: 36px; }

  .phone-grid i.used { background: #C2C2C0; box-shadow: none; color: rgba(26, 26, 26, 0.5); }

  .phone-grid i.center.used { background: #0F3424; color: rgba(255, 255, 255, 0.5); }

  /* How to play */
  .how { gap: 52px; padding: 96px var(--pad); }

  .how-body { flex-direction: row; align-items: center; gap: 72px; }

  .how-art { flex: 0 1 480px; min-width: 300px; }

  .how-text { flex: 1 1 0; min-width: 0; }

  .rules li { font-size: 18px; line-height: 30px; }

  .ranks ul { gap: 0 24px; }

  .ranks li { font-size: 21px; }

  /* Features */
  .features { gap: 52px; padding: 96px var(--pad); }

  .cards { grid-template-columns: 1fr 1fr; gap: 24px; }

  .card { padding: 36px; }

  .card-art { height: 236px; }

  .widget { gap: 18px; padding: 16px; }

  .widget-grid i { width: 40px; height: 40px; font-size: 15px; line-height: 15px; }

  .widget-side { min-width: 128px; }

  /* Closing band */
  .closing { gap: 28px; padding: 88px var(--pad); }

  .landing .closing h2 { font-size: 52px; line-height: 56px; }

  .closing p { font-size: 18px; }

  .closing .cta-row { max-width: none; }
}

/* Narrow desktops: the phone picture is drawn a little smaller. */
@media (min-width: 1000px) and (max-width: 1239.98px) {
  .hero { height: 660px; }
  .hero-copy { height: 580px; }
  .hero-phone { zoom: 0.85; }
  .hero .cta-row { flex-wrap: wrap; }
  .how-body { gap: 48px; }
  .how-art { flex-basis: 380px; }
  .hero-lede { font-size: 18px; line-height: 29px; }
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
