/* Landing page (templates/index.html, static/js/pages/landing.js). Tokens only; both themes; with
   "reduce motion" the animations are off (style.css) and landing.js draws still pictures. */

.lp { padding-bottom: var(--sp-6); overflow-x: hidden; }
.lp .container { max-width: 72rem; }

/* ---- Hero ----------------------------------------------------------------------------- */

.lp-hero {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--sp-6);
    align-items: center;
    padding-top: var(--sp-6);
    padding-bottom: var(--sp-6);
}
.lp-eyebrow {
    margin: 0 0 var(--sp-2);
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}
.lp-title {
    margin: 0 0 var(--sp-3);
    font-size: var(--fs-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text);
}
.lp-lead { margin: 0 0 var(--sp-5); font-size: var(--fs-lg); line-height: 1.55; color: var(--text-muted); }
.lp-cta { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.lp-cta--center { justify-content: center; margin-top: var(--sp-5); }
.lp-formats { margin: var(--sp-4) 0 0; font-size: var(--fs-sm); color: var(--text-muted); letter-spacing: 0.02em; }
.lp-invite { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); color: var(--text-muted); }

.lp-hero-visual { margin: 0; }
.lp-window {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-2);
}
.lp-window-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: var(--sp-2) var(--sp-3);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}
.lp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.lp-window-title { margin-left: var(--sp-2); font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }
.lp-tracks { display: block; width: 100%; height: auto; padding: var(--sp-2); cursor: crosshair; touch-action: pan-y; }
.lp-caption { margin: var(--sp-2) 0 0; font-size: var(--fs-sm); color: var(--text-muted); text-align: center; }

/* ---- Shared chart pieces (SVG) ----------------------------------------------------------- */

.lp svg text { font-family: var(--font-ui); }
.lp-grid line { stroke: var(--chart-grid); stroke-width: 1; }
.lp-axis { font-size: var(--fs-xs); fill: var(--text-muted); font-variant-numeric: tabular-nums; }
.lp-track { fill: none; stroke: var(--border); }
.lp-track-name { font-size: var(--fs-xs); font-weight: 600; fill: var(--text-muted); }
.lp-track-value { font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.lp-panel-title { font-size: var(--fs-sm); font-weight: 600; fill: var(--text); }
.lp-curve, .lp-path {
    fill: none;
    stroke-width: 1.6;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: lp-draw 1.8s var(--ease) forwards;
}
.lp-path { stroke: var(--accent); stroke-width: 2.6; animation-play-state: paused; }
.is-visible .lp-path { animation-play-state: running; }
@keyframes lp-draw { to { stroke-dashoffset: 0; } }
.lp-cursor line { stroke: var(--text); stroke-width: 1; stroke-dasharray: 4 3; opacity: 0.7; }
.lp-cursor-tag { fill: var(--text); }
.lp-cursor-text { font-size: var(--fs-xs); font-weight: 700; fill: var(--bg); font-variant-numeric: tabular-nums; }
.lp-cursor-dot { stroke: var(--surface); stroke-width: 1.5; }
.lp-marker { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.lp-marker--end { fill: var(--accent); }
.lp-note { font-size: var(--fs-xs); font-weight: 600; fill: var(--text); }
.lp-note--muted { font-weight: 400; fill: var(--text-muted); }
.lp-notes { opacity: 0; transition: opacity var(--dur-slow) var(--ease) 1.4s; }
.is-visible .lp-notes { opacity: 1; }

/* ---- Features ------------------------------------------------------------------------ */

.lp-features { display: flex; flex-direction: column; gap: var(--sp-7); padding-top: var(--sp-5); }
.lp-feature {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--sp-6);
    align-items: center;
}
.lp-feature--flip .lp-feature-text { order: 2; }
.lp-feature-title { margin: 0 0 var(--sp-3); font-size: var(--fs-xl); font-weight: 700; color: var(--text); }
.lp-feature-text p { margin: 0; font-size: var(--fs-md); line-height: 1.6; color: var(--text-muted); }
.lp-feature-visual {
    margin: 0;
    padding: var(--sp-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
}
.lp-feature-visual svg, .lp-hole { display: block; width: 100%; }
.lp-hole { height: 340px; }

.lp-reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.lp-reveal.is-visible { opacity: 1; transform: none; }

/* Files into a well */
.lp-files { display: flex; align-items: center; gap: var(--sp-4); }
.lp-file-chips { display: flex; flex: 1 1 auto; flex-direction: column; gap: var(--sp-2); min-width: 0; margin: 0; padding: 0; list-style: none; }
.lp-chip {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-1) var(--sp-3);
    overflow: hidden;
    font-size: var(--fs-sm);
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    opacity: 0;
    transform: translateX(-12px);
}
.is-visible .lp-chip { animation: lp-slide 0.5s var(--ease) forwards; animation-delay: inherit; }
@keyframes lp-slide { to { opacity: 1; transform: none; } }
.lp-chip svg, .lp-mini-icons svg { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; color: var(--accent); }
.lp-arrow { flex: 0 0 auto; font-size: var(--fs-xl); color: var(--text-muted); }
.lp-mini-well {
    flex: 0 0 13rem;
    padding: var(--sp-3);
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-1);
}
.lp-mini-name { display: flex; align-items: center; justify-content: space-between; font-weight: 700; color: var(--text); }
.lp-mini-status {
    padding: 0 var(--sp-2);
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--success);
    background: var(--success-subtle);
    border-radius: var(--r-pill);
}
.lp-mini-meta { margin: var(--sp-1) 0 var(--sp-2); font-size: var(--fs-xs); color: var(--text-muted); }
.lp-mini-icons { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--text-muted); }
.lp-mini-icons li { display: inline-flex; align-items: center; gap: 3px; }
.lp-mini-foot { margin-top: var(--sp-2); padding-top: var(--sp-2); font-size: var(--fs-xs); color: var(--text-muted); border-top: 1px solid var(--border); }

