/* =========================================================
   Sleep Sounds — shared styles
   Color scheme derived from the app icon (night sky →
   indigo → violet, lavender + teal accents, moon white)
   ========================================================= */

:root {
    /* Core palette */
    --night-900: #0a1033;   /* deepest sky (top of icon) */
    --night-800: #141a52;
    --indigo-700: #2a2a7a;
    --violet-600: #4b327f;
    --violet-500: #6d4abd;  /* mid violet */
    --magenta-500: #7b3fa0; /* warm purple edge */

    --lavender: #b39ddb;    /* primary accent (play buttons) */
    --lavender-bright: #c4b5fd;
    --teal: #5eead4;        /* secondary accent */

    --text: #eef0ff;
    --text-muted: #a9aedd;
    --text-faint: #7f84bb;

    --card-bg: rgba(255, 255, 255, 0.04);
    --card-border: rgba(255, 255, 255, 0.09);

    --radius: 18px;
    --radius-sm: 12px;
    --maxw: 1120px;

    --shadow-glow: 0 0 60px rgba(109, 74, 189, 0.45);
    --shadow-card: 0 18px 50px rgba(5, 8, 30, 0.55);

    --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.65;
    background-color: var(--night-900);
    background-image:
        radial-gradient(1200px 800px at 75% -10%, rgba(123, 63, 160, 0.45), transparent 60%),
        radial-gradient(900px 700px at 10% 10%, rgba(42, 42, 122, 0.55), transparent 55%),
        linear-gradient(180deg, var(--night-900) 0%, var(--night-800) 35%, var(--violet-600) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle starfield overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1.5px 1.5px at 20% 30%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 70% 20%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 85% 60%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 55% 45%, rgba(255, 255, 255, 0.45), transparent),
        radial-gradient(1px 1px at 12% 80%, rgba(255, 255, 255, 0.5), transparent);
    background-repeat: no-repeat;
    opacity: 0.8;
}

main,
header,
footer {
    position: relative;
    z-index: 1;
}

a {
    color: var(--lavender-bright);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #fff;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: 24px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--lavender) 0%, var(--violet-500) 100%);
    color: #14122e;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    color: #14122e;
    transform: translateY(-2px);
    box-shadow: 0 0 80px rgba(123, 63, 160, 0.6);
}

.btn-accent {
    background: linear-gradient(135deg, #ffe066 0%, #ffb300 100%);
    color: #2a1d00;
    font-weight: 700;
    box-shadow: 0 0 34px rgba(255, 193, 7, 0.5);
}

.btn-accent:hover {
    color: #2a1d00;
    transform: translateY(-2px);
    box-shadow: 0 0 56px rgba(255, 193, 7, 0.7);
}

.btn-ghost {
    background: var(--card-bg);
    border-color: var(--card-border);
    color: var(--text);
}

.btn-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(10, 16, 51, 0.6);
    border-bottom: 1px solid var(--card-border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
}

.brand img {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

/* Compact header CTA */
.site-header .btn {
    padding: 9px 18px;
    font-size: 0.9rem;
}

/* ---------- Hero ---------- */
.hero {
    padding: 80px 0 60px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--lavender-bright);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 22px;
}

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}

.hero h1 .accent {
    background: linear-gradient(120deg, var(--lavender-bright), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lead {
    font-size: 1.18rem;
    color: var(--text-muted);
    max-width: 540px;
    margin-bottom: 32px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.hero-note {
    margin-top: 18px;
    font-size: 0.9rem;
    color: var(--text-faint);
}

.hero-art {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-art img {
    border-radius: 22px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--card-border);
}

.hero-art::after {
    content: "";
    position: absolute;
    inset: -10%;
    z-index: -1;
    background: radial-gradient(circle at center, rgba(123, 63, 160, 0.55), transparent 65%);
    filter: blur(20px);
}

/* ---------- Section headings ---------- */
.section {
    padding: 70px 0;
}

.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 56px;
}

.section-head .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 14px;
}

.section-head h2 {
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}

.section-head p {
    color: var(--text-muted);
    font-size: 1.08rem;
}

/* ---------- Feature rows (alternating) ---------- */
.feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    margin-bottom: 96px;
}

