/* ===========================================================================
   DreamLab — Landing page styles
   Pure CSS, no dependencies. Recreates the app's animated dreamscape
   background (nebula drift, smoke blobs, twinkling stars, shooting star)
   from DreamscapeBackgroundView.swift.
   =========================================================================== */

/* ---- Design tokens (palette extracted from the app) --------------------- */
:root {
    --bg-base:        #050d0a; /* deep forest-teal, nearly black */
    --nebula-indigo:  #141f2e;
    --nebula-emerald: #082420;
    --nebula-teal:    #0a2e33;
    --nebula-olive:   #14180f;

    --star:           #ffffff;

    --text-primary:   #f2f5f3;
    --text-secondary: #9fb0a8;
    --text-tertiary:  #6c7d75;

    /* Moonlit teal / violet accents (asset-catalog accents not readable from
       source — these are the agreed defaults and can be swapped later). */
    --accent-primary:   #5fd6c4; /* moonlit teal */
    --accent-secondary: #9d8bff; /* soft violet */
    --neural-glow:      #6fe0d0;

    --surface:        rgba(18, 31, 28, 0.55);
    --surface-border: rgba(159, 176, 168, 0.16);

    --maxw: 1160px;
    --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system,
            "Segoe UI", Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text-primary);
    background-color: var(--bg-base);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ===========================================================================
   Animated dreamscape background
   =========================================================================== */
.dreamscape {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(
            120% 120% at 50% 0%,
            #07140f 0%,
            var(--bg-base) 60%,
            #030806 100%
        );
}

/* ---- Layer 1: drifting nebula (radial gradients) ------------------------ */
.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.85;
    will-change: transform;
}

.nebula-1 {
    width: 70vw;
    height: 70vw;
    top: -10%;
    left: -5%;
    background: radial-gradient(circle at center, var(--nebula-indigo), transparent 70%);
    animation: drift-1 18s ease-in-out infinite alternate;
}

.nebula-2 {
    width: 60vw;
    height: 60vw;
    top: 20%;
    right: -10%;
    background: radial-gradient(circle at center, var(--nebula-emerald), transparent 70%);
    opacity: 0.7;
    animation: drift-2 22s ease-in-out infinite alternate;
}

.nebula-3 {
    width: 65vw;
    height: 65vw;
    bottom: -20%;
    left: 25%;
    background: radial-gradient(circle at center, var(--nebula-teal), transparent 70%);
    opacity: 0.6;
    animation: drift-3 16s ease-in-out infinite alternate;
}

@keyframes drift-1 {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(6%, 5%, 0) scale(1.08); }
}
@keyframes drift-2 {
    from { transform: translate3d(0, 0, 0) scale(1.05); }
    to   { transform: translate3d(-7%, 4%, 0) scale(1); }
}
@keyframes drift-3 {
    from { transform: translate3d(0, 3%, 0) scale(1); }
    to   { transform: translate3d(5%, -4%, 0) scale(1.1); }
}

/* ---- Layer 2: soft smoke blobs ----------------------------------------- */
.smoke {
    position: absolute;
    border-radius: 46% 54% 60% 40% / 48% 42% 58% 52%;
    filter: blur(50px);
    will-change: transform;
}

.smoke-1 {
    width: 42vw;
    height: 42vw;
    top: 12%;
    left: 18%;
    background: rgba(13, 38, 31, 0.5);
    animation: blob-1 12s ease-in-out infinite alternate;
}

.smoke-2 {
    width: 36vw;
    height: 36vw;
    bottom: 8%;
    right: 14%;
    background: rgba(8, 31, 26, 0.45);
    animation: blob-2 16s ease-in-out infinite alternate;
}

