/* ============================================================
   VibeEchoes — Landing Page
   Light theme. S-curve. Serif. Request Access.
   Warm off-white palette with purple accents.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

/* ---- Reset ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    /* Brand tokens — pulled from Theme.swift */
    --accent-h: 252;
    --accent-s: 82%;
    --accent-l: 56%;
    --accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
    --accent-dim: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.35);
    --accent-glow: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.10);
    --gradient-end: hsl(293, 48%, 55%);
    /* warm purple from accentGradientEnd */

    --surface: #faf9f7;
    --text-primary: rgba(28, 25, 23, 0.92);
    --text-secondary: rgba(82, 78, 74, 0.8);
    --text-tertiary: rgba(140, 135, 130, 0.7);
    --border-subtle: rgba(81, 30, 110, 0.12);
}

html,
body {
    min-height: 100vh;
    width: 100%;
    background: var(--surface);
    color: var(--text-primary);
    font-family: 'Cormorant Garamond', 'New York', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ---- Stage ---- */
.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    position: relative;
    padding: 24px;
}

/* ---- Ambient glow ---- */
.ambient-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle,
            hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.08) 0%,
            hsla(293, 48%, 55%, 0.04) 40%,
            transparent 70%);
    pointer-events: none;
    animation: ambient-breathe 6s ease-in-out infinite;
    z-index: 0;
    /* Centered behind the symbol */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -65%);
}

@keyframes ambient-breathe {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -65%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -65%) scale(1.15);
    }
}

/* ---- Brand name ---- */
.brand-name {
    position: relative;
    z-index: 1;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: clamp(2.4rem, 5.6vw, 3.3rem);
    letter-spacing: 0.15em;
    color: var(--text-primary);
    margin-bottom: 28px;
}

/* ---- S-curve symbol ---- */
.symbol-container {
    position: relative;
    z-index: 1;
    width: clamp(120px, 30vw, 156px);
    height: clamp(120px, 30vw, 156px);
    margin-bottom: 40px;
}

.s-curve-svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

/* Staggered resonance pulse — alternates direction each cycle */
/* Forward: dot-start → curve → dot-end, then reverse: dot-end → curve → dot-start */
.dot-start {
    opacity: 0.25;
    animation: pulse-start 10s ease-in-out infinite;
}

.curve-path {
    opacity: 0.2;
    animation: pulse-curve 10s ease-in-out infinite;
}

.dot-end {
    opacity: 0.25;
    animation: pulse-end 10s ease-in-out infinite;
}

/* Forward pulse: start peaks first */
@keyframes pulse-start {
    0% {
        opacity: 0.25;
    }

    8% {
        opacity: 1;
    }

    20% {
        opacity: 0.9;
    }

    30% {
        opacity: 0.25;
    }

    /* Reverse pulse: start peaks last */
    50% {
        opacity: 0.25;
    }

    68% {
        opacity: 0.2;
    }

    78% {
        opacity: 1;
    }

    88% {
        opacity: 0.9;
    }

    95% {
        opacity: 0.25;
    }

    100% {
        opacity: 0.25;
    }
}

@keyframes pulse-curve {
    0% {
        opacity: 0.2;
    }

    5% {
        opacity: 0.2;
    }

    14% {
        opacity: 1;
    }

    26% {
        opacity: 0.85;
    }

    35% {
        opacity: 0.2;
    }

    /* Reverse pulse: curve peaks in middle */
    50% {
        opacity: 0.2;
    }

    62% {
        opacity: 0.2;
    }

    70% {
        opacity: 1;
    }

    82% {
        opacity: 0.85;
    }

    90% {
        opacity: 0.2;
    }

    100% {
        opacity: 0.2;
    }
}

/* Forward pulse: end peaks last */
@keyframes pulse-end {
    0% {
        opacity: 0.25;
    }

    12% {
        opacity: 0.2;
    }

    22% {
        opacity: 1;
    }

    32% {
        opacity: 0.9;
    }

    42% {
        opacity: 0.25;
    }

    /* Reverse pulse: end peaks first */
    50% {
        opacity: 0.25;
    }

    58% {
        opacity: 1;
    }

    70% {
        opacity: 0.9;
    }

    80% {
        opacity: 0.25;
    }

    100% {
        opacity: 0.25;
    }
}

/* ---- Tagline ---- */
.tagline {
    position: relative;
    z-index: 1;
    font-family: 'Cormorant Garamond', 'New York', 'Iowan Old Style', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    letter-spacing: 0.02em;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 48px;
    line-height: 1.4;
    font-style: italic;
}

/* ---- Access form ---- */
.access-form {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 360px;
}

.access-form input[type="email"] {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(81, 30, 110, 0.25);
    border-radius: 8px;
    padding: 14px 20px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    text-align: center;
    letter-spacing: 0.03em;
}

.access-form input[type="email"]::placeholder {
    color: var(--text-secondary);
    font-style: italic;
}

.access-form input[type="email"]:focus,
.access-form input[type="email"]:hover {
    border-color: var(--accent);
    box-shadow: 0 0 24px var(--accent-glow);
}

