:root {
    --sand: #f5f0e8;
    --sand-dark: #e8e0d0;
    --warm: #d4a574;
    --warm-deep: #b8845a;
    --ember: #e07a4b;
    --ember-deep: #c4623a;
    --night: #1a1714;
    --night-soft: #2d2924;
    --text: #3a3530;
    --text-light: #7a7168;
    --white: #fffcf7;
    --serif: "Fraunces", serif;
    --sans: "Outfit", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
}

body {
    font-family: var(--sans);
    background: var(--night);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ─── SHARED ANIMATIONS ─── */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
}

.fade-up.visible {
    animation: fadeUp 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s !important;
}
.delay-2 {
    animation-delay: 0.4s !important;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(170deg, var(--sand) 0%, #f0e8d8 40%, #ede3cf 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -30%;
    right: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(224, 122, 75, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -20%;
    left: -15%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.brand {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 500;
    font-style: italic;
    color: var(--ember);
    letter-spacing: 0.01em;
    z-index: 100;
    padding: 0.4em 0.8em;
    transition: color 0.3s ease;
}

.brand-plain {
    font-style: normal;
    font-weight: 500;
    color: var(--text);
    transition: color 0.3s ease;
}

/* Light variant for dark backgrounds */
.brand--light .brand-plain {
    color: var(--white);
}

.brand--light::before,
.brand--light::after {
    background: var(--white);
}

.brand--light .brand-border::before,
.brand--light .brand-border::after {
    background: var(--white);
}

.brand-border {
    position: relative;
    display: inline-block;
}

/* Wavy border — filled SVG masks for seamless tiling */
.brand::before,
.brand::after,
.brand-border::before,
.brand-border::after {
    content: "";
    position: absolute;
    pointer-events: none;
    background: var(--text);
    transition: background 0.3s ease;
}

/* Horizontal wave: filled ribbon, 20px cycle, 6px tall, 1.5px thick band */
/* Path: top edge waves, bottom edge waves offset, creating a filled wavy ribbon */

/* Top */
.brand::before {
    top: -1px;
    left: 0;
    right: 0;
    height: 6px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='6' preserveAspectRatio='none'%3E%3Cpath d='M0,2.25 Q5,0 10,2.25 Q15,4.5 20,2.25 L20,3.75 Q15,6 10,3.75 Q5,1.5 0,3.75 Z' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-size: 20px 6px;
    -webkit-mask-repeat: repeat-x;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='6' preserveAspectRatio='none'%3E%3Cpath d='M0,2.25 Q5,0 10,2.25 Q15,4.5 20,2.25 L20,3.75 Q15,6 10,3.75 Q5,1.5 0,3.75 Z' fill='black'/%3E%3C/svg%3E");
    mask-size: 20px 6px;
    mask-repeat: repeat-x;
}

/* Bottom */
.brand::after {
    bottom: -1px;
    left: 0;
    right: 0;
    height: 6px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='6' preserveAspectRatio='none'%3E%3Cpath d='M0,2.25 Q5,0 10,2.25 Q15,4.5 20,2.25 L20,3.75 Q15,6 10,3.75 Q5,1.5 0,3.75 Z' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-size: 20px 6px;
    -webkit-mask-repeat: repeat-x;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='6' preserveAspectRatio='none'%3E%3Cpath d='M0,2.25 Q5,0 10,2.25 Q15,4.5 20,2.25 L20,3.75 Q15,6 10,3.75 Q5,1.5 0,3.75 Z' fill='black'/%3E%3C/svg%3E");
    mask-size: 20px 6px;
    mask-repeat: repeat-x;
}

/* Vertical wave: same concept rotated, 12px cycle for more waves */

/* Left */
.brand-border::before {
    top: 0;
    left: calc(-0.8em - 1px);
    bottom: 0;
    width: 6px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='12' preserveAspectRatio='none'%3E%3Cpath d='M2.25,0 Q0,3 2.25,6 Q4.5,9 2.25,12 L3.75,12 Q6,9 3.75,6 Q1.5,3 3.75,0 Z' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-size: 6px 12px;
    -webkit-mask-repeat: repeat-y;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='12' preserveAspectRatio='none'%3E%3Cpath d='M2.25,0 Q0,3 2.25,6 Q4.5,9 2.25,12 L3.75,12 Q6,9 3.75,6 Q1.5,3 3.75,0 Z' fill='black'/%3E%3C/svg%3E");
    mask-size: 6px 12px;
    mask-repeat: repeat-y;
}

/* Right */
.brand-border::after {
    top: 0;
    right: calc(-0.8em - 1px);
    bottom: 0;
    width: 6px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='12' preserveAspectRatio='none'%3E%3Cpath d='M2.25,0 Q0,3 2.25,6 Q4.5,9 2.25,12 L3.75,12 Q6,9 3.75,6 Q1.5,3 3.75,0 Z' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-size: 6px 12px;
    -webkit-mask-repeat: repeat-y;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='12' preserveAspectRatio='none'%3E%3Cpath d='M2.25,0 Q0,3 2.25,6 Q4.5,9 2.25,12 L3.75,12 Q6,9 3.75,6 Q1.5,3 3.75,0 Z' fill='black'/%3E%3C/svg%3E");
    mask-size: 6px 12px;
    mask-repeat: repeat-y;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-heading {
    font-family: var(--serif);
    font-size: clamp(2.4rem, 6.5vw, 5rem);
    font-weight: 500;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.hero-heading em {
    font-style: italic;
    color: var(--ember);
}

.hero-sub {
    font-family: var(--sans);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: var(--text-light);
    line-height: 1.5;
}

/* ═══════════════════════════════════════
   CORE PAIN SECTION
   ═══════════════════════════════════════ */
.core-pain-section {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem 2rem;
    background: var(--white);
    position: relative;
}

.core-pain-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
}

.core-pain-content {
    text-align: left;
    flex: 0 0 25%;
}

.core-pain-label {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 4vw, 3rem);
    font-weight: 500;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.core-pain-machine {
    display: inline-block;
    font-size: clamp(1.8rem, 4.5vw, 3.4rem);
    line-height: 1.3;
    height: 1.3em;
    overflow: hidden;
    position: relative;
    vertical-align: bottom;
    border-radius: 10px;
    background: rgba(224, 122, 75, 0.12);
    padding: 0 0.3em;
}

.core-pain-track {
    display: flex;
    flex-direction: column;
    animation: corePainSpin 6s ease-in-out infinite;
}

.core-pain-word {
    height: 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: inherit;
    font-weight: 600;
    font-style: italic;
    color: var(--ember);
    white-space: nowrap;
    line-height: 1.3;
}

@keyframes corePainSpin {
    0%,
    20% {
        transform: translateY(0);
    }
    25%,
    45% {
        transform: translateY(-20%);
    }
    50%,
    70% {
        transform: translateY(-40%);
    }
    75%,
    95% {
        transform: translateY(-60%);
    }
    100% {
        transform: translateY(-80%);
    }
}

/* ═══════════════════════════════════════
   PAIN SECTIONS
   ═══════════════════════════════════════ */
.pain-section {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.pain-1 {
    background: linear-gradient(170deg, #1a1714 0%, #221e19 100%);
}

.pain-2 {
    background: linear-gradient(170deg, #1e1b16 0%, #262119 100%);
}

.pain-3 {
    background: linear-gradient(170deg, #221e19 0%, #1a1714 100%);
}

.pain-section::before {
    content: "";
    position: absolute;
    top: 20%;
    left: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(224, 122, 75, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.pain-1::before,
.pain-3::before {
    left: auto;
    right: -10%;
}

.pain-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
}

.pain-content {
    flex: 0 0 25%;
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

.pain-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.pain-1 .pain-content {
    text-align: right;
}
.pain-2 .pain-content {
    text-align: left;
}
.pain-2 .section-illustration {
    max-height: 70vh;
    width: auto;
    flex: none;
}
.pain-3 .pain-content {
    text-align: right;
}

/* ─── SECTION ILLUSTRATIONS ─── */
.section-illustration {
    flex: 1;
    min-width: 0;
    height: auto;
    max-height: 70vh;
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.8s ease 0.2s,
        transform 0.8s ease 0.2s;
}

.section-illustration.visible {
    opacity: 1;
    transform: translateY(0);
}

.core-pain-illustration {
    flex: 1;
    min-width: 0;
    height: auto;
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.8s ease 0.2s,
        transform 0.8s ease 0.2s;
}

.core-pain-illustration.visible {
    opacity: 1;
    transform: translateY(0);
}

.pain-line {
    font-family: var(--serif);
    font-size: clamp(1.5rem, 3.5vw, 2.4rem);
    font-weight: 500;
    color: var(--white);
    line-height: 1.4;
    margin-bottom: 2rem;
}

.pain-hook {
    font-family: var(--sans);
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    font-weight: 400;
    color: var(--warm);
    letter-spacing: 0.02em;
    opacity: 0;
    transition: opacity 0.6s ease 0.4s;
}

.pain-content.visible .pain-hook {
    opacity: 1;
}

/* ═══════════════════════════════════════
   CLOSER + CTA
   ═══════════════════════════════════════ */
.closer {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    background: linear-gradient(170deg, var(--sand) 0%, #f0e8d8 40%, #ede3cf 100%);
    position: relative;
    overflow: hidden;
}

.closer::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -15%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(224, 122, 75, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.closer::after {
    content: "";
    position: absolute;
    bottom: -15%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.closer-content {
    max-width: 600px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.closer-heading {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 500;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.closer-heading em {
    font-style: italic;
    color: var(--ember);
}

.closer-sub {
    font-family: var(--sans);
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-light);
    margin-bottom: 3rem;
}

.email-form {
    position: relative;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 360px;
    margin: 0 auto;
}

.form-row input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--sand-dark);
    border-radius: 60px;
    background: var(--white);
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--text);
    outline: none;
    text-align: center;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.form-row input:focus {
    border-color: var(--ember);
    box-shadow: 0 0 0 3px rgba(224, 122, 75, 0.1);
}

.form-row input::placeholder {
    color: #aaa;
}

.form-row button {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--ember);
    color: #fff;
    border: none;
    border-radius: 60px;
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.form-row button:hover {
    background: var(--ember-deep);
    box-shadow: 0 8px 30px rgba(224, 122, 75, 0.3);
    transform: translateY(-1px);
}

.form-row button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.form-disclaimer {
    margin-top: 1rem;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-light);
}

.success-msg {
    display: none;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--ember);
    margin-top: 1.5rem;
}

.success-msg.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.closer-footer {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-light);
}

/* ═══════════════════════════════════════
   SCROLL SNAP
   ═══════════════════════════════════════ */
.hero,
.core-pain-section,
.pain-section,
.closer {
    scroll-snap-align: start;
}

/* ═══════════════════════════════════════
   SECTION NAV DOTS
   ═══════════════════════════════════════ */
.section-nav {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.section-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.section-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.section-dot.active {
    width: 10px;
    height: 10px;
    background: var(--ember);
    box-shadow: 0 0 6px rgba(224, 122, 75, 0.4);
}

/* ═══════════════════════════════════════
   SCROLL NUDGE
   ═══════════════════════════════════════ */
.scroll-nudge {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    width: 18px;
    height: 18px;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: translateX(-50%) rotate(45deg);
    opacity: 0.5;
    animation: nudgeBounce 2s ease-in-out infinite;
    transition: opacity 0.4s ease;
}

.scroll-nudge.hidden {
    opacity: 0;
}

@keyframes nudgeBounce {
    0%,
    100% {
        bottom: 2rem;
    }
    50% {
        bottom: 1.2rem;
    }
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .section-nav {
        right: 0.75rem;
        gap: 10px;
    }

    .section-dot {
        width: 6px;
        height: 6px;
    }

    .section-dot.active {
        width: 8px;
        height: 8px;
    }

    .hero-heading {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .core-pain-inner {
        flex-direction: column;
        gap: 1.5rem;
    }

    .core-pain-content {
        text-align: center;
        flex: none;
    }

    .core-pain-illustration {
        width: 95vw;
        flex: none;
    }

    .core-pain-label {
        font-size: clamp(1.3rem, 5vw, 2rem);
    }

    .core-pain-machine {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
        display: block;
        margin: 1rem auto 0;
        width: fit-content;
    }

    .pain-inner {
        flex-direction: column;
        gap: 2rem;
    }

    .pain-2 .pain-inner {
        flex-direction: column-reverse;
    }

    .pain-content {
        flex: none;
    }

    .section-illustration {
        width: 80vw;
        flex: none;
    }

    .pain-2 .section-illustration {
        max-height: 45vh;
        width: auto;
    }

    .pain-line {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
    }

    .pain-1 .pain-content,
    .pain-2 .pain-content,
    .pain-3 .pain-content {
        text-align: center;
    }

    .closer-heading {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }
}