@keyframes blob-1 {
    from { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
    to   { transform: translate3d(5%, 4%, 0) rotate(8deg) scale(1.12); }
}
@keyframes blob-2 {
    from { transform: translate3d(0, 0, 0) rotate(0deg) scale(1.08); }
    to   { transform: translate3d(-5%, -5%, 0) rotate(-6deg) scale(1); }
}

/* ---- Layer 3: twinkling stars (box-shadow dot field) ------------------- */
.stars,
.stars-bright {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: transparent;
}

/* Small dim stars — pulse gently. */
.stars {
    box-shadow:
        40px 60px var(--star), 130px 220px var(--star), 220px 90px var(--star),
        310px 300px var(--star), 90px 380px var(--star), 470px 140px var(--star),
        560px 320px var(--star), 640px 60px var(--star), 720px 260px var(--star),
        810px 410px var(--star), 880px 120px var(--star), 980px 350px var(--star),
        1080px 200px var(--star), 1180px 90px var(--star), 1260px 330px var(--star),
        1360px 180px var(--star), 1460px 420px var(--star), 1540px 70px var(--star),
        1640px 280px var(--star), 1740px 150px var(--star), 180px 520px var(--star),
        420px 600px var(--star), 700px 560px var(--star), 980px 620px var(--star),
        1240px 540px var(--star), 1520px 640px var(--star), 60px 720px var(--star),
        360px 780px var(--star), 660px 820px var(--star), 960px 760px var(--star),
        1300px 800px var(--star), 1600px 720px var(--star), 250px 880px var(--star),
        540px 940px var(--star), 840px 900px var(--star), 1140px 960px var(--star),
        1440px 880px var(--star);
    opacity: 0.5;
    animation: twinkle 4s ease-in-out infinite;
}

/* Fewer, larger stars with a glow — pulse on a different beat. */
.stars-bright {
    width: 3px;
    height: 3px;
    box-shadow:
        150px 140px var(--star), 520px 240px var(--star), 760px 120px var(--star),
        1020px 300px var(--star), 1340px 100px var(--star), 1620px 220px var(--star),
        320px 460px var(--star), 880px 500px var(--star), 1200px 440px var(--star),
        500px 700px var(--star), 1080px 680px var(--star), 1500px 560px var(--star);
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
    opacity: 0.85;
    animation: twinkle-bright 6s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.25; }
    50%      { opacity: 0.6; }
}
@keyframes twinkle-bright {
    0%, 100% { opacity: 0.5; }
    40%      { opacity: 1; }
    70%      { opacity: 0.7; }
}

/* ---- Layer 4: occasional shooting star --------------------------------- */
.shooting-star {
    position: absolute;
    top: 12%;
    left: 8%;
    width: 140px;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9));
    border-radius: 2px;
    opacity: 0;
    transform: rotate(28deg);
    transform-origin: left center;
    animation: shoot 18s ease-in infinite;
}

.shooting-star::after {
    content: "";
    position: absolute;
    right: -2px;
    top: -1.25px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.9);
}

@keyframes shoot {
    0%   { transform: translate3d(0, 0, 0) rotate(28deg); opacity: 0; }
    2%   { opacity: 1; }
    7%   { transform: translate3d(520px, 280px, 0) rotate(28deg); opacity: 0; }
    100% { transform: translate3d(520px, 280px, 0) rotate(28deg); opacity: 0; }
}

/* ---- Subtle vignette for depth ----------------------------------------- */
.vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        130% 100% at 50% 40%,
        transparent 55%,
        rgba(0, 0, 0, 0.55) 100%
    );
    pointer-events: none;
}

/* ===========================================================================
   Navigation
   =========================================================================== */
.nav-wrap {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: linear-gradient(180deg, rgba(5, 13, 10, 0.7), rgba(5, 13, 10, 0));
    border-bottom: 1px solid rgba(159, 176, 168, 0.08);
}

.nav {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    box-shadow: 0 0 18px rgba(111, 224, 208, 0.25);
}

.brand-name {
    font-size: 1.2rem;
    letter-spacing: 0.2px;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 0.98rem;
    color: var(--text-secondary);
}

.nav-links a {
    transition: color 0.2s ease;
}

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

.nav-cta {
    padding: 9px 18px;
    border-radius: 999px;
    color: var(--bg-base) !important;
    font-weight: 700;
    background: linear-gradient(120deg, var(--accent-primary), var(--neural-glow));
    box-shadow: 0 6px 20px rgba(95, 214, 196, 0.25);
}

.nav-cta:hover {
    color: var(--bg-base) !important;
    filter: brightness(1.06);
}

/* ===========================================================================
   Hero
   =========================================================================== */
.hero {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(48px, 9vw, 120px) 24px clamp(60px, 8vw, 110px);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: clamp(32px, 6vw, 80px);
}

.eyebrow {
    display: inline-block;
    margin: 0 0 18px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--accent-primary);
    background: rgba(95, 214, 196, 0.08);
    border: 1px solid rgba(95, 214, 196, 0.22);
}