.access-form input[type="email"].error {
    border-color: rgba(240, 80, 90, 0.5);
    box-shadow: 0 0 0 3px rgba(240, 80, 90, 0.08);
}

.access-form button {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(81, 30, 110, 0.25);
    border-radius: 8px;
    padding: 14px 24px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.access-form button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0) 0%,
            hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.06) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.access-form button:hover {
    border-color: var(--accent);
    box-shadow: 0 0 24px var(--accent-glow);
}

.access-form button:hover::before {
    opacity: 1;
}

.access-form button:active {
    transform: scale(0.98);
}

.access-form button:disabled {
    opacity: 0.4;
    cursor: default;
    transform: none;
}

/* ---- Platform selector ---- */
.platform-selector {
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.platform-legend {
    display: block;
    width: 100%;
    text-align: center;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.platform-pills {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.platform-pill {
    position: relative;
    cursor: pointer;
}

.platform-pill input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.platform-pill .pill-label {
    display: block;
    padding: 10px 22px;
    border: 1px solid rgba(81, 30, 110, 0.25);
    border-radius: 24px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    transition: all 0.35s ease;
    user-select: none;
}

.platform-pill .pill-label:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 24px var(--accent-glow);
}

.platform-pill input[type="checkbox"]:checked+.pill-label {
    border-color: var(--accent);
    color: var(--text-primary);
    background: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.1);
    box-shadow: 0 0 20px var(--accent-glow), inset 0 0 12px hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.06);
}

.platform-selector.error .platform-pills .pill-label {
    border-color: rgba(240, 80, 90, 0.5);
    box-shadow: 0 0 0 3px rgba(240, 80, 90, 0.08);
}

/* ---- Messages ---- */
.form-error {
    position: relative;
    z-index: 1;
    color: rgba(240, 100, 110, 1);
    font-size: 1.2rem;
    margin-top: 12px;
    text-align: center;
}

.form-success {
    position: relative;
    z-index: 1;
    color: var(--text-primary);
    font-size: 1.3rem;
    letter-spacing: 0.04em;
    margin-top: 12px;
    text-align: center;
    animation: fade-in 0.8s ease;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none;
}

/* ---- Footer links ---- */
.footer-logo {
    width: 20px;
    height: 20px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    vertical-align: middle;
}

.footer-logo:hover {
    opacity: 0.8;
}

/* ---- Why Summary Section ---- */
.why-summary {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 240px 24px 160px;
    /* Huge top spacing to match hero section gap */
    text-align: center;
    position: relative;
    z-index: 2;
}

.why-card {
    background: #ffffff;
    border: 1px solid rgba(81, 30, 110, 0.12);
    border-radius: 16px;
    padding: 64px 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.why-card:hover {
    transform: translateY(-6px);
    border-color: rgba(81, 30, 110, 0.3);
    box-shadow: 0 16px 40px rgba(81, 30, 110, 0.08), 0 0 24px var(--accent-glow);
}

.why-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.why-card:hover::before {
    opacity: 1;
}

.why-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: 0.03em;
}

.why-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.inline-link {
    color: #511e6e;
    text-decoration: none;
    font-style: italic;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.inline-link:hover {
    color: var(--accent);
    text-decoration: underline;
    text-shadow: 0 0 12px var(--accent-dim);
}

.site-footer {
    width: 100%;
    padding: 40px 24px;
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(81, 30, 110, 0.08);
    background: var(--surface);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ---- How It Works Section ---- */
.how-it-works {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 24px 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 60px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background: #511e6e;
}

.steps-container {
    display: flex;
    gap: 24px;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
}

.step-card {
    flex: 1;
    min-width: 250px;
    max-width: 320px;
    background: #ffffff;
    border: 1px solid rgba(81, 30, 110, 0.12);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.step-card:hover {
    transform: translateY(-6px);
    border-color: rgba(81, 30, 110, 0.3);
    box-shadow: 0 16px 40px rgba(81, 30, 110, 0.08), 0 0 24px var(--accent-glow);
}

.step-card:hover::before {
    opacity: 1;
}

.step-number {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #511e6e;
    letter-spacing: 0.15em;
    margin-bottom: 24px;
}

.step-card h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: 0.05em;
}

.step-card p {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
}

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

.footer-links .dot {
    color: var(--text-secondary);
    font-size: 0.7rem;
    user-select: none;
}

/* ---- Privacy & Contact pages — inherit style override ---- */
/* These pages use style.css but have their own layout */

/* ---- Mobile adjustments ---- */
@media (max-width: 480px) {
    .symbol-container {
        width: clamp(100px, 28vw, 130px);
        height: clamp(100px, 28vw, 130px);
        margin-bottom: 28px;
    }

    .tagline {
        margin-bottom: 36px;
        padding: 0 8px;
    }

    .access-form {
        max-width: 300px;
    }

    .footer-links {
        bottom: 24px;
    }
}

/* Landscape phones */
@media (max-height: 500px) {
    .symbol-container {
        width: 48px;
        height: 48px;
        margin-bottom: 20px;
    }

    .tagline {
        margin-bottom: 24px;
        font-size: 1.3rem;
    }

    .ambient-glow {
        width: 200px;
        height: 200px;
    }
}