/* ===================================
   RecoverAI — Dennis Snellenberg Aesthetic
   Light, editorial, oversized typography
   =================================== */

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

:root {
    /* Palette */
    --bg: #FFFFFF;
    --bg-hero: #FFFFFF;
    --bg-dark: #000000;
    --text: #000000;
    --text-light: #FFFFFF;
    --text-muted: #666666;
    --text-dim: #999999;
    --accent: #E62E2D; /* Vibrant Red */
    --border: #e0e0e0;
    --border-dark: #333333;
    --green: #2dd881;
    --green-bg: rgba(45, 216, 129, 0.08);
    --amber: #e8a030;
    --amber-bg: rgba(232, 160, 48, 0.08);
    --red: #e74c5e;
    --red-bg: rgba(231, 76, 94, 0.08);

    /* Type */
    --font-display: 'Inter', Helvetica, Arial, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    /* Motion */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --dur: 0.8s;
    --dur-long: 1.2s;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color-scheme: light only;
}

body {
    font-family: var(--font-body);
    background: transparent;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: default;
}

/* ---------- Global Canvas ---------- */
.bg-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background: var(--bg);
}

::selection {
    background: var(--text);
    color: var(--bg);
}

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

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

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
}

/* ---------- Custom Cursor ---------- */
.cursor {
    width: 12px;
    height: 12px;
    background: var(--text);
    border-radius: 50%;
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s var(--ease);
    opacity: 0;
    will-change: transform;
}
.cursor.visible { opacity: 1; }
.cursor.hovering { transform: scale(4); }

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(28, 29, 32, 0.3);
    border-radius: 50%;
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: difference;
    transition: transform 0.4s var(--ease-out), opacity 0.3s;
    opacity: 0;
    will-change: transform;
}
.cursor-follower.visible { opacity: 1; }
.cursor-follower.hovering {
    transform: scale(0.5);
    opacity: 0;
}

/* ---------- Navigation ---------- */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 28px 0;
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.header.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text); /* Black text on white hero bg */
    transition: color 0.4s;
}
.header.scrolled-past-hero .nav-logo { color: var(--text); }

.logo-accent {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--text); /* Black text on white hero bg */
    transition: color 0.4s, opacity 0.3s;
    opacity: 0.7;
}
.nav-link:hover { opacity: 1; }
.header.scrolled-past-hero .nav-link { color: var(--text); }

.nav-cta {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 12px 28px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 100px;
    color: var(--text); /* Black text */
    transition: background 0.4s var(--ease), color 0.4s, border-color 0.4s, transform 0.3s var(--ease);
}
.nav-cta:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}
.header.scrolled-past-hero .nav-cta {
    border-color: rgba(28, 29, 32, 0.2);
    color: var(--text);
}
.header.scrolled-past-hero .nav-cta:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

/* Sticky menu button */
.sticky-menu {
    position: fixed;
    top: 28px;
    right: clamp(24px, 5vw, 80px);
    z-index: 101;
    width: 56px;
    height: 56px;
    background: var(--bg-dark);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.6);
    pointer-events: none;
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.3s;
}
.sticky-menu.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
.sticky-menu:hover { background: var(--accent); }
.sticky-menu-inner { display: flex; flex-direction: column; gap: 5px; }
.sticky-menu-icon span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-light);
    border-radius: 2px;
    transition: transform 0.3s var(--ease);
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 clamp(24px, 5vw, 80px) clamp(40px, 6vw, 80px);
    position: relative;
    overflow: hidden;
    background: transparent;
}



.hero-bg {
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(4rem, 11vw, 10rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: var(--text);
    margin-bottom: clamp(32px, 5vw, 60px);
}

.hero-headline .line {
    display: block;
    overflow: hidden;
}

.hero-headline .line-inner {
    display: block;
    transform: translateY(115%);
    transition: transform 1.2s var(--ease);
}

.hero-headline.revealed .line-inner {
    transform: translateY(0);
}

.hero-headline .line:nth-child(2) .line-inner { transition-delay: 0.12s; }
.hero-headline .line:nth-child(3) .line-inner { transition-delay: 0.24s; }

.headline-dot { color: var(--accent); }

.hero-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 10px;
}

.hero-sub {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 380px;
}

