/* Karot - Dark Togetherness Theme */

:root {
    --color-bg: #0a0a0f;
    --color-bg-subtle: #12121a;
    --color-text: #ffffff;
    --color-text-muted: #93939f;
    --color-text-subtle: #55555f;
    --color-border: #222233;
    --color-accent: #ff7a45;
    --color-accent-warm: #ffb35c;
    --color-accent-deep: #e0483f;
    --max-width: 900px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Network background canvas - fixed, sits behind everything as a fallback layer */
#network-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.content {
    position: relative;
    z-index: 1;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
header {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border);
    background: rgba(10, 10, 15, 0.75);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.logo img {
    opacity: 0.95;
}

.logo h1 {
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------- */
/* Hero - full-bleed video, gradient + canvas fallback underneath   */
/* ---------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    padding: calc(var(--spacing-xl) + 2rem) 0 var(--spacing-xl);
    overflow: hidden;
    text-align: center;
}

/* Always-present styled background: works even if the video never loads. */
.hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 15%, rgba(255, 122, 69, 0.22), transparent 55%),
        radial-gradient(ellipse at 85% 85%, rgba(224, 72, 63, 0.16), transparent 60%),
        linear-gradient(165deg, #1a0f0a 0%, var(--color-bg) 55%, var(--color-bg) 100%);
}

.hero-video,
.moments-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Transparent background so a missing/unsupported source reveals the
       gradient + canvas fallback underneath instead of a black or white box. */
    background: transparent;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 25%, rgba(255, 122, 69, 0.10), transparent 60%),
        linear-gradient(180deg, rgba(10, 10, 15, 0.35) 0%, rgba(10, 10, 15, 0.6) 45%, rgba(10, 10, 15, 0.94) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-tagline {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-accent-warm);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.hero h2 {
    font-size: clamp(2.5rem, 6.5vw, 4.5rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: var(--spacing-md);
    max-width: 840px;
    margin-left: auto;
    margin-right: auto;
    color: #ffffff;
    background: linear-gradient(120deg, #ffffff 0%, #ffe9d6 45%, var(--color-accent-warm) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.1875rem;
    color: rgba(255, 255, 255, 0.82);
    max-width: 560px;
    margin: 0 auto;
}

.hero-scroll-cue {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-top: var(--spacing-lg);
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.hero-scroll-cue:hover {
    color: var(--color-accent-warm);
}

.hero-scroll-cue svg {
    width: 18px;
    height: 18px;
    animation: hero-bounce 2s ease-in-out infinite;
}

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

/* ---------------------------------------------------------------- */
/* Features                                                          */
/* ---------------------------------------------------------------- */
.features {
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--color-border);
    background: rgba(18, 18, 26, 0.5);
}

.section-eyebrow {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    text-align: center;
}

.section-heading {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--spacing-lg);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.section-note {
    max-width: 34rem;
    margin: var(--spacing-lg) auto 0;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* 2x2 on mid widths so the four cards never wrap 3+1 with an orphan */
@media (max-width: 1080px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature {
    padding: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.feature:hover {
    border-color: rgba(255, 122, 69, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px -20px rgba(255, 122, 69, 0.35);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: var(--spacing-sm);
    border-radius: 12px;
    background: rgba(255, 122, 69, 0.12);
    color: var(--color-accent-warm);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.feature p {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ---------------------------------------------------------------- */
/* Moments - second full-bleed video band                            */
/* ---------------------------------------------------------------- */
.moments {
    position: relative;
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--spacing-xl) 0;
}

.moments-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(165deg, #1a100a 0%, var(--color-bg) 60%, var(--color-bg) 100%);
}

.moments-scrim {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(255, 122, 69, 0.08), transparent 65%),
        linear-gradient(180deg, rgba(10, 10, 15, 0.78) 0%, rgba(10, 10, 15, 0.88) 100%);
}

.moments-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.moments blockquote p {
    font-size: clamp(1.375rem, 3.2vw, 2.125rem);
    font-weight: 300;
    font-style: italic;
    color: #ffffff;
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.55;
}

/* ---------------------------------------------------------------- */
/* Details                                                            */
/* ---------------------------------------------------------------- */
.details {
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--color-border);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.detail h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
}

.detail ul {
    list-style: none;
}

.detail li {
    padding: var(--spacing-xs) 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.detail li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
}

.detail a {
    color: var(--color-accent);
}

/* Footer */
footer {
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

footer p {
    font-size: 0.875rem;
    color: var(--color-text-subtle);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xs);
    font-size: 0.875rem;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--color-text);
}

/* ---------------------------------------------------------------- */
/* Scroll-reveal (progressive enhancement - only active once JS adds  */
/* the .js class to <html>; without JS everything is simply visible) */
/* ---------------------------------------------------------------- */
.reveal {
    opacity: 1;
    transform: none;
}

.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

.js .feature-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.js .feature-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.js .feature-grid .reveal:nth-child(4) { transition-delay: 0.24s; }

/* Responsive - mobile first adjustments */
@media (max-width: 780px) {
    .hero {
        min-height: 80vh;
        padding: calc(var(--spacing-xl) + 1rem) 0 var(--spacing-lg);
    }

    .moments {
        min-height: 40vh;
    }
}

@media (max-width: 600px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .hero h2 {
        font-weight: 600;
    }

    .hero-description {
        font-size: 1.0625rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        gap: var(--spacing-md);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    #network-bg {
        display: none;
    }

    .hero-video,
    .moments-video {
        display: none;
    }

    .hero-scroll-cue svg {
        animation: none;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------------------------------------------------------------- */
/* Legal pages (privacy, terms)                                      */
/* ---------------------------------------------------------------- */
.draft-banner {
    background: #3a2a12;
    border: 1px solid #7a5a22;
    border-radius: 4px;
    padding: var(--spacing-sm);
    margin: var(--spacing-md) 0;
    font-size: 0.9375rem;
}

.draft-banner strong {
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.legal {
    padding: var(--spacing-md) 0 var(--spacing-lg);
}

.legal h2 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
}

.legal h3 {
    font-size: 1.0625rem;
    font-weight: 500;
    margin: var(--spacing-md) 0 var(--spacing-xs);
}

.legal p,
.legal li {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-xs);
}

.legal ul {
    list-style: disc;
    padding-left: 1.25rem;
}

.legal a {
    color: var(--color-accent);
}

.legal .updated {
    color: var(--color-text-subtle);
    font-size: 0.875rem;
}

.legal table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-sm) 0;
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

.legal th,
.legal td {
    border: 1px solid var(--color-border);
    padding: var(--spacing-xs);
    text-align: left;
    vertical-align: top;
}
