/* Landing page (js/landing.js) — the pre-login welcome screen. Sits in
   #landingRoot, a sibling of .app that app.js shows/hides at boot.

   Matches the app's own visual language instead of a separate "marketing
   site" look: white content on the same surface color the product itself
   uses, navy reserved for the same places it appears in the app (the top
   bar here plays the same role the sidebar rail does inside the app), blue
   accent only on the one thing that should draw the eye. Left-aligned, not
   centered — a confident single anchor point reads calmer than everything
   stacked on a middle axis. */

#landingRoot {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  background: var(--surface);
}
#landingRoot[hidden] { display: none; }

/* Sticky footer: content grows, footer stays pinned to the viewport bottom
   on short pages instead of floating right under the features grid. */
.landing-page { min-height: 100%; display: flex; flex-direction: column; }
.landing-main { flex: 1; }

/* ---------- top bar ---------- */
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-10);
  border-bottom: 1px solid var(--border);
}
.landing-nav-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: var(--fs-body);
  color: var(--text);
}

/* ---------- hero ---------- */
/* Section padding above the spacing scale (72, 88, 96px) stays literal:
   the --sp-* scale stops at 64px. */
.landing-hero {
  padding: 88px var(--sp-10) var(--sp-16);
  max-width: 640px;
}
.landing-title {
  font-size: clamp(2.125rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: var(--lh-tight);
  color: var(--text);
  margin-bottom: var(--sp-4);
}
.landing-tagline {
  font-size: var(--fs-lg);
  line-height: var(--lh);
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: var(--sp-8);
}
.landing-cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
/* A quiet line under the button, never louder than the tagline (F-63). */
.landing-signin-note { flex-basis: 100%; font-size: var(--fs-sm); color: var(--text-muted); }

/* ---------- entrance: staggered fade-up on load, not on scroll — this is
   a one-screen page, not a long scroller with reveal-on-scroll sections. */
.landing-title,
.landing-tagline,
.landing-cta,
.landing-feature {
  opacity: 0;
  animation: landing-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.landing-title { animation-delay: 0.02s; }
.landing-tagline { animation-delay: 0.14s; }
.landing-cta { animation-delay: 0.26s; }
.landing-features .landing-feature:nth-child(1) { animation-delay: 0.38s; }
.landing-features .landing-feature:nth-child(2) { animation-delay: 0.46s; }
.landing-features .landing-feature:nth-child(3) { animation-delay: 0.54s; }
.landing-features .landing-feature:nth-child(4) { animation-delay: 0.62s; }

@keyframes landing-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-title, .landing-tagline, .landing-cta, .landing-feature {
    animation: none;
    opacity: 1;
  }
}
/* Sizing only — .btn/.btn-primary's own colors already work correctly on
   both the white page and the navy footer band below, so nothing here
   touches color. */
.btn-lg { padding: var(--sp-3) var(--sp-6); font-size: var(--fs-body); }

/* ---------- feature grid: two columns, no borders, no fills ----------
   Left rule only — a single vertical hairline down the middle, not a box
   around each item. */
.landing-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-10) var(--sp-12);
  max-width: 900px;
  padding: 0 var(--sp-10) var(--sp-16);
}
.landing-feature-title { font-size: var(--fs-lg); font-weight: 700; color: var(--text); margin-bottom: var(--sp-2); }
.landing-feature-body { font-size: var(--fs-md); line-height: var(--lh); color: var(--text-muted); max-width: 40ch; }

/* Label look from the shared eyebrow rule in base.css (issue #16 F-81). */
.landing-section-head { margin-bottom: var(--sp-6); }

/* ---------- how it works: numbered rows, no cards ---------- */
/* The section rules run the full width; the text inside keeps the 900px
   column (F-63). Every section is 64px from the rule above and below it. */
.landing-steps-wrap { padding: var(--sp-16) var(--sp-10); border-top: 1px solid var(--border); }
.landing-steps-wrap > *, .landing-modules-wrap > * { max-width: calc(900px - 2 * var(--sp-10)); }
.landing-steps { display: flex; flex-direction: column; gap: var(--sp-8); }
.landing-step { display: flex; gap: var(--sp-5); align-items: baseline; }
.landing-step-num {
  flex-shrink: 0;
  width: 34px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.landing-step-title { font-size: var(--fs-body); font-weight: 700; color: var(--text); margin-bottom: var(--sp-1); }
.landing-step-body { font-size: var(--fs-md); line-height: var(--lh); color: var(--text-muted); max-width: 56ch; }

/* ---------- module list: plain inline text list, not chips/pills ---------- */
.landing-modules-wrap { padding: var(--sp-16) var(--sp-10); border-top: 1px solid var(--border); }
.landing-modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* Same column gap as the features grid, so column 2 lines up (F-85). */
  gap: var(--sp-2) var(--sp-12);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--fs-md);
  color: var(--text);
}
.landing-modules li { padding-left: var(--sp-3); position: relative; }
.landing-modules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- footer: slim closing bar, mirrors the in-app sidebar footer
   (hairline rule, muted small text) instead of another color-block CTA. */
.landing-footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-4) var(--sp-10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.landing-footer-brand { font-weight: 600; }
/* .app-version's shared rule in css/base.css is tuned for the dark sidebar
   rail — override for this white-background bar so the version stays
   legible instead of near-invisible. */
.landing-footer .app-version { color: var(--text-muted); opacity: 1; }

@media (max-width: 760px) {
  .landing-features { grid-template-columns: 1fr; }
  .landing-hero { padding: var(--sp-16) var(--sp-6) var(--sp-12); }
  .landing-nav { padding: var(--sp-4) var(--sp-6); }
  .landing-features { padding: 0 var(--sp-6) var(--sp-16); }
  .landing-steps-wrap { padding: var(--sp-12) var(--sp-6) var(--sp-16); }
  .landing-modules-wrap { padding: var(--sp-12) var(--sp-6) 72px; }
  .landing-modules { grid-template-columns: 1fr; }
  .landing-footer { padding: var(--sp-3) var(--sp-6); }
}
