/* =========================================
   HHASSL.com - Styles
   Vaporwave Nostalgia + Pastoral Longing
   ========================================= */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Color Palette */
    --midnight-violet: #1a1130;
    --lilac-mist: #fdf6ff;
    --hot-magenta: #ff6ec7;
    --soft-teal: #6ee7c2;
    --lavender-haze: #e2a0ff;
    --pale-orchid: #e2d4f5;
    --deep-grape: #2d1b4e;
    --faint-black: rgba(0, 0, 0, 0.04);
    --geo-lavender: #d4a0e8;

    /* Typography Scale (Perfect Fourth 1.333) */
    --font-body: 1rem;
    --font-small: 0.75rem;
    --font-h4: 1.333rem;
    --font-h3: 1.777rem;
    --font-h2: 2.369rem;
    --font-h1: 3.157rem;
    --font-display: 4.209rem;

    /* Font Families */
    --ff-heading: 'Space Grotesk', sans-serif;
    --ff-body: 'Inter', sans-serif;
    --ff-accent: 'Cormorant Garamond', serif;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--ff-body);
    font-weight: 400;
    color: var(--deep-grape);
    background: var(--midnight-violet);
    overflow: hidden;
    cursor: none;
    line-height: 1.6;
}

/* ---------- Noise Grain Overlay ---------- */
#noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.03;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ---------- CRT Scanline Overlay ---------- */
#scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9997;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.04) 2px,
        rgba(0, 0, 0, 0.04) 4px
    );
    transition: opacity 600ms ease;
}

#scanline-overlay.intensified {
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
}

/* ---------- Custom Cursor ---------- */
#cursor-follower {
    position: fixed;
    width: 12px;
    height: 12px;
    border: 2px solid var(--hot-magenta);
    border-radius: 50%;
    background: transparent;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 200ms ease, height 200ms ease, background 200ms ease;
    will-change: transform;
}

#cursor-follower.hovering {
    width: 18px;
    height: 18px;
    background: rgba(255, 110, 199, 0.4);
}

/* ---------- Scroll Container ---------- */
#scroll-container {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* ---------- Section Base ---------- */
.section {
    min-height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ---------- Section 1: Hero ---------- */
#hero {
    background: var(--midnight-violet);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: contrast(0.95) saturate(0.85) sepia(0.12);
}

.hero-color-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 110, 199, 0.35), rgba(110, 231, 194, 0.15));
    mix-blend-mode: multiply;
}

.hero-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(26, 17, 48, 0.65) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.hero-title {
    font-family: var(--ff-heading);
    font-weight: 700;
    font-size: clamp(3rem, 10vw, 7rem);
    color: #ffffff;
    letter-spacing: 0.25em;
    display: flex;
    justify-content: center;
    gap: 0.05em;
}

.hero-title .letter {
    opacity: 0;
    display: inline-block;
    animation: letterFadeIn 600ms ease forwards;
}

.hero-title .letter:nth-child(1) { animation-delay: 200ms; }
.hero-title .letter:nth-child(2) { animation-delay: 320ms; }
.hero-title .letter:nth-child(3) { animation-delay: 440ms; }
.hero-title .letter:nth-child(4) { animation-delay: 560ms; }
.hero-title .letter:nth-child(5) { animation-delay: 680ms; }
.hero-title .letter:nth-child(6) { animation-delay: 800ms; }

@keyframes letterFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-divider {
    border: none;
    height: 1px;
    background: var(--lavender-haze);
    width: 200px;
    margin: 1.5rem auto;
    opacity: 0;
    animation: fadeIn 800ms ease forwards 1000ms;
}

.hero-tagline {
    font-family: var(--ff-accent);
    font-style: italic;
    font-weight: 300;
    font-size: var(--font-h4);
    color: var(--pale-orchid);
    letter-spacing: 0.08em;
    opacity: 0;
    animation: fadeIn 800ms ease forwards 1200ms;
}

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

/* Geometric logo in header */
.geo-logo {
    cursor: pointer;
}

.geo-logo--header {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    z-index: 20;
    opacity: 0;
    animation: fadeIn 1000ms ease forwards 1400ms;
}

.geo-logo--header svg {
    width: 100%;
    height: 100%;
}

/* ---------- Section 2: Statement ---------- */
.section--light {
    background-color: var(--lilac-mist);
    /* Dot grid background */
    background-image: radial-gradient(circle, var(--geo-lavender) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: 0 0;
}

/* Override dot grid opacity */
.section--light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--lilac-mist);
    opacity: 0.94;
    z-index: 0;
}

.statement-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    padding: 2rem;
    text-align: center;
}

.statement-text {
    font-family: var(--ff-body);
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 2.2;
    color: var(--deep-grape);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 500ms ease, transform 500ms ease;
}

.statement-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Section 3: Gallery ---------- */
#gallery {
    /* Uses same light background from section--light */
}

.gallery-strip {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: -20px;
    padding: 2rem;
}

.polaroid-card {
    flex-shrink: 0;
    transform: rotate(var(--tilt, 0deg));
    transition: transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 400ms ease;
    margin: 0 -15px;
    opacity: 0;
    cursor: pointer;
}

.polaroid-card.visible {
    opacity: 1;
}

.polaroid-card:hover {
    transform: rotate(0deg) scale(1.08);
    z-index: 10;
}

.polaroid-frame {
    background: #ffffff;
    padding: 12px 12px 40px 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-radius: 2px;
}

.polaroid-image {
    width: 220px;
    height: 176px;
    overflow: hidden;
    position: relative;
}

.polaroid-image svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: contrast(0.95) saturate(0.85) sepia(0.12);
}

