/* Landing page (uses variables.css, components.css and ui.css) */
body.landing-page {
    font-family:
        'Inter',
        system-ui,
        -apple-system,
        'Segoe UI',
        sans-serif;
    background:
        radial-gradient(1200px 600px at 85% -10%, var(--accent-soft), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgb(99 102 241 / 0.08), transparent 60%), var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    min-height: 100vh;
    line-height: 1.5;
}

* {
    box-sizing: border-box;
}

.landing-nav {
    max-width: 1160px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand img {
    height: 34px;
    display: block;
}

.landing {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 3rem;
    align-items: center;
    padding: 2rem 0 3.5rem;
}

.badge {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent-text);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-size: clamp(2.3rem, 5vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
    font-weight: 800;
    margin: 0 0 1rem;
}

.hero-p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 34rem;
    margin: 0 0 1.75rem;
}

.btn-create {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--on-accent);
    border: none;
    padding: 1rem 1.6rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 10px 25px -8px color-mix(in srgb, var(--accent) 70%, transparent);
    transition:
        transform 0.2s var(--ease-out),
        box-shadow 0.2s;
    font-family: inherit;
}

.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -8px color-mix(in srgb, var(--accent) 80%, transparent);
}

.checks {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.checks li::before {
    content: '✓';
    color: var(--success);
    font-weight: 800;
    margin-right: 0.4rem;
}

/* Setup form card (replaces the call to action) */
.setup-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    max-width: 30rem;
    animation: fadeIn 0.3s var(--ease-out);
}

.setup-card h2 {
    font-size: 1.35rem;
    margin: 0 0 1.25rem;
}

.setup-card .field {
    margin-bottom: 1rem;
}

.setup-row {
    display: flex;
    gap: 1rem;
}

.setup-row .field {
    flex: 1;
    min-width: 0; /* lets date inputs shrink instead of spilling out of the card */
}

.setup-row input {
    width: 100%;
    min-width: 0;
}

.setup-card .btn-create {
    width: 100%;
    margin-top: 0.5rem;
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    padding: 0.6rem;
    font-family: inherit;
}

.form-error {
    color: var(--danger);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Product preview (pure HTML/CSS mock of the timeline) */
.hero-preview {
    position: relative;
}

.preview-window {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 22px;
    box-shadow:
        0 30px 60px -20px rgb(0 0 0 / 0.25),
        0 0 0 1px rgb(0 0 0 / 0.02);
    overflow: hidden;
    transform: rotate(-1deg);
}

.preview-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line-color);
}

.preview-bar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--line-color);
}

.preview-bar strong {
    margin-left: 0.6rem;
    font-size: 0.85rem;
}

.preview-body {
    position: relative;
    padding: 1rem 1.25rem 1.25rem 4.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.preview-body::before {
    content: '';
    position: absolute;
    left: 3.4rem;
    top: 1rem;
    bottom: 1.25rem;
    width: 2px;
    background: var(--line-color);
}

.p-row {
    --cat: var(--accent);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--cat) 10%, var(--card-bg));
    border: 1px solid color-mix(in srgb, var(--cat) 28%, var(--card-border));
    border-left: 4px solid var(--cat);
    font-weight: 700;
    font-size: 0.9rem;
    animation: previewIn 0.6s var(--ease-out) both;
}

.p-row small {
    margin-left: auto;
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.p-row::before {
    content: attr(data-time);
    position: absolute;
    left: -4rem;
    width: 2.6rem;
    text-align: right;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.p-row.tall {
    padding-block: 1rem;
}

.p-row:nth-child(1) {
    animation-delay: 0.1s;
}
.p-row:nth-child(2) {
    animation-delay: 0.2s;
}
.p-row:nth-child(3) {
    animation-delay: 0.3s;
}
.p-row:nth-child(4) {
    animation-delay: 0.4s;
}

/* The fireworks card keeps being "dragged" into place */
.p-row.dragging {
    animation:
        previewIn 0.6s var(--ease-out) 0.5s both,
        dragLoop 5s var(--ease-out) 1.4s infinite;
    box-shadow: var(--shadow-lg);
}

.preview-budget {
    margin: 0 1.25rem 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.preview-budget .bar {
    height: 7px;
    border-radius: 999px;
    background: var(--line-color);
    margin-top: 0.4rem;
    overflow: hidden;
}

.preview-budget .bar span {
    display: block;
    height: 100%;
    width: 72%;
    background: var(--accent);
    border-radius: inherit;
    animation: grow 1.4s var(--ease-out) 0.6s both;
}

.preview-chip {
    position: absolute;
    right: -0.75rem;
    bottom: 4.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    padding: 0.45rem 0.85rem 0.45rem 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    animation: float 4s ease-in-out infinite;
}

.preview-chip .faces {
    display: flex;
}

.preview-chip .faces span {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
    margin-left: -8px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 0.65rem;
}

.preview-chip .faces span:first-child {
    margin-left: 0;
}

@keyframes previewIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes dragLoop {
    0%,
    55%,
    100% {
        transform: none;
    }
    20% {
        transform: translate(24px, -10px) rotate(1.5deg);
    }
    40% {
        transform: translate(24px, -10px) rotate(1.5deg);
    }
}

@keyframes grow {
    from {
        width: 0;
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.feature {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 1.5rem;
}

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    background: var(--accent-soft);
    margin-bottom: 0.9rem;
}

.feature h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.feature p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* Find / join */
.find-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.find-card h2 {
    font-size: 1rem;
    margin: 0 0 0.6rem;
}

.join-section {
    display: flex;
    gap: 0.5rem;
}

.btn-join {
    background: var(--text-primary);
    color: var(--card-bg);
    border: none;
    border-radius: 10px;
    padding: 0 1.1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.btn-join:hover {
    opacity: 0.9;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.search-result-item {
    display: block;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

.search-result-item:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.no-results {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.landing-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line-color);
}

.loading {
    display: none;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding-top: 0.5rem;
    }
    .hero-preview {
        max-width: 520px;
    }
    .features {
        grid-template-columns: 1fr;
    }
    .find-card {
        grid-template-columns: 1fr;
    }
    .preview-chip {
        right: 0.5rem;
    }
}

@media (max-width: 520px) {
    .setup-row {
        flex-direction: column;
        gap: 0;
    }
    .preview-window {
        transform: none;
    }
}

.landing-footer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Privacy & contact page */
.legal-page {
    max-width: 46rem;
    margin: 0 auto;
    padding: 1rem 1.25rem 3rem;
    line-height: 1.65;
    color: var(--text-primary);
}
.legal-page h1 {
    font-size: clamp(2rem, 5vw, 2.6rem);
    letter-spacing: -0.03em;
    margin: 0.5rem 0 0.25rem;
}
.legal-page h2 {
    font-size: 1.2rem;
    margin: 2.25rem 0 0.5rem;
    scroll-margin-top: 1rem;
}
.legal-page p,
.legal-page li {
    color: var(--text-secondary);
}
.legal-page strong {
    color: var(--text-primary);
}
.legal-page ul {
    padding-left: 1.2rem;
}
.legal-page li {
    margin-bottom: 0.4rem;
}
.legal-page a {
    color: var(--accent-text, var(--accent));
}
.legal-updated {
    font-size: 0.85rem;
    margin: 0 0 1.25rem;
}
.legal-lead {
    font-size: 1.05rem;
}
.legal-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1.25rem 0 0.5rem;
}
.legal-toc a {
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}
.legal-toc a:hover {
    border-color: var(--accent);
}
.legal-page .landing-footer {
    margin-top: 3rem;
}
