/* ============================================================
   Lull landing page — self-contained, mobile-first
   Palette: light premium with night-mode brand accent
   ============================================================ */

:root {
    --ink: #0E1330;
    --ink-soft: #4B5165;
    --ink-muted: #8A8FA3;
    --paper: #FAFAFA;
    --paper-soft: #FFFFFF;
    --line: #ECECEF;

    /* Brand: lifted from the Lull app icon */
    --night: #0A0E27;
    --night-deep: #060926;
    --night-lift: #1A2050;
    --moon: #B45309;          /* deep amber — readable accent on light bg (WCAG AA) */
    --moon-warm: #F5C147;     /* original yellow — used in dark mode + the logo itself */
    --wave: #5BA9F5;          /* blue from the waves */

    --radius-card: 32px;
    --radius-phone: 38px;
    --radius-pill: 999px;

    --shadow-card: 0 30px 80px -20px rgba(10, 14, 39, 0.35),
                   0 12px 32px -8px rgba(10, 14, 39, 0.18);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100dvh;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

/* ---------- Page shell ---------- */
.page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: max(env(safe-area-inset-top, 0px), 20px) 20px
             max(env(safe-area-inset-bottom, 0px), 24px) 20px;
}

/* ---------- Brand header ---------- */
.brand {
    display: flex;
    align-items: center;
    margin-bottom: 36px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    margin-left: -6px;
    border-radius: var(--radius-pill);
    transition: background 0.2s var(--ease);
}

.brand-link:hover { background: rgba(10, 14, 39, 0.04); }

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(10, 14, 39, 0.15);
}

.brand-word {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}

/* ---------- Hero (mobile: stacked + centered, flows naturally) ---------- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
    max-width: 640px;
}

/* ---------- Headline ---------- */
.headline {
    margin: 0;
    font-weight: 700;
    font-size: clamp(2rem, 8.5vw, 3.25rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--ink);
    text-wrap: balance;
}

.headline-line {
    display: block;
}

.headline-accent {
    color: var(--moon);
    font-weight: 800;
}

/* ---------- Subtitle ---------- */
.subtitle {
    margin: 0;
    font-size: clamp(1.0625rem, 4vw, 1.25rem);
    line-height: 1.45;
    color: var(--ink-soft);
    font-weight: 400;
    max-width: 32ch;
    text-wrap: pretty;
}

.subtitle-accent {
    color: var(--moon);
    font-weight: 500;
}

/* ---------- CTA badges ---------- */
.cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;   /* center on mobile to match the video below */
    gap: 10px;
    margin-top: 8px;
}