.polaroid-image .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 110, 199, 0.18), rgba(110, 231, 194, 0.12));
    pointer-events: none;
}

.polaroid-caption {
    font-family: var(--ff-accent);
    font-style: italic;
    font-weight: 300;
    font-size: var(--font-small);
    color: var(--deep-grape);
    text-align: center;
    margin-top: 8px;
    opacity: 0.7;
}

/* ---------- Section 4: Manifesto ---------- */
.section--dark {
    background-color: var(--midnight-violet);
    color: var(--pale-orchid);
}

/* Scanline texture on dark section */
.section--dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.04) 2px,
        rgba(0, 0, 0, 0.04) 4px
    );
    z-index: 0;
    pointer-events: none;
}

.manifesto-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 4rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.pull-quote {
    flex: 0 0 280px;
    font-family: var(--ff-accent);
    font-style: italic;
    font-weight: 300;
    font-size: 3rem;
    line-height: 1.3;
    color: var(--pale-orchid);
    border-left: 4px solid var(--hot-magenta);
    padding-left: 1.5rem;
    margin: 0;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.pull-quote.visible {
    opacity: 1;
    transform: translateY(0);
}

.manifesto-text {
    flex: 1 1 400px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 500ms ease 200ms, transform 500ms ease 200ms;
}

.manifesto-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.manifesto-text p {
    font-family: var(--ff-body);
    font-weight: 400;
    font-size: var(--font-body);
    line-height: 2;
    color: var(--pale-orchid);
    margin-bottom: 1.5rem;
}

.manifesto-text p:last-child {
    margin-bottom: 0;
}

/* ---------- Section 5: Closing/Footer ---------- */
.section--gradient {
    background: linear-gradient(to bottom, var(--midnight-violet), var(--deep-grape));
    flex-direction: column;
}

.closing-content {
    text-align: center;
    z-index: 1;
    position: relative;
}

.geo-logo--footer {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 700ms ease, transform 700ms ease;
}

.geo-logo--footer.visible {
    opacity: 1;
    transform: scale(1);
}

.geo-logo--footer svg {
    width: 100%;
    height: 100%;
}

.closing-domain {
    font-family: var(--ff-heading);
    font-weight: 700;
    font-size: var(--font-h4);
    color: #ffffff;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-variant: small-caps;
    margin-bottom: 1rem;
    opacity: 0;
    transition: opacity 600ms ease 200ms;
}

.closing-domain.visible {
    opacity: 1;
}

.closing-text {
    font-family: var(--ff-accent);
    font-style: italic;
    font-weight: 300;
    font-size: var(--font-h4);
    color: var(--pale-orchid);
    opacity: 0;
    transition: opacity 600ms ease 400ms;
}

.closing-text.visible {
    opacity: 1;
}

/* ---------- Geometric Shapes ---------- */
.geo-shape {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    transition: transform 100ms linear;
}

.geo-circle {
    width: 80px;
    height: 80px;
    border: 1.5px solid var(--lavender-haze);
    border-radius: 50%;
    opacity: 0.2;
}

.geo-triangle {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid transparent;
    position: absolute;
    opacity: 0.18;
}

.geo-triangle::after {
    content: '';
    position: absolute;
    top: 6px;
    left: -34px;
    width: 0;
    height: 0;
    border-left: 34px solid transparent;
    border-right: 34px solid transparent;
    border-bottom: 60px solid var(--lilac-mist);
}

/* Outline triangle via SVG background */
.geo-triangle {
    width: 80px;
    height: 70px;
    border: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 80 70' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='40,2 78,68 2,68' fill='none' stroke='%236ee7c2' stroke-width='1.5'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.2;
}

.geo-rhombus {
    width: 60px;
    height: 60px;
    border: 1.5px solid var(--soft-teal);
    opacity: 0.18;
    transform: rotate(45deg);
}

/* ---------- Shake Animations ---------- */
@keyframes shake {
    0% { transform: translateX(0); }
    15% { transform: translateX(-8px); }
    30% { transform: translateX(8px); }
    45% { transform: translateX(-6px); }
    60% { transform: translateX(6px); }
    75% { transform: translateX(-3px); }
    90% { transform: translateX(3px); }
    100% { transform: translateX(0); }
}

@keyframes glitchShake {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-4px, 2px); }
    40% { transform: translate(4px, -2px); }
    60% { transform: translate(-3px, -1px); }
    80% { transform: translate(3px, 1px); }
    100% { transform: translate(0, 0); }
}

.glitch-shake {
    animation: glitchShake 300ms ease-out;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .gallery-strip {
        flex-wrap: wrap;
        gap: 20px;
    }

    .polaroid-card {
        margin: 0;
    }

    .polaroid-image {
        width: 180px;
        height: 144px;
    }

    .manifesto-content {
        flex-direction: column;
    }

    .pull-quote {
        flex: 1 1 auto;
        font-size: 2rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 8vw, 5rem);
    }
}

@media (max-width: 600px) {
    .gallery-strip {
        flex-direction: column;
        align-items: center;
    }

    .polaroid-image {
        width: 240px;
        height: 192px;
    }

    .statement-text {
        font-size: 1.2rem;
        line-height: 1.9;
    }

    .pull-quote {
        font-size: 1.6rem;
    }

    .hero-title {
        font-size: clamp(2rem, 12vw, 4rem);
    }
}

/* ---------- Scrollbar Styling ---------- */
#scroll-container::-webkit-scrollbar {
    width: 6px;
}

#scroll-container::-webkit-scrollbar-track {
    background: var(--midnight-violet);
}

#scroll-container::-webkit-scrollbar-thumb {
    background: var(--lavender-haze);
    border-radius: 3px;
}

#scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--hot-magenta);
}
