/* Landing page (/landing). Builds on the tokens and base styles of style.css. */

.lp-root { scroll-behavior: smooth; scroll-padding-top: 64px; scroll-snap-type: y proximity; }
.lp-body { display: block; }

/* --- sticky navigation ---------------------------------------------------- */

.lp-nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 10px max(16px, calc((100vw - 1080px) / 2));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.lp-links { display: flex; gap: 4px; margin-left: auto; }
.lp-links a {
  padding: 6px 12px; border-radius: 999px; color: var(--muted);
  text-decoration: none; font-weight: 600; font-size: 0.9rem;
}
.lp-links a:hover { color: var(--text); }
.lp-links a.is-active { background: var(--accent-soft); color: var(--accent-strong); }

.lp-btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
  border: 2px solid var(--accent); transition: transform 0.15s ease, background 0.15s ease;
}
.lp-btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); transform: translateY(-1px); }
.lp-btn-small { padding: 6px 18px; font-size: 0.9rem; }
.lp-btn-big { padding: 14px 44px; font-size: 1.15rem; }
.lp-btn-ghost { background: transparent; color: var(--accent-strong); border-color: var(--line); }
.lp-btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent); }
@media (prefers-color-scheme: dark) { .lp-btn:not(.lp-btn-ghost) { color: #131220; } }

/* --- sections ------------------------------------------------------------- */

main.lp { max-width: none; padding: 0; margin: 0; }
.lp-section {
  position: relative; scroll-snap-align: start;
  min-height: calc(100svh - 56px);
  display: flex; align-items: center;
  padding: 72px 16px;
}
.lp-alt { background: color-mix(in srgb, var(--card) 70%, var(--bg)); }
.lp-inner { width: 100%; max-width: 1080px; margin: 0 auto; }
.lp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

.lp-section h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -0.02em; margin-bottom: 1rem; }
.lp-section h3 { font-size: 1.05rem; margin: 0 0 0.3rem; }
.lp-kicker {
  margin: 0 0 0.6rem; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-strong);
}
.lp-kicker-green { color: var(--success); }
.lp-lede { font-size: 1.15rem; color: var(--muted); max-width: 44rem; margin: 0 0 1.5rem; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5rem 0 0.75rem; }

/* --- hero ----------------------------------------------------------------- */

.lp-hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px;
  max-width: 1112px; margin: 0 auto;
}
.lp-hero h1 { font-size: clamp(2.3rem, 7vw, 4.2rem); line-height: 1.05; margin-bottom: 1.2rem; }
.lp-hero .lp-lede { font-size: 1.25rem; }
.lp-hero-art { display: flex; justify-content: center; }
.lp-hero-art .lp-board { width: min(100%, 400px); transform: rotate(-3deg); }
.lp-today { min-height: 1.4em; }
.lp-scroll {
  position: absolute; left: 50%; bottom: 18px; translate: -50% 0;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); text-decoration: none; border: 1px solid var(--line);
  animation: lp-bob 2.4s ease-in-out infinite;
}
@keyframes lp-bob { 50% { transform: translateY(6px); } }

/* --- boards --------------------------------------------------------------- */