.badge-link {
    display: inline-block;
    border-radius: 12px;
    transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.badge-link:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.badge-link:active { transform: translateY(0); }

.badge-link img {
    height: 52px;
    width: auto;
    display: block;
}

/* ---------- Hero visual (phone video card) ---------- */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.phone-card {
    width: 100%;
    max-width: 320px;
    position: relative;
}

.phone-frame {
    position: relative;
    aspect-ratio: 1086 / 2408;
    border-radius: var(--radius-phone);
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 60px -20px rgba(10, 14, 39, 0.35),
                0 12px 24px -8px rgba(10, 14, 39, 0.18);
}

.phone-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- Footer ---------- */
.footer {
    margin-top: auto;
    padding-top: 48px;
    text-align: center;
    color: var(--ink-muted);
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2px;
    margin-bottom: 6px;
}

.footer-links a {
    padding: 6px 10px;
    border-radius: 6px;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.footer-links a:hover {
    color: var(--ink);
    background: rgba(10, 14, 39, 0.04);
}

.dot {
    color: var(--ink-muted);
    opacity: 0.5;
}

.copyright {
    margin: 0;
    font-size: 13px;
    opacity: 0.7;
}

/* ============================================================
   Small tablet (≥ 640px) — small spacing bumps only, still centered
   ============================================================ */
@media (min-width: 640px) {
    .page {
        padding: 32px 40px;
    }

    .hero {
        gap: 48px;
    }

    .subtitle {
        max-width: 38ch;
    }

    .phone-card {
        max-width: 340px;
    }

    .badge-link img {
        height: 56px;
    }
}

/* ============================================================
   Desktop (≥ 900px) — side-by-side hero, prayerlock-style.
   Threshold chosen so common laptop widths (1280, 1366, 1440)
   and split-screen browsers (≥900) get the desktop layout.
   ============================================================ */
@media (min-width: 900px) {
    .page {
        padding: 40px clamp(40px, 6vw, 80px);
    }

    .brand {
        margin-bottom: 0;
    }

    .hero {
        flex: 1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: clamp(48px, 6vw, 96px);
        text-align: left;
        min-height: calc(100dvh - 200px);
    }

    .hero-copy {
        flex: 1 1 0;
        align-items: flex-start;
        text-align: left;
        max-width: 640px;
        min-width: 0;
    }

    .cta {
        justify-content: flex-start;
    }

    .hero-visual {
        flex: 0 0 360px;
        width: 360px;
    }

    .phone-card {
        width: 100%;
        max-width: none;
    }

    .headline {
        font-size: clamp(3rem, 5vw, 4.5rem);
        text-wrap: pretty;
    }

    .subtitle {
        font-size: clamp(1.125rem, 1.4vw, 1.375rem);
        max-width: 34ch;
    }

    .badge-link img {
        height: 58px;
    }

    .footer {
        margin-top: 32px;
        padding-top: 24px;
    }
}

/* ============================================================
   Wide desktop (≥ 1280px)
   ============================================================ */
@media (min-width: 1024px) {
    .hero-visual {
        flex: 0 0 380px;
        width: 380px;
    }

    .headline {
        font-size: clamp(3.25rem, 5vw, 4.75rem);
    }
}

@media (min-width: 1280px) {
    .hero-visual {
        flex: 0 0 400px;
        width: 400px;
    }

    .headline {
        font-size: clamp(3.5rem, 5vw, 5rem);
    }
}

/* ============================================================
   Ultra-wide (≥ 1600px)
   ============================================================ */
@media (min-width: 1600px) {
    .hero-visual {
        flex: 0 0 440px;
        width: 440px;
    }

    .headline {
        font-size: 5.5rem;
    }
}

/* ============================================================
   Reduced motion: swap video for static poster
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .phone-video { display: none; }
    .phone-frame {
        background: url('assets/poster.jpg') center / cover no-repeat #000;
    }
}

/* ============================================================
   Dark mode — keep the warm moon yellow accent that the
   brand is built around; it sings against the navy background.
   ============================================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --ink: #FAFAFA;
        --ink-soft: #B8BCD0;
        --ink-muted: #6B7088;
        --paper: #0A0E27;
        --paper-soft: #0E1234;
        --line: rgba(255, 255, 255, 0.08);
        --moon: var(--moon-warm);    /* flip back to #F5C147 in dark mode */
    }

    body {
        background:
            radial-gradient(ellipse at top left, rgba(245, 193, 71, 0.06) 0%, transparent 50%),
            radial-gradient(ellipse at bottom right, rgba(91, 169, 245, 0.05) 0%, transparent 50%),
            var(--paper);
    }

    .brand-link:hover { background: rgba(255, 255, 255, 0.05); }
    .footer-links a:hover {
        color: var(--ink);
        background: rgba(255, 255, 255, 0.05);
    }

    .phone-frame {
        box-shadow:
            0 30px 60px -20px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(255, 255, 255, 0.06);
    }
}

/* ============================================================
   Tiny phones (≤ 360px)
   ============================================================ */
@media (max-width: 360px) {
    .page { padding: 16px; }
    .headline { font-size: 2rem; }
    .badge-link img { height: 46px; }
}
