/* ==========================================================================
   Landing page — public marketing page at "/" for anonymous visitors.

   Every selector here is "lp-" prefixed, and every rule that reaches into an
   existing app class is scoped as a descendant of ".lp-shot" (the mockup
   wrapper). This file is linked only from landing.html — never added to
   main.css's @import list — so nothing here can leak onto an app page.
   ========================================================================== */

/* ── Local tokens ── */
.lp {
    --lp-max: 1040px;
    --lp-max-copy: 720px;
    /* .auth-btn's white-on-accent fails AA (3.52:1). Scoped fix — see
       forms.css for the same finding on the login/signup pages themselves. */
    --lp-accent-strong: color-mix(in srgb, var(--accent) 85%, #000);
}

/* ── Page shell ── */
.lp {
    background: var(--bg-dark);
    min-height: 100vh;
}

.lp-container {
    max-width: var(--lp-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.lp-container--copy {
    max-width: var(--lp-max-copy);
    text-align: center;
}

.lp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    max-width: var(--lp-max);
    margin: 0 auto;
}

.lp-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.lp-brand-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.lp-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lp-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.lp-theme-toggle:hover {
    color: var(--accent);
    background: var(--accent-glow);
    border-color: var(--accent);
}

.lp-theme-toggle .material-icons {
    font-size: 18px;
}

.lp-signin-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.lp-signin-link:hover {
    color: var(--accent);
}

section.lp-hero,
section.lp-section {
    padding: 5.5rem 0;
}

.lp-section--tint {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.lp-final-cta {
    text-align: center;
}

.lp-footer {
    padding: 2.5rem 0 3rem;
    border-top: 1px solid var(--border-color);
}

.lp-footer-inner {
    text-align: center;
}

.lp-footer-brand {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ── Typography scale ── */
.lp-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.lp-h1 {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 700;
    color: var(--text-primary) !important;
    line-height: 1.15;
    letter-spacing: -0.02em;
    max-width: 20ch;
    margin: 0 auto;
}

.lp-h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary) !important;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
}

.lp-h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary) !important;
    line-height: 1.3;
    margin-bottom: 0.6rem;
}

.lp-h4 {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-primary) !important;
    margin: 0.75rem 0 0.35rem;
}

.lp-lead {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

.lp-body {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 0.9rem;
}

.lp-body--wide {
    max-width: 62ch;
}

.lp-body em {
    color: var(--text-primary);
    font-style: normal;
    font-weight: 600;
}

.lp-caption {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.85rem;
}

.lp-fineprint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 1rem;
}

.lp-fineprint a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.lp-fineprint a:hover {
    text-decoration: underline;
}

/* ── Hero ── */
.lp-hero-sub {
    max-width: 46ch;
    margin: 0 auto 1.25rem;
}

.lp-hero-underline {
    margin-top: 1.1rem;
}