/* Circular CTA — Dennis Snellenberg signature */
.hero-cta-round {
    width: clamp(110px, 12vw, 150px);
    height: clamp(110px, 12vw, 150px);
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.5s var(--ease), background 0.3s;
    position: relative;
}
.hero-cta-round:hover {
    transform: scale(1.1);
}
.cta-round-text {
    font-family: var(--font-display);
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    line-height: 1.4;
}
.cta-round-arrow {
    font-size: 1.2rem;
    animation: bounceDown 2s var(--ease) infinite;
}
@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* Scroll indicator */
.hero-scroll-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 80px;
    width: 1px;
    z-index: 2;
}
.scroll-track {
    width: 1px;
    height: 100%;
    background: rgba(241, 241, 241, 0.15);
    position: relative;
    overflow: hidden;
}
.scroll-thumb {
    width: 1px;
    height: 100%;
    background: rgba(241, 241, 241, 0.6);
    position: absolute;
    top: -100%;
    animation: scrollPulse 2.5s var(--ease) infinite;
}
@keyframes scrollPulse {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* ---------- Sections (Light) ---------- */
.section {
    position: relative;
    z-index: 1;
}

.section--problem {
    padding: clamp(120px, 18vw, 260px) 0;
    background: transparent;
}

.problem-content {
    max-width: 900px;
}

.problem-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.problem-headline {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.8rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--text);
}

.problem-stat {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1em;
}

.problem-headline em {
    font-style: italic;
    color: var(--text-muted);
}

/* ---------- How It Works ---------- */
.section--works {
    padding: clamp(100px, 14vw, 200px) 0;
    background: transparent;
    border-top: 1px solid var(--border);
}

.works-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: clamp(60px, 8vw, 120px);
    gap: 40px;
}

.section-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-align: right;
    color: var(--text);
}

.steps {
    display: flex;
    flex-direction: column;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: clamp(24px, 4vw, 60px);
    padding: clamp(32px, 4vw, 48px) 0;
    border-top: 1px solid var(--border);
}

.step:last-child {
    border-bottom: 1px solid var(--border);
}

.step-num {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    color: rgba(28, 29, 32, 0.08);
    flex-shrink: 0;
    min-width: clamp(60px, 8vw, 120px);
}

.step-content {
    padding-top: 8px;
}

.step-title {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text);
}

.step-desc {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 500px;
}

/* ---------- Recovery Cards ---------- */
.section--states {
    padding: clamp(100px, 14vw, 200px) 0;
    background: transparent;
    border-top: 1px solid var(--border);
}

.states-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: clamp(60px, 8vw, 100px);
    gap: 40px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: clamp(32px, 3vw, 48px);
    text-align: center;
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.3s;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s;
    border-radius: 20px;
    pointer-events: none;
}
.card--green::before { background: radial-gradient(ellipse at 50% 0%, var(--green-bg), transparent 70%); }
.card--amber::before { background: radial-gradient(ellipse at 50% 0%, var(--amber-bg), transparent 70%); }
.card--red::before { background: radial-gradient(ellipse at 50% 0%, var(--red-bg), transparent 70%); }

.card:hover::before { opacity: 1; }
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(28, 29, 32, 0.06);
    border-color: #ccc;
}

.card-ring-wrap {
    width: 100px;
    height: 100px;
    margin: 0 auto 28px;
    position: relative;
}

.card-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-track {
    fill: none;
    stroke: var(--border);
    stroke-width: 4;
}

.ring-progress {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 1.8s var(--ease);
}

.card--green .ring-progress { stroke: var(--green); }
.card--amber .ring-progress { stroke: var(--amber); }
.card--red .ring-progress { stroke: var(--red); }

.card-score {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.card--green .card-score { color: var(--green); }
.card--amber .card-score { color: var(--amber); }
.card--red .card-score { color: var(--red); }

.card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    color: var(--text);
}

