/* ════════════════════════════════════════════════════════════════════════
   Landing — what signed-out visitors see first. Token-driven (theme.css).
   Four surface roles, same as the daily challenge: dark room · amber parchment
   · amber action · clay press. Structure is hairlines and whitespace, not boxes.
   ════════════════════════════════════════════════════════════════════════ */
.ld { max-width: 1080px; margin: 0 auto; padding: clamp(28px, 5vw, 60px) clamp(18px, 4vw, 34px) 40px; }

/* ── hero: copy on the left, a parchment snippet card on the right ── */
.ld-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 6vw, 72px); align-items: center; }
.ld-hero-text { max-width: 54ch; }
.ld-eyebrow { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--amber); margin: 0 0 16px; }
.ld-h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 5.4vw, 3.9rem); line-height: 1.04; letter-spacing: -.012em; color: var(--text-strong); margin: 0; text-wrap: balance; }
.ld-sub { font-size: clamp(1rem, 1.4vw, 1.12rem); line-height: 1.62; color: var(--muted); max-width: 46ch; margin: 20px 0 28px; }
.ld-ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ld-btn { padding: 12px 20px; font-size: .98rem; border-radius: 12px; }
.ld-btn.btn-ghost { color: var(--text); }
.ld-note { font-size: .82rem; color: var(--subtle); margin: 16px 0 0; }

/* the snippet card — the daily challenge's parchment, in miniature */
.ld-preview {
  background: radial-gradient(135% 130% at 50% 30%, #E9D4AC 0%, #D6BB8E 100%);
  color: var(--ink); border-radius: 16px; border: 1px solid rgba(96,64,32,.34);
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 80px rgba(240,174,69,.08);
  padding: 16px 18px 16px; transform: rotate(-1.2deg);
}
.ld-pv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; }
.ld-pv-eyebrow { color: #7a5a2a; font-weight: 700; }
.ld-pv-meta { color: #6b563a; }
.ld-pv-sheet { margin: 12px 0 14px; border-radius: 10px; background: rgba(255,250,240,.22); box-shadow: inset 0 0 0 1px rgba(66,44,20,.14); padding: 8px 6px; }
.ld-pv-sheet canvas { display: block; width: 100%; height: 132px; }
.ld-pv-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ld-pv-play {
  cursor: pointer; font: 700 .9rem var(--font-body); color: var(--bink); border: none; border-radius: 12px; padding: 10px 18px;
  background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: 0 5px 0 var(--c3), 0 10px 18px rgba(0,0,0,.3);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.ld-pv-play:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--c3), 0 14px 22px rgba(0,0,0,.34); }
.ld-pv-play:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--c3); }
.ld-pv-play:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.ld-pv-note { font-size: .8rem; color: #6b563a; }

/* ── sections: hairline structure ── */
.ld-section { margin-top: clamp(64px, 10vw, 110px); }
.ld-h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.01em; color: var(--text-strong); margin: 0 0 18px; }

.ld-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; border-top: 1px solid var(--border-strong); }
.ld-steps li { padding: 22px 0 6px; }
.ld-num { display: block; font-family: var(--font-display); font-size: 1.35rem; line-height: 1; color: var(--amber); margin-bottom: 12px; }
.ld-steps h3, .ld-feat h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--text-strong); margin: 0 0 6px; }
.ld-steps p, .ld-feat p { margin: 0; font-size: .92rem; line-height: 1.58; color: var(--muted); }
.ld-aside { margin: 24px 0 0; font-size: .92rem; color: var(--muted); }
.ld-aside b { color: var(--text); font-weight: 600; }

.ld-feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 28px; border-top: 1px solid var(--border-strong); }
.ld-feat { padding: 22px 0 6px; }
.ld-feat h3 { font-size: 1.02rem; }

/* closing */
.ld-cta { margin-top: clamp(64px, 10vw, 110px); padding-top: 40px; border-top: 1px solid var(--border-strong); text-align: center; }
.ld-cta .ld-h2 { margin-bottom: 16px; }
.ld-cta .ld-ctas { justify-content: center; }

.ld-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--border); font-size: .78rem; color: var(--subtle); }
.ld-foot nav { display: flex; gap: 16px; }
.ld-foot a { color: var(--muted); text-decoration: none; }
.ld-foot a:hover { color: var(--text); text-decoration: underline; }

/* entrance */
@media (prefers-reduced-motion: no-preference) {
  .ld > * { animation: ld-up .6s var(--ease) both; }
  .ld > *:nth-child(2) { animation-delay: .08s; } .ld > *:nth-child(3) { animation-delay: .16s; } .ld > *:nth-child(4) { animation-delay: .22s; }
  @keyframes ld-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* ── shell while signed out / on the landing ── */
body.landing #gesture-fab, body.landing #gesture-indicator { display: none; }
body.signed-out .tab[data-tab="library"], body.signed-out .tab[data-tab="catalog"] { display: none; }

@media (max-width: 960px) { .ld-feats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) {
  .ld-hero { grid-template-columns: 1fr; gap: 34px; }
  .ld-preview { transform: none; max-width: 520px; }
  .ld-steps { grid-template-columns: 1fr; gap: 0; }
  .ld-steps li + li, .ld-feat + .ld-feat { border-top: 1px solid var(--border); }
  .ld-feats { grid-template-columns: 1fr; gap: 0; }
}