.lp-cta-row {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.lp-btn-lg {
    font-size: 1rem;
    padding: 0.8rem 1.75rem;
    text-decoration: none;
}

/* Contrast fix scoped to the landing page — see the open item in the plan
   about carrying this fix into forms.css for login/signup as well. Hover
   goes darker still (not back to plain --accent), so contrast never regresses. */
.lp .auth-btn:not(.auth-btn--ghost) {
    background-color: var(--lp-accent-strong);
}

.lp .auth-btn:not(.auth-btn--ghost):hover {
    background-color: color-mix(in srgb, var(--accent) 70%, #000);
}

/* ── Hero waveform ── */
.lp-wave {
    width: 100%;
    max-width: 860px;
    margin: 2.5rem auto 0;
    padding: 0 1.5rem;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
            mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

.lp-wave-svg {
    display: block;
    width: 100%;
    height: auto;
}

.lp-wave-noise {
    opacity: 0.85;
    animation: lp-noise-settle 0.9s ease 1.3s forwards;
}

.lp-wave-noise-a { opacity: 0.75; }
.lp-wave-noise-b {
    opacity: 0.4;
    animation: lp-jitter 0.5s steps(2, end) 4;
}

.lp-wave-cut {
    opacity: 0;
    animation: lp-cut-in 0.35s ease 0.25s forwards;
}

.lp-wave-signal {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: lp-draw 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.45s forwards;
}

@keyframes lp-jitter {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

@keyframes lp-cut-in { to { opacity: 0.4; } }
@keyframes lp-draw { to { stroke-dashoffset: 0; } }
@keyframes lp-noise-settle { to { opacity: 0.32; } }

@media (prefers-reduced-motion: reduce) {
    .lp-wave-noise   { animation: none; opacity: 0.32; }
    .lp-wave-noise-b { animation: none; }
    .lp-wave-cut     { animation: none; opacity: 0.4; }
    .lp-wave-signal  { animation: none; stroke-dashoffset: 0; }
}

/* ── Mockup shell ── */
.lp-shot {
    position: relative;
    pointer-events: none;
    user-select: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-drop);
    padding: 0.75rem;
    overflow: hidden;
}

/* The app hides row affordances until :hover. A static mockup never hovers,
   so force the revealed state or the rows render half-empty. */
.lp-shot .icon-btn,
.lp-shot .priority-icon,
.lp-shot .habit-stats,
.lp-shot .goal-habit-unlink,
.lp-shot .set-date-form {
    opacity: 1;
}

/* .task-date-badge is normally only styled by tasks_filter.css, which the
   landing page doesn't load (it's a whole filter-UI stylesheet for one
   badge) — reproduce just the rule here. */
.lp-shot .task-date-badge {
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Nothing inside a mockup responds — kill all motion. */
.lp-shot *,
.lp-shot *::before,
.lp-shot *::after {
    transition: none;
    animation: none;
}

.lp-shot--today {
    max-width: 720px;
    margin: 1.5rem auto 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.lp-shot--today .task-list-card {
    margin-bottom: 0;
    box-shadow: var(--shadow-drop);
}

.lp-shot--cropped {
    -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
            mask-image: linear-gradient(to bottom, #000 72%, transparent);
}

/* Inbox capture — fake focused input */
.lp-fakeinput {
    display: flex;
    align-items: center;
    min-height: 2.5em;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.lp-fakeinput--focused {
    border-color: var(--accent);
    box-shadow: none;
}

.lp-caret {
    display: inline-block;
    width: 1.5px;
    height: 1.05em;
    margin-left: 2px;
    background: var(--accent);
    vertical-align: -2px;
    animation: lp-blink 1.1s steps(1, end) infinite;
}

@keyframes lp-blink {
    0%, 50%  { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .lp-caret { animation: none; }
}

/* Process row — one row shown mid-exit */
.lp-shot .lp-row--leaving { opacity: 0.5; }

.lp-row-note {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    white-space: nowrap;
    padding-right: 0.35rem;
}

/* Week grid — the app's 240px scrolling cell is too heavy at landing scale */
.lp-shot--week {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.lp-shot--week .week-spread {
    margin-bottom: 0;
    box-shadow: var(--shadow-drop);
}

.lp-shot--week .week-day-cell {
    min-height: 132px;
}

.lp-shot--week .week-day-tasks {
    max-height: none;
    overflow: visible;
}

.lp-shot--week .week-day-cell:not(.week-this-week-cell) .add-item-row {
    display: none;
}

/* Goal + Contributing Habits */
.lp-goal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
    margin-top: 2rem;
}

.lp-shot--goal,
.lp-shot--contrib {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.lp-shot--goal .goal-panel {
    box-shadow: var(--shadow-drop);
}

.lp-shot--contrib .goal-panel-section {
    box-shadow: var(--shadow-drop);
}

/* The elapsed marker is 2px wide — annotate it, desktop only. The same fact
   is stated in the body copy, so nothing is lost when this is hidden. */
.lp-annot {
    display: none;
    position: absolute;
    left: var(--lp-annot-x);
    bottom: 0.35rem;
    transform: translateX(-50%);
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.lp-annot-line {
    width: 1px;
    height: 20px;
    background: var(--text-secondary);
    opacity: 0.6;
}

.lp-annot-text {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    white-space: nowrap;
}

.lp-goal-footer {
    max-width: 62ch;
    margin: 2.5rem auto 0;
    text-align: center;
}

.lp-goal-footer .lp-body--wide {
    margin-left: auto;
    margin-right: auto;
}

/* ── Section layouts ── */
.lp-step {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) 1.3fr;
    gap: 3rem;
    align-items: center;
    margin-top: 3.5rem;
}

.lp-step:first-of-type {
    margin-top: 2.5rem;
}

.lp-habits-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) 1.3fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2.5rem;
}

.lp-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.lp-detail-icon {
    color: var(--accent);
    font-size: 22px;
}

/* ── Focus states ── */
.lp a:focus-visible,
.lp button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 8px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .lp-goal-grid {
        grid-template-columns: 1fr;
    }
    .lp-annot { display: none; }
}

@media (max-width: 768px) {
    .lp-container { padding: 0 1.25rem; }
    section.lp-hero,
    section.lp-section { padding: 4rem 0; }

    .lp-cta-row {
        flex-direction: column;
        align-items: stretch;
        max-width: 320px;
        margin-inline: auto;
    }

    .lp-step,
    .lp-habits-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .lp-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    section.lp-hero,
    section.lp-section { padding: 3rem 0; }

    .lp-details {
        grid-template-columns: 1fr;
    }

    /* Eight stacked week cells is too much scroll for a marketing
       illustration — show Mon–Thu + This Week only. */
    .lp-shot--week .week-day-cell:nth-child(5),
    .lp-shot--week .week-day-cell:nth-child(6),
    .lp-shot--week .week-day-cell:nth-child(7) {
        display: none;
    }
    .lp-shot--week .week-day-cell {
        min-height: 96px;
    }
}