.card-desc {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---------- Social Proof ---------- */
.section--proof {
    padding: clamp(100px, 14vw, 180px) 0;
    text-align: center;
    background: transparent;
    border-top: 1px solid var(--border);
}

.proof-text {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: -0.01em;
}

.proof-count {
    color: var(--text);
    font-weight: 600;
}

/* ---------- CTA Section (Dark — like Dennis's footer) ---------- */
.section--cta {
    background: var(--bg-dark);
    padding: clamp(160px, 20vw, 300px) 0 clamp(80px, 12vw, 160px);
    position: relative;
    z-index: 1;
}

/* Curved top edge — Dennis Snellenberg signature */
.cta-rounded-top {
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: clamp(50px, 6vw, 100px);
    background: var(--bg);
    border-radius: 0 0 50% 50%;
    z-index: 2;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.cta-headline {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--text-light);
    margin-bottom: 32px;
}

.cta-headline .line {
    display: block;
    overflow: hidden;
}
.cta-headline .line-inner {
    display: block;
    transform: translateY(115%);
    transition: transform 1.2s var(--ease);
}
.cta-headline.revealed .line-inner { transform: translateY(0); }
.cta-headline .line:nth-child(2) .line-inner { transition-delay: 0.12s; }

.cta-sub {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    font-weight: 300;
    color: rgba(241, 241, 241, 0.55);
    line-height: 1.8;
    margin-bottom: 48px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.cta-form { width: 100%; }

.form-row {
    display: flex;
    gap: 0;
    background: rgba(241, 241, 241, 0.06);
    border: 1px solid rgba(241, 241, 241, 0.1);
    border-radius: 100px;
    padding: 6px;
    transition: border-color 0.4s;
}
.form-row:focus-within {
    border-color: rgba(241, 241, 241, 0.25);
}

.form-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--text-light);
    padding: 16px 28px;
    min-width: 0;
}
.form-input::placeholder {
    color: rgba(241, 241, 241, 0.3);
}
.form-input--hidden {
    display: none;
}

/* Toggle buttons */
.form-toggle {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 20px;
    background: rgba(241, 241, 241, 0.06);
    border-radius: 100px;
    padding: 4px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.toggle-btn {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 10px 28px;
    border: none;
    border-radius: 100px;
    background: transparent;
    color: rgba(241, 241, 241, 0.4);
    cursor: pointer;
    transition: background 0.3s var(--ease), color 0.3s;
}
.toggle-btn.active {
    background: rgba(241, 241, 241, 0.12);
    color: var(--text-light);
}
.toggle-btn:hover:not(.active) {
    color: rgba(241, 241, 241, 0.7);
}

.form-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 16px 32px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: gap 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s;
}
.form-btn:hover {
    gap: 16px;
    transform: scale(1.03);
}
.form-btn:hover .form-btn-arrow {
    transform: translateX(3px);
}
.form-btn-arrow {
    font-size: 1.1rem;
    transition: transform 0.3s var(--ease);
}

.form-msg {
    margin-top: 20px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 400;
    min-height: 24px;
    transition: opacity 0.3s;
    color: rgba(241, 241, 241, 0.6);
}
.form-msg.success { color: var(--green); }
.form-msg.error { color: var(--red); }

/* ---------- Footer ---------- */
.footer {
    background: var(--bg-dark);
    padding: 36px 0;
    border-top: 1px solid var(--border-dark);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-light);
}

.footer-tagline {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(241, 241, 241, 0.35);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-link {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 400;
    color: rgba(241, 241, 241, 0.5);
    transition: color 0.3s;
}
.footer-link:hover { color: var(--text-light); }

/* ---------- Reveal Animations ---------- */
.reveal-el {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.reveal-el.revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal-el[data-delay="1"] { transition-delay: 0.15s; }
.reveal-el[data-delay="2"] { transition-delay: 0.30s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .works-header,
    .states-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .section-heading { text-align: left; }
}

@media (max-width: 900px) {
    .nav-links { display: none; }

    .cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card {
        display: flex;
        align-items: center;
        gap: 24px;
        text-align: left;
        padding: 24px 28px;
    }
    .card-ring-wrap {
        width: 72px;
        height: 72px;
        margin: 0;
        flex-shrink: 0;
    }
    .card-score { font-size: 1.6rem; }

    .hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 32px;
    }
}

@media (max-width: 640px) {
    .hero-headline {
        font-size: clamp(2.8rem, 12vw, 4.5rem);
    }

    .step {
        flex-direction: column;
        gap: 8px;
    }
    .step-num {
        font-size: 2rem;
        min-width: auto;
    }

    .form-row {
        flex-direction: column;
        border-radius: 16px;
        padding: 8px;
    }
    .form-input {
        text-align: center;
        padding: 16px;
    }
    .form-btn {
        width: 100%;
        justify-content: center;
        padding: 18px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .card {
        flex-direction: column;
        text-align: center;
    }
    .card-ring-wrap {
        margin: 0 auto;
    }

    .nav-cta {
        font-size: 0.7rem;
        padding: 10px 18px;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal-el,
    .hero-headline .line-inner,
    .cta-headline .line-inner {
        opacity: 1;
        transform: none;
    }
    .scroll-thumb,
    .cta-round-arrow { animation: none; }
}