.hero h1 {
    margin: 0 0 22px;
    font-size: clamp(2.4rem, 5.4vw, 4rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.accent-text {
    background: linear-gradient(120deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lede {
    margin: 0 0 32px;
    max-width: 33em;
    font-size: clamp(1.04rem, 1.6vw, 1.22rem);
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.18s ease, filter 0.18s ease, background 0.18s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    flex-direction: column;
    align-items: flex-start;
    padding: 11px 24px;
    color: var(--bg-base);
    background: linear-gradient(120deg, var(--accent-primary), var(--neural-glow));
    box-shadow: 0 10px 30px rgba(95, 214, 196, 0.28);
}

.btn-primary:hover {
    filter: brightness(1.06);
}

.btn-kicker {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    opacity: 0.85;
    line-height: 1;
}

.btn-store {
    font-size: 1.18rem;
    line-height: 1.2;
}

.btn-ghost {
    padding: 14px 22px;
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
    background: var(--surface);
}

.btn-ghost:hover {
    border-color: rgba(159, 176, 168, 0.4);
}

.trust-row {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    font-size: 0.92rem;
    color: var(--text-tertiary);
}

.trust-row li {
    position: relative;
    padding-left: 20px;
}

.trust-row li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 8px rgba(95, 214, 196, 0.7);
}

/* ---- Hero phone mockup -------------------------------------------------- */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(111, 224, 208, 0.3), transparent 70%);
    filter: blur(40px);
    z-index: 0;
}

.phone {
    position: relative;
    z-index: 1;
    width: clamp(248px, 27vw, 300px);
    aspect-ratio: 9 / 19;
    padding: 12px;
    border-radius: 44px;
    background: linear-gradient(160deg, #1b2622, #070f0c);
    border: 1px solid rgba(159, 176, 168, 0.18);
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.55),
        inset 0 0 0 2px rgba(0, 0, 0, 0.6);
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-1.5deg); }
    50%      { transform: translateY(-14px) rotate(-1.5deg); }
}

.phone-notch {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 42%;
    height: 22px;
    border-radius: 0 0 14px 14px;
    background: #05090a;
    z-index: 3;
}

.phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 34px;
    overflow: hidden;
    background: var(--bg-base);
}

.screen-bg {
    position: absolute;
    inset: 0;
}

.screen-nebula {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(40% 40% at 30% 25%, rgba(20, 31, 46, 0.9), transparent 70%),
        radial-gradient(45% 45% at 75% 60%, rgba(10, 46, 51, 0.8), transparent 70%),
        radial-gradient(40% 40% at 50% 95%, rgba(8, 36, 32, 0.8), transparent 70%);
    filter: blur(8px);
    animation: drift-3 16s ease-in-out infinite alternate;
}

.screen-stars {
    position: absolute;
    top: 14px;
    left: 18px;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    box-shadow:
        20px 30px #fff, 60px 80px #fff, 120px 50px #fff, 160px 120px #fff,
        40px 150px #fff, 180px 200px #fff, 90px 230px #fff, 200px 280px #fff,
        30px 300px #fff, 150px 340px #fff;
    opacity: 0.55;
    animation: twinkle 4s ease-in-out infinite;
}

.screen-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 52px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.screen-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    box-shadow: 0 0 22px rgba(111, 224, 208, 0.3);
}

.screen-title {
    margin: 4px 0 0;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--accent-primary);
    font-weight: 700;
}

.screen-dream {
    margin: 0;
    font-size: 0.86rem;
    color: var(--text-primary);
}

.screen-chip {
    align-self: flex-start;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--bg-base);
    background: linear-gradient(120deg, var(--accent-primary), var(--neural-glow));
}

.screen-bubble {
    margin-top: auto;
    padding: 12px 14px;
    border-radius: 16px 16px 16px 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(157, 139, 255, 0.12);
    border: 1px solid rgba(157, 139, 255, 0.25);
}

/* ===========================================================================
   Shared section scaffolding
   =========================================================================== */
.section {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(56px, 9vw, 104px) 24px;
}

.section-head {
    max-width: 40rem;
    margin: 0 auto clamp(36px, 5vw, 56px);
    text-align: center;
}