.lp-board { display: block; width: 100%; filter: drop-shadow(0 12px 32px rgba(29, 27, 46, 0.18)); }
.lp-board-bg { fill: var(--cell); }
.lp-board-lines { stroke: var(--line); stroke-width: 0.03; fill: none; }
.lp-board-path {
  fill: none; stroke: var(--accent); stroke-width: 0.44; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: lp-draw 7s ease-in-out infinite;
}
.lp-board-path-static { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
@keyframes lp-draw { 0%, 6% { stroke-dashoffset: 1; } 70%, 100% { stroke-dashoffset: 0; } }
.lp-board-dots circle { fill: var(--dot); transition: fill 0.2s ease; }
.lp-board-dots text {
  fill: var(--dot-text); font-size: 0.32px; font-weight: 700;
  text-anchor: middle; dominant-baseline: central;
}
.lp-board-dots .is-next circle { fill: var(--gold); }
.lp-cell { fill: var(--cell-filled); }

.lp-demo {
  max-width: 400px; width: 100%; margin: 0 auto; padding: 16px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.lp-demo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.lp-demo-timer { font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.lp-demo .lp-board { filter: none; border-radius: 14px; }
.lp-demo-caption { margin: 12px 0 0; text-align: center; font-weight: 600; min-height: 3em; }

.lp-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1.5rem; }
.lp-steps li {
  counter-increment: step; position: relative; padding: 12px 14px 12px 56px; margin-bottom: 8px;
  border-radius: 12px; border: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, opacity 0.5s ease, transform 0.5s ease;
}
.lp-steps li::before {
  content: counter(step); position: absolute; left: 12px; top: 10px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--dot); color: var(--dot-text); font-weight: 700;
}
.lp-steps li.is-current { background: var(--accent-soft); border-color: var(--accent); }

/* --- week and cards ------------------------------------------------------- */

.lp-week {
  list-style: none; padding: 0; margin: 0 0 2rem;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; max-width: 640px;
}
.lp-day { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.8rem; font-weight: 700; }
.lp-day small { color: var(--muted); font-weight: 500; }
.lp-day i { display: block; width: 100%; border-radius: 8px 8px 4px 4px; background: var(--accent); }
.lp-d1 i { height: 22px; opacity: 0.45; }
.lp-d2 i { height: 44px; opacity: 0.7; }
.lp-d3 i { height: 72px; }

.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-grid-principles { grid-template-columns: repeat(4, 1fr); margin-bottom: 1.5rem; }
.lp-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin: 0;
}
.lp-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.lp-icon { display: block; font-size: 1.7rem; margin-bottom: 8px; }
.lp-principle { border-top: 3px solid var(--success); }

/* --- fediverse ------------------------------------------------------------ */

.lp-list { list-style: none; padding: 0; margin: 0; }
.lp-list li { position: relative; padding: 0 0 0 30px; margin-bottom: 14px; }
.lp-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--success); font-weight: 800; }

.lp-post {
  max-width: 360px; width: 100%; margin: 0 auto; padding: 18px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); transform: rotate(2deg);
}
.lp-post-head { display: flex; gap: 10px; align-items: center; line-height: 1.25; margin-bottom: 12px; }
.lp-post-avatar {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); font-size: 1.4rem;
}
.lp-post p { margin: 0 0 12px; }
.lp-post-link { color: var(--accent-strong); }
.lp-post-foot { display: flex; gap: 28px; padding-top: 10px; border-top: 1px solid var(--line); }

/* --- join ----------------------------------------------------------------- */

.lp-cta {
  text-align: center; padding: 40px 24px; border-radius: 24px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.lp-cta h2 { margin-top: 12px; }
.lp-cta p { margin: 0 0 1.5rem; }

/* --- reveal on scroll (only once landing.js has marked the page) ----------- */

.lp-js .lp-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.lp-js .lp-reveal.is-in { opacity: 1; transform: none; }
.lp-js .lp-grid .lp-reveal:nth-child(2) { transition-delay: 0.06s; }
.lp-js .lp-grid .lp-reveal:nth-child(3) { transition-delay: 0.12s; }
.lp-js .lp-grid .lp-reveal:nth-child(4) { transition-delay: 0.18s; }
.lp-js .lp-post.is-in { transform: rotate(2deg); }

@media (prefers-reduced-motion: reduce) {
  .lp-root { scroll-behavior: auto; }
  .lp-board-path { animation: none; stroke-dashoffset: 0; }
  .lp-scroll { animation: none; }
  .lp-js .lp-reveal { opacity: 1; transform: none; transition: none; }
  .lp-js .lp-post { transform: rotate(2deg); }
}

/* --- small screens -------------------------------------------------------- */

@media (max-width: 900px) {
  .lp-grid-principles { grid-template-columns: repeat(2, 1fr); }
  .lp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .lp-root { scroll-snap-type: none; }
  .lp-links { display: none; }
  .lp-nav .lp-btn-small { margin-left: auto; }
  .lp-section { min-height: 0; padding: 56px 16px; }
  .lp-hero { grid-template-columns: 1fr; gap: 28px; min-height: calc(100svh - 56px); align-content: center; padding-bottom: 72px; }
  .lp-hero-art .lp-board { width: min(70%, 280px); }
  .lp-split { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 520px) {
  .lp-grid, .lp-grid-principles { grid-template-columns: 1fr; }
  .lp-actions .lp-btn { flex: 1 1 100%; text-align: center; }
}
