/* The logged-out landing page. Confident statement typography, generous
   whitespace, one idea per section - in the app's own monochrome system (the
   body carries .appwiz, so every token is inherited), broken deliberately by
   one signal-coral accent: live dots, the dark Sera section, keyword emphasis.
   Authored mobile-first; 860px is the one breakpoint, matching auth.css. */

.landing {
  background: var(--card);
  /* The one non-monochrome voice on the page. --coral carries text on white
     (large sizes only), --coral-bright carries text and dots on dark ink. */
  --coral: #E8542A;
  --coral-bright: #FF6A3D;
}

/* Shared width rail. */
.ld-in { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }

/* The live signal: the Granted plan-grid mark, its five cells fading coral
   in turn, clockwise around the open centre (see _live_mark.html). The
   palette is carried in custom properties so the dark Sera section can
   re-tint the same markup. */
.ld-mark {
  --mark-dim: var(--line-2); --mark-hot: var(--coral); --mark-open: var(--ink-4);
  width: 15px; height: 15px; display: inline-block; vertical-align: -2px;
  margin-right: .35rem;
}
.ld-mark rect { fill: var(--mark-dim); }
.ld-mark .o { fill: none; stroke: var(--mark-open); stroke-width: 3; }

/* Buttons: the page's primary action is always the same solid-ink button. */
.ld-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .45rem; padding: .7rem 1.25rem; min-height: var(--tap);
  background: var(--ink); color: var(--card); border: 1px solid var(--ink);
  border-radius: var(--r-sm); font-weight: 600; font-size: .95rem;
  text-decoration: none; white-space: nowrap;
}
.ld-btn:hover { background: #000; }
.ld-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ld-btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.ld-btn-ghost:hover { background: var(--fill-2); border-color: var(--ink); }

/* --- top nav ----------------------------------------------------------- */
.ld-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.ld-nav-in { display: flex; align-items: center; gap: 1.4rem; min-height: 3.6rem; }
.ld-logo { display: inline-flex; align-items: center; text-decoration: none; }
.ld-logo img { height: 24px; width: auto; display: block; }
.ld-links { display: none; gap: 1.4rem; }
.ld-links a { color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .92rem; }
.ld-links a:hover { color: var(--ink); }
.ld-nav-cta { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.ld-login { color: var(--ink); text-decoration: none; font-weight: 550; font-size: .95rem; }
.ld-login:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 860px) {
  .ld-links { display: flex; }
  .ld-logo img { height: 27px; }
}

/* --- hero -------------------------------------------------------------- */
.ld-hero { padding: clamp(3.5rem, 10vw, 7.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); text-align: center; }
.ld-eyebrow {
  margin: 0 0 1.1rem; color: var(--ink-3); font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
}
.ld-hero h1 {
  margin: 0 auto; max-width: 17ch;
  font-size: clamp(2.7rem, 9vw, 5rem); line-height: 1.04;
  letter-spacing: -.033em; font-weight: 700;
}
.ld-hero-sub {
  margin: 1.4rem auto 0; max-width: 38rem;
  color: var(--ink-2); font-size: clamp(1.02rem, 2.4vw, 1.22rem); line-height: 1.55;
}
.ld-hero-cta { margin-top: 2rem; display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; }
.ld-fine { margin: 1.1rem auto 0; color: var(--ink-3); font-size: .85rem; max-width: 34rem; }

/* --- stat band --------------------------------------------------------- */
.ld-stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.ld-stats-in {
  display: grid; grid-template-columns: 1fr; gap: 0;
  padding-top: 0; padding-bottom: 0;
}
.ld-stat { padding: 1.6rem .5rem; text-align: center; border-top: 1px solid var(--line); }
.ld-stat:first-child { border-top: 0; }
.ld-stat b {
  display: block; font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 700;
  letter-spacing: -.025em; line-height: 1.1;
}
.ld-stat span { display: block; margin-top: .35rem; color: var(--ink-3); font-size: .9rem; }
@media (min-width: 860px) {
  .ld-stats-in { grid-template-columns: repeat(3, 1fr); }
  .ld-stat { border-top: 0; border-left: 1px solid var(--line); padding: 2.2rem 1rem; }
  .ld-stat:first-child { border-left: 0; }
}

/* --- section scaffolding ----------------------------------------------- */
.ld-section { padding: clamp(3rem, 8vw, 5.5rem) 0; scroll-margin-top: 3.6rem; }
.ld-section + .ld-section { border-top: 1px solid var(--line); }
.ld-h2 {
  margin: 0; font-size: clamp(1.7rem, 4.5vw, 2.5rem); line-height: 1.12;
  letter-spacing: -.025em; font-weight: 700;
}
.ld-sub { margin: .8rem 0 0; color: var(--ink-2); font-size: 1.02rem; max-width: 38rem; }
.ld-center { text-align: center; }
.ld-center .ld-sub { margin-left: auto; margin-right: auto; }

/* --- how it works: three steps with draw-on-reveal icons ---------------- */
.ld-steps { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 2.2rem; }
.ld-step {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  padding: 1.4rem 1.3rem;
}
.ld-step-ico {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem;
  border: 1px solid var(--line-2); border-radius: 12px; margin-bottom: .9rem;
}
.ld-step-ico svg {
  width: 22px; height: 22px; fill: none; stroke: var(--ink);
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
/* Each path is normalised to pathLength=1 in the markup, so one dash rule
   draws any glyph. Hidden only once JS has committed to revealing it. */
.has-js .ld-step-ico path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.has-js .ld-step.is-in .ld-step-ico path { animation: ld-draw 1.8s ease-out .2s forwards; }
.has-js .ld-step.is-in .ld-step-ico path:nth-of-type(2) { animation-delay: 1.1s; }
.has-js .ld-step.is-in .ld-step-ico path:nth-of-type(3) { animation-delay: 1.8s; }
@keyframes ld-draw { to { stroke-dashoffset: 0; } }
.ld-step h3 { margin: 0 0 .4rem; font-size: 1.08rem; letter-spacing: -.01em; }
.ld-step p { margin: 0; color: var(--ink-2); font-size: .93rem; line-height: 1.55; }
@media (min-width: 860px) {
  .ld-steps { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
}

/* --- Sera: the dark, full-bleed autonomy section ------------------------ */
/* Local palette: near-black surface, warm greys, coral as the live voice. */
.ld-sera {
  background: #101113; color: #ECEBE7;
  padding: clamp(3rem, 8vw, 5.5rem) 0 0; scroll-margin-top: 3.6rem;
}
.ld-sera-in {
  display: grid; grid-template-columns: 1fr; gap: 2.4rem; align-items: start;
  padding-bottom: clamp(2.6rem, 6vw, 4rem);
}
.ld-sera-label {
  margin: 0 0 1.1rem; color: #A9A8A3; font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
}
.ld-sera .ld-mark { --mark-dim: #3E3F42; --mark-hot: var(--coral-bright); --mark-open: #7E7D78; }
.ld-sera .ld-h2 { color: #fff; }
.ld-sera .ld-h2 em { font-style: normal; color: var(--coral-bright); }
.ld-sera-sub { margin: .9rem 0 0; color: #B9B8B3; font-size: 1.02rem; line-height: 1.6; max-width: 34rem; }
.ld-sera-points {
  display: grid; grid-template-columns: 1fr; gap: 1.1rem 1.6rem; margin-top: 2rem;
}
.ld-sera-point h3 { margin: 0 0 .25rem; font-size: .98rem; letter-spacing: -.01em; color: #fff; }
.ld-sera-point p { margin: 0; color: #A9A8A3; font-size: .9rem; line-height: 1.55; }
@media (min-width: 640px) { .ld-sera-points { grid-template-columns: 1fr 1fr; } }

/* The overnight feed: what Sera did while nobody was at the desk. */
.ld-feed {
  background: #17181B; border: 1px solid #2A2B2F; border-radius: 14px;
  padding: 1.2rem 1.2rem 0.6rem;
}
.ld-feed-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: .8rem;
  padding-bottom: .9rem; border-bottom: 1px solid #2A2B2F;
}
.ld-feed-head b { font-size: .95rem; color: #fff; letter-spacing: -.01em; }
.ld-live {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  color: var(--coral-bright); font-size: .78rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
}
.ld-feed-row {
  display: flex; gap: .9rem; align-items: baseline;
  padding: .62rem 0; border-top: 1px solid #222327; font-size: .9rem;
}
.ld-feed-row:first-child { border-top: 0; }
.ld-feed-row time {
  flex: none; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .78rem; color: #7E7D78;
}
.ld-feed-row span { color: #D8D7D2; line-height: 1.45; }
/* Rows land one after another once the feed card reveals. */
.has-js .ld-feed .ld-feed-row { opacity: 0; transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease; }
.has-js .ld-feed.is-in .ld-feed-row { opacity: 1; transform: none; }
.has-js .ld-feed.is-in .ld-feed-row:nth-child(2) { transition-delay: .25s; }
.has-js .ld-feed.is-in .ld-feed-row:nth-child(3) { transition-delay: .5s; }
.has-js .ld-feed.is-in .ld-feed-row:nth-child(4) { transition-delay: .75s; }
.has-js .ld-feed.is-in .ld-feed-row:nth-child(5) { transition-delay: 1s; }
.has-js .ld-feed.is-in .ld-feed-row:nth-child(6) { transition-delay: 1.25s; }
.has-js .ld-feed.is-in .ld-feed-row:nth-child(7) { transition-delay: 1.5s; }
@media (min-width: 860px) {
  .ld-sera-in { grid-template-columns: 1.15fr 1fr; gap: 3.5rem; }
}

/* --- the bento grid: one workspace, six unequal windows into it --------- */
.ld-bento { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 2.4rem; }
.ld-card {
  display: flex; flex-direction: column; gap: .9rem;
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper);
  padding: 1.4rem 1.3rem;
}
.ld-card h3 { margin: 0; font-size: 1.14rem; letter-spacing: -.015em; line-height: 1.25; }
.ld-card p { margin: 0; color: var(--ink-2); font-size: .93rem; line-height: 1.55; }
.ld-card-split h3 ~ p, .ld-card-split .ld-card-head ~ p { margin-top: .6rem; }
.ld-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
/* Plain full-width rows: the split layout without the card chrome. They get
   more headline-sized type and extra breathing room between grid neighbours. */
.ld-plain { padding: clamp(1.2rem, 4vw, 2.6rem) 0; }
/* The full-width hairline between the plain rows and the card row below. */
.ld-sep { grid-column: 1 / -1; width: 100%; margin: .6rem 0 1.6rem; border: 0; border-top: 1px solid var(--line); }
.ld-plain h3 { margin: 0; font-size: clamp(1.3rem, 3vw, 1.7rem); letter-spacing: -.02em; line-height: 1.2; }
.ld-plain p { margin: 0; color: var(--ink-2); line-height: 1.6; }
.ld-card .ld-live { color: var(--coral); }
.ld-card .ld-vis:last-child, .ld-card .ld-shot { margin-top: auto; }
.ld-card-split { display: grid; grid-template-columns: 1fr; gap: 1.4rem; align-items: center; }
@media (min-width: 860px) {
  .ld-bento { grid-template-columns: repeat(6, 1fr); gap: 1.2rem; }
  .ld-sp2 { grid-column: span 2; }
  .ld-sp3 { grid-column: span 3; }
  .ld-sp6 { grid-column: span 6; }
  .ld-card-split { grid-template-columns: 1fr 1.2fr; gap: 3rem; }
  /* Flipped split: the vignette leads, the explainer sits to its right. */
  .ld-card-split--flip > :first-child { order: 2; }
}

/* The scope screenshot: a real product read, slowly panned top to bottom.
   The window stays fixed; the image drifts the full overshoot and back. */
.ld-shot {
  height: 430px; overflow: hidden; background: #fff;
  border: 1px solid var(--line-2); border-radius: 10px;
}
.ld-shot img {
  display: block; width: 100%; height: auto;
  animation: ld-pan 36s ease-in-out infinite alternate;
}
@keyframes ld-pan { to { transform: translateY(calc(-100% + 428px)); } }

/* --- vignettes: small hand-built product cards -------------------------- */
.ld-vis {
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  padding: 1.1rem;
}
.ld-vis + .ld-vis { margin-top: 1.4rem; }
.ld-vis-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: .8rem;
  padding-bottom: .8rem; margin-bottom: .9rem; border-bottom: 1px solid var(--line);
}
.ld-vis-head b { font-size: .95rem; letter-spacing: -.01em; }
.ld-vis-head small { color: var(--ink-3); font-size: .78rem; white-space: nowrap; }

/* Chat vignette. Mirrors the real dock: the user's turn is a bubble, Sera
   answers as plain text straight on the surface. */
.ld-chat { display: flex; flex-direction: column; gap: .7rem; }
.ld-chat-you {
  align-self: flex-end; max-width: 85%; padding: .6rem .8rem;
  border-radius: var(--r); background: var(--ink); color: var(--card);
  font-size: .88rem; line-height: 1.5;
}
.ld-chat-metis {
  align-self: flex-start; max-width: 85%; padding: .6rem .8rem;
  border-radius: var(--r); background: var(--paper); border: 1px solid var(--line-2);
  font-size: .88rem; line-height: 1.5;
}
/* The action receipt under Sera's reply: quiet text, not a pill. */
.ld-chat-note {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .4rem;
  color: var(--ink-3); font-size: .78rem; font-weight: 550;
}

/* Checklist vignette (constraints, triage, the morning book). */
.ld-rows { display: flex; flex-direction: column; }
.ld-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem .1rem; border-top: 1px solid var(--line); font-size: .9rem;
}
.ld-row:first-child { border-top: 0; }
.ld-row .ld-k { color: var(--ink-2); }
.ld-row .ld-v { font-weight: 600; white-space: nowrap; }
.ld-row .ld-v-dim { color: var(--ink-4); font-weight: 500; white-space: nowrap; }
.ld-tag {
  display: inline-block; padding: .12rem .5rem; border: 1px solid var(--ink);
  border-radius: 999px; font-size: .74rem; font-weight: 600;
}
/* Count badges (the morning book's key numbers). */
.ld-num {
  display: inline-grid; place-items: center; min-width: 1.55rem; height: 1.55rem;
  padding: 0 .3rem; border: 1px solid var(--line-2); border-radius: 7px;
  background: var(--paper); font-size: .82rem; font-weight: 650;
}

/* Timeline vignette (brief progress, tracking). */
.ld-track { display: flex; flex-direction: column; }
.ld-track-step {
  position: relative; display: flex; align-items: center; gap: .75rem;
  padding: .55rem 0; font-size: .92rem; color: var(--ink-2);
}
.ld-track-dot {
  flex: none; width: 1.15rem; height: 1.15rem; border-radius: 999px;
  border: 1.5px solid var(--ink); display: grid; place-items: center;
  background: var(--card); font-size: .62rem; font-weight: 700; color: var(--card);
}
.ld-track-step.is-done .ld-track-dot { background: var(--ink); }
.ld-track-step.is-now { color: var(--ink); font-weight: 600; }
.ld-track-step.is-now .ld-track-dot { border-color: var(--coral); }
.ld-track-step.is-todo { color: var(--ink-4); }
.ld-track-step.is-todo .ld-track-dot { border-color: var(--line-2); }
/* Horizontal variant for the wide tracking card. */
@media (min-width: 860px) {
  .ld-track-row { flex-direction: row; justify-content: space-between; gap: 1rem; }
  .ld-track-row .ld-track-step { padding: 0; }
}

/* --- pricing ------------------------------------------------------------ */
.ld-foot-note { margin: 1.6rem auto 0; max-width: 44rem; color: var(--ink-3); font-size: .85rem; line-height: 1.55; }

/* --- final call to action ----------------------------------------------- */
.ld-cta { text-align: center; }
.ld-cta .ld-sub { margin-left: auto; margin-right: auto; }
.ld-cta .ld-hero-cta { margin-top: 1.8rem; }

/* --- footer ------------------------------------------------------------- */
.ld-footer { border-top: 1px solid var(--line); background: var(--paper); }
.ld-footer-in {
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.5rem;
  padding-top: 1.6rem; padding-bottom: 1.6rem;
}
.ld-footer-links { margin-left: auto; display: flex; gap: 1.2rem; }
.ld-footer a { color: var(--ink-3); text-decoration: none; font-size: .85rem; }
.ld-footer a:hover { color: var(--ink); }
.ld-footer span { color: var(--ink-4); font-size: .85rem; }

/* --- motion ------------------------------------------------------------- */
/* Subtle, modern movement: everything is short, eased, and restrained - and
   every rule in this block is switched off under prefers-reduced-motion. */

/* The live mark ticks: each cell eases coral and back, clockwise. */
@keyframes ld-tick {
  0% { fill: var(--mark-dim); }
  8%, 22% { fill: var(--mark-hot); }
  42%, 100% { fill: var(--mark-dim); }
}
.ld-mark .c1, .ld-mark .c2, .ld-mark .c3, .ld-mark .c4, .ld-mark .c5 {
  animation: ld-tick 2.8s ease-in-out infinite;
}
.ld-mark .c2 { animation-delay: .56s; }
.ld-mark .c3 { animation-delay: 1.12s; }
.ld-mark .c4 { animation-delay: 1.68s; }
.ld-mark .c5 { animation-delay: 2.24s; }

/* Buttons lift a hair on hover; press returns them flat. */
.ld-btn { transition: transform .18s ease, background .18s ease,
  border-color .18s ease, box-shadow .18s ease; }
.ld-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20,22,26,.16); }
.ld-btn:active { transform: none; box-shadow: none; }

/* Nav links: an underline that slides in from the left. */
.ld-links a {
  padding-bottom: 2px;
  background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 1.5px no-repeat;
  transition: background-size .25s ease, color .15s ease;
}
.ld-links a:hover { color: var(--ink); background-size: 100% 1.5px; }

/* Cards breathe on hover. */
.ld-step, .ld-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.ld-step:hover, .ld-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }

/* Hero entrance: each line rises into place in sequence on load. */
@keyframes ld-rise { from { opacity: 0; transform: translateY(14px); } }
.ld-hero > * { animation: ld-rise .6s cubic-bezier(.2,.7,.2,1) backwards; }
.ld-hero > :nth-child(2) { animation-delay: .07s; }
.ld-hero > :nth-child(3) { animation-delay: .14s; }
.ld-hero > :nth-child(4) { animation-delay: .21s; }
.ld-hero > :nth-child(5) { animation-delay: .28s; }

/* Reveal on scroll: sections drift up as they enter the viewport. Gated on
   .has-js (set by the inline script) so nothing is hidden when scripts never
   run. Siblings in a grid stagger left to right. */
.has-js [data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1);
}
.has-js [data-reveal].is-in { opacity: 1; transform: none; }
.has-js .ld-steps > :nth-child(2), .has-js .ld-stats-in > :nth-child(2),
.has-js .ld-sera-points > :nth-child(2), .has-js .ld-bento > :nth-child(5) { transition-delay: .1s; }
.has-js .ld-steps > :nth-child(3), .has-js .ld-stats-in > :nth-child(3),
.has-js .ld-sera-points > :nth-child(3), .has-js .ld-bento > :nth-child(6) { transition-delay: .2s; }
.has-js .ld-sera-points > :nth-child(4) { transition-delay: .3s; }

/* Smooth anchor scrolling for the nav links. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
/* Motion off: everything lands in place, nothing slides, lifts, draws,
   pans, pulses or marquees. */
@media (prefers-reduced-motion: reduce) {
  .ld-hero > * { animation: none; }
  .has-js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .has-js .ld-step-ico path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
  .has-js .ld-feed .ld-feed-row { opacity: 1; transform: none; transition: none; }
  .ld-mark rect { animation: none; }
  .ld-mark .c1 { fill: var(--mark-hot); }
  .ld-shot img { animation: none; }
  .ld-btn, .ld-step, .ld-card { transition: none; }
  .ld-btn:hover { transform: none; }
  .ld-step:hover, .ld-card:hover { transform: none; }
}