/* Box plot */
.lp-box { opacity: 0; transform: scaleY(0.2); }
.is-visible .lp-box { animation: lp-grow 0.7s var(--ease) forwards; }
@keyframes lp-grow { to { opacity: 1; transform: none; } }
.lp-whisker { stroke: var(--text-muted); stroke-width: 1.5; }
.lp-median { stroke-width: 3; }

/* Leak-off test and depth by day */
.lp-pumping { fill: var(--accent-subtle); }
.lp-fit { stroke: var(--text-muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.lp-bar { fill: color-mix(in srgb, var(--accent) 55%, transparent); opacity: 0; transform: scaleY(0.2); transform-box: fill-box; transform-origin: bottom; }
.is-visible .lp-bar { animation: lp-grow 0.6s var(--ease) forwards; }
.lp-baseline { stroke: var(--border-strong); stroke-width: 1; }

/* ---- Also in the app ------------------------------------------------------------------------ */

.lp-more { margin-top: var(--sp-7); }
.lp-more-title { margin: 0 0 var(--sp-4); font-size: var(--fs-xl); font-weight: 700; color: var(--text); text-align: center; }
.lp-more-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-3);
    margin: 0;
    padding: 0;
    list-style: none;
}
.lp-more-list li {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    padding: var(--sp-4);
    font-size: var(--fs-md);
    line-height: 1.55;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}
.lp-more-list strong { color: var(--text); }

/* ---- Steps, final call, credits ----------------------------------------------------------- */

.lp-steps { margin-top: var(--sp-7); padding: var(--sp-6) var(--sp-5); text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); }
.lp-steps-title { margin: 0 0 var(--sp-5); font-size: var(--fs-xl); font-weight: 700; color: var(--text); }
.lp-step-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-4);
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}
.lp-step-list li { display: flex; flex-direction: column; gap: var(--sp-1); font-size: var(--fs-md); color: var(--text-muted); }
.lp-step-list strong { color: var(--text); }
.lp-step-n {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin-bottom: var(--sp-1);
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-subtle);
    border-radius: 50%;
}
.lp-trust { margin: var(--sp-5) 0 0; font-size: var(--fs-md); color: var(--text-muted); }
.lp-credits { margin-top: var(--sp-6); font-size: var(--fs-xs); color: var(--text-muted); text-align: center; }

@media (max-width: 991.98px) {
    .lp-hero, .lp-feature { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
    .lp-more-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-feature--flip .lp-feature-text { order: 0; }
}
@media (max-width: 575.98px) {
    .lp-step-list, .lp-more-list { grid-template-columns: minmax(0, 1fr); }
    .lp-files { flex-direction: column; align-items: stretch; }
    .lp-arrow { align-self: center; transform: rotate(90deg); }
    .lp-mini-well { flex-basis: auto; }
    .lp-hole { height: 280px; }
    .lp-steps { padding: var(--sp-5) var(--sp-3); }
}
@media (prefers-reduced-motion: reduce) {
    .lp-reveal, .lp-chip, .lp-box, .lp-bar, .lp-notes { opacity: 1; transform: none; }
    .lp-curve, .lp-path { stroke-dashoffset: 0; }
}