.feature:last-child {
    margin-bottom: 0;
}

.feature.reverse .feature-text {
    order: 2;
}

.feature.reverse .feature-media {
    order: 1;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(179, 157, 219, 0.25), rgba(94, 234, 212, 0.18));
    border: 1px solid var(--card-border);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.feature-text h3 {
    font-size: 1.7rem;
    font-weight: 750;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.feature-text p {
    color: var(--text-muted);
    font-size: 1.06rem;
    max-width: 460px;
}

.feature-media {
    display: flex;
    justify-content: center;
}

.feature-media img {
    width: 100%;
    max-width: 320px;
    border-radius: 26px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--card-border);
}

/* ---------- Download CTA band ---------- */
.cta-band {
    margin: 30px auto 90px;
    max-width: var(--maxw);
    text-align: center;
    padding: 60px 32px;
    border-radius: 28px;
    background:
        radial-gradient(700px 300px at 50% 0%, rgba(94, 234, 212, 0.18), transparent 70%),
        linear-gradient(135deg, rgba(123, 63, 160, 0.4), rgba(42, 42, 122, 0.4));
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-card);
}

.cta-band img.cta-icon {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    margin: 0 auto 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.cta-band h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 14px;
}

.cta-band p {
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 30px;
    font-size: 1.08rem;
}

/* Google Play badge (CSS-drawn) */
.play-badge {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 12px 26px;
    border-radius: 14px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.play-badge:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}

.play-badge .play-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.play-badge .play-text small {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #cfd2ff;
}

.play-badge .play-text strong {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.1;
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--card-border);
    background: rgba(10, 16, 51, 0.55);
    padding: 44px 0;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: #fff;
}

.footer-brand img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
}

.footer-links {
    display: flex;
    gap: 26px;
    list-style: none;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-weight: 500;
}

.footer-links a:hover {
    color: #fff;
}

.footer-copy {
    width: 100%;
    color: var(--text-faint);
    font-size: 0.85rem;
    border-top: 1px solid var(--card-border);
    padding-top: 20px;
    margin-top: 4px;
}

/* ---------- Simple content page (privacy / terms) ---------- */
.content-page {
    max-width: 760px;
    margin: 60px auto 90px;
    padding: 44px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.content-page h1 {
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.content-page .updated {
    color: var(--text-faint);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.content-page h2 {
    font-size: 1.3rem;
    margin: 30px 0 10px;
    color: #fff;
}

.content-page p {
    color: var(--text-muted);
    margin-bottom: 14px;
}

.content-page ul {
    margin: 0 0 16px 0;
    padding-left: 22px;
    color: var(--text-muted);
}

.content-page li {
    margin-bottom: 8px;
}

.content-page strong {
    color: var(--text);
}

.content-page .policy-highlight {
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.1), rgba(123, 63, 160, 0.14));
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin: 0 0 28px;
}

.content-page .policy-highlight p {
    margin-bottom: 0;
    color: var(--text);
}

.content-page .policy-note {
    font-size: 0.9rem;
    color: var(--text-faint);
    border-top: 1px solid var(--card-border);
    margin-top: 36px;
    padding-top: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero p.lead {
        margin-inline: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-art {
        order: -1;
    }

    .feature {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
        margin-bottom: 64px;
    }

    .feature.reverse .feature-text,
    .feature.reverse .feature-media {
        order: 0;
    }

    .feature-text p {
        margin-inline: auto;
    }

    .feature-icon {
        margin-inline: auto;
    }
}

@media (max-width: 620px) {
    .content-page {
        padding: 28px 22px;
    }
}