.section h2 {
    margin: 0 0 16px;
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
    line-height: 1.14;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.section-sub {
    margin: 0;
    font-size: clamp(1rem, 1.5vw, 1.14rem);
    color: var(--text-secondary);
}

.card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 22px;
    backdrop-filter: blur(10px);
}

/* ---- Three pillars ------------------------------------------------------ */
.pillar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.pillar {
    padding: 30px 26px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.pillar:hover {
    transform: translateY(-4px);
    border-color: rgba(95, 214, 196, 0.35);
}

.pillar-glyph {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 12px rgba(111, 224, 208, 0.4));
}

.pillar h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
    font-weight: 700;
}

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

/* ---- Visual feature rows ------------------------------------------------ */
.feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(32px, 6vw, 72px);
}

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

.feature h2 {
    text-align: left;
}

.style-chips,
.motif-cloud {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.style-chips li,
.motif-cloud li {
    padding: 8px 15px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(157, 139, 255, 0.1);
    border: 1px solid rgba(157, 139, 255, 0.24);
}

.style-chips li {
    background: rgba(95, 214, 196, 0.1);
    border-color: rgba(95, 214, 196, 0.26);
}

/* Dream-image preview grid (pure CSS gradient art) */
.art-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.art-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--surface-border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.art-tile span {
    position: absolute;
    left: 12px;
    bottom: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.art-claymation {
    background:
        radial-gradient(60% 60% at 30% 25%, #3a3550, transparent 70%),
        linear-gradient(150deg, #2a2438, #0d0b14);
}
.art-watercolor {
    background:
        radial-gradient(55% 55% at 70% 30%, rgba(95, 214, 196, 0.7), transparent 70%),
        linear-gradient(150deg, #2c5e63, #0c2d31);
}
.art-noir {
    background:
        linear-gradient(120deg, #e8e8e8 0%, #888 35%, #1a1a1a 70%, #000 100%);
}
.art-surreal {
    background:
        radial-gradient(50% 50% at 35% 65%, rgba(157, 139, 255, 0.8), transparent 70%),
        linear-gradient(150deg, #d98a3d, #3a2a6a);
}

/* Motif constellation */
.constellation {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background:
        radial-gradient(70% 70% at 50% 40%, rgba(20, 31, 46, 0.6), transparent 70%),
        var(--surface);
}

.node {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 14px 3px rgba(95, 214, 196, 0.6);
    animation: pulse 4s ease-in-out infinite;
}

.node-a { top: 24%; left: 22%; }
.node-b { top: 56%; left: 36%; animation-delay: 0.6s; background: var(--accent-secondary); box-shadow: 0 0 14px 3px rgba(157, 139, 255, 0.6); }
.node-c { top: 32%; left: 64%; animation-delay: 1.2s; }
.node-d { top: 68%; left: 72%; animation-delay: 1.8s; background: var(--accent-secondary); box-shadow: 0 0 14px 3px rgba(157, 139, 255, 0.6); }
.node-e { top: 46%; left: 50%; animation-delay: 2.4s; }

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50%      { transform: scale(1.4); opacity: 1; }
}

.constellation-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    text-align: center;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ---- Privacy ------------------------------------------------------------ */
.privacy-card {
    padding: clamp(32px, 5vw, 56px);
    text-align: center;
}

.privacy-card .section-sub {
    max-width: 36rem;
    margin: 0 auto;
}

.privacy-list {
    list-style: none;
    margin: 32px auto 0;
    padding: 0;
    max-width: 44rem;
    display: grid;
    gap: 16px;
    text-align: left;
}

.privacy-list li {
    padding: 18px 20px 18px 52px;
    position: relative;
    border-radius: 16px;
    background: rgba(5, 13, 10, 0.4);
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
}

.privacy-list li::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 20px;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: linear-gradient(120deg, var(--accent-primary), var(--neural-glow));
    box-shadow: 0 0 12px rgba(95, 214, 196, 0.6);
}

.privacy-list strong {
    color: var(--text-primary);
}

/* ---- CTA ---------------------------------------------------------------- */
.cta {
    text-align: center;
}

.cta-inner {
    max-width: 36rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-icon {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    margin-bottom: 22px;
    box-shadow: 0 0 30px rgba(111, 224, 208, 0.35);
}

.cta-btn {
    margin-top: 28px;
    align-items: center;
}

.cta-btn .btn-kicker {
    align-self: center;
}

/* ---- Footer ------------------------------------------------------------- */
.footer {
    border-top: 1px solid rgba(159, 176, 168, 0.1);
    background: rgba(3, 8, 6, 0.6);
    backdrop-filter: blur(10px);
}

.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 36px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.footer .brand-icon {
    width: 32px;
    height: 32px;
}

.footer-tag {
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-legal {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* ===========================================================================
   Responsive
   =========================================================================== */
@media (max-width: 860px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 56px;
    }
    .lede {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-actions,
    .trust-row {
        justify-content: center;
    }
    .hero-visual {
        order: -1;
        margin-bottom: 12px;
    }
    .nav-links {
        gap: 18px;
    }
    .pillar-grid {
        grid-template-columns: 1fr;
    }
    .feature {
        grid-template-columns: 1fr;
    }
    .feature-text {
        text-align: center;
    }
    .feature h2 {
        text-align: center;
    }
    .feature-reverse .feature-text {
        order: 0;
    }
    .style-chips,
    .motif-cloud {
        justify-content: center;
    }
}

@media (max-width: 540px) {
    .nav-links li:not(:last-child) {
        display: none;
    }
}

/* ===========================================================================
   Reduced motion — honor user preference
   =========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .nebula,
    .smoke,
    .stars,
    .stars-bright,
    .shooting-star,
    .phone,
    .screen-nebula,
    .screen-stars,
    .node {
        animation: none !important;
    }
    .shooting-star {
        display: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ===========================================================================
   Legal / prose pages (e.g. privacy policy)
   Reuses the shared dreamscape background, nav, and footer. Only the
   long-form typography lives here so both pages stay visually identical.
   =========================================================================== */
.legal {
    max-width: 820px;
    margin: 0 auto;
    padding: clamp(40px, 7vw, 80px) 24px clamp(56px, 8vw, 96px);
}

.legal-head {
    margin-bottom: clamp(28px, 4vw, 44px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 22px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent-primary);
}

.legal h1 {
    margin: 0 0 8px;
    font-size: clamp(2rem, 4.4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.4px;
}

.legal .last-updated {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 0.92rem;
}

/* The policy body sits in a soft surface card for readability over the stars. */
.legal-body {
    padding: clamp(24px, 4vw, 44px);
}

.legal-body > p {
    color: var(--text-secondary);
}

.legal-body h2 {
    margin: 2.4rem 0 0.8rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    line-height: 1.25;
}

.legal-body h2:first-of-type {
    margin-top: 0;
}

.legal-body h3 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.legal-body p,
.legal-body li {
    margin-bottom: 0.7rem;
    color: var(--text-secondary);
}

.legal-body strong {
    color: var(--text-primary);
    font-weight: 700;
}

.legal-body ul {
    margin: 0 0 1rem;
    padding-left: 1.3rem;
}

.legal-body li::marker {
    color: var(--accent-primary);
}

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

.legal-body a:hover {
    text-decoration: underline;
}

/* Third-party services table */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2rem 0;
    font-size: 0.9rem;
    overflow: hidden;
    border-radius: 14px;
}

.legal-table th,
.legal-table td {
    text-align: left;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--surface-border);
    vertical-align: top;
}

.legal-table th {
    background: rgba(95, 214, 196, 0.1);
    color: var(--text-primary);
    font-weight: 700;
}

.legal-table td {
    color: var(--text-secondary);
}

.legal-table tr:nth-child(even) td {
    background: rgba(5, 13, 10, 0.35);
}

/* Footer link row (shared) */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin: 4px 0 2px;
    font-size: 0.92rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

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

@media (max-width: 640px) {
    .legal-table,
    .legal-table thead,
    .legal-table tbody,
    .legal-table th,
    .legal-table td,
    .legal-table tr {
        display: block;
    }
    .legal-table thead {
        display: none;
    }
    .legal-table tr {
        margin-bottom: 14px;
        border-radius: 12px;
        overflow: hidden;
    }
    .legal-table td {
        border: 1px solid var(--surface-border);
        border-bottom: none;
    }
    .legal-table tr td:last-child {
        border-bottom: 1px solid var(--surface-border);
    }
    .legal-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 700;
        color: var(--accent-primary);
        margin-bottom: 2px;
    }
}
