/* ============================================================
   HHUDDL.com — Y2K Futurism × Dreamy Ethereal
   ============================================================ */

/* Custom Properties */
:root {
    --bg-deep: #1a0a14;
    --bg-mid: #2d1425;
    --surface: #3e2236;
    --accent-primary: #c4556e;
    --accent-secondary: #e8d5b7;
    --highlight: #b48ee0;
    --text-primary: #f0e6db;
    --text-secondary: #a88a9b;
    --gradient-start: #8b1a4a;
    --gradient-end: #4a1a6b;

    --font-display: 'Bungee Shade', cursive;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --ease-entrance: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);

    --chrome-border: rgba(232, 213, 183, 0.2);
    --chrome-border-strong: rgba(232, 213, 183, 0.35);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.72;
    font-size: clamp(1rem, 1.1vw, 1.125rem);
    overflow-x: hidden;
    position: relative;
}

/* Selection */
::selection {
    background: rgba(196, 85, 110, 0.4);
    color: var(--text-primary);
}

/* ============================================================
   SKELETON LOADING OVERLAY
   ============================================================ */
.skeleton-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background-color: var(--bg-deep);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    transition: opacity 800ms var(--ease-entrance), visibility 800ms;
}

.skeleton-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.skeleton-hero-title {
    display: flex;
    gap: 12px;
}

.skeleton-block {
    background: var(--bg-mid);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.skeleton-block::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(232, 213, 183, 0.08) 50%,
        transparent 70%
    );
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

.skeleton-letter {
    width: 48px;
    height: 64px;
    border-radius: 6px;
}

.skeleton-subtitle {
    width: 200px;
    height: 16px;
}

.skeleton-line {
    width: 140px;
    height: 12px;
    margin-top: 8px;
}

@keyframes skeleton-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================================
   CIRCUIT TRACES (Background SVG)
   ============================================================ */
.circuit-traces {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* ============================================================
   FLOATING ORBS
   ============================================================ */
.orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    will-change: transform;
    filter: blur(60px);
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(180, 142, 224, 0.25), transparent 70%);
    top: 10%;
    left: -5%;
    animation: orb-drift-1 30s ease-in-out infinite alternate;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(196, 85, 110, 0.2), transparent 70%);
    top: 40%;
    right: -8%;
    animation: orb-drift-2 25s ease-in-out infinite alternate;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(74, 26, 107, 0.3), transparent 70%);
    bottom: 20%;
    left: 20%;
    animation: orb-drift-3 35s ease-in-out infinite alternate;
}

.orb-4 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(139, 26, 74, 0.2), transparent 70%);
    top: 60%;
    right: 15%;
    animation: orb-drift-4 28s ease-in-out infinite alternate;
}

.orb-5 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(180, 142, 224, 0.15), transparent 70%);
    top: 80%;
    left: 50%;
    animation: orb-drift-5 32s ease-in-out infinite alternate;
}

@keyframes orb-drift-1 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 40px); }
}

@keyframes orb-drift-2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50px, 60px); }
}

@keyframes orb-drift-3 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, -30px); }
}

@keyframes orb-drift-4 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-30px, -50px); }
}

@keyframes orb-drift-5 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 30px); }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}

.hero-gradient-mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(139, 26, 74, 0.6), transparent),
        radial-gradient(ellipse 60% 70% at 80% 60%, rgba(74, 26, 107, 0.5), transparent),
        radial-gradient(ellipse 90% 50% at 50% 80%, rgba(62, 34, 54, 0.8), transparent),
        radial-gradient(ellipse 50% 40% at 60% 20%, rgba(180, 142, 224, 0.15), transparent),
        linear-gradient(135deg, var(--gradient-start), var(--surface), var(--gradient-end));
    background-size: 200% 200%, 200% 200%, 200% 200%, 200% 200%, 100% 100%;
    animation: hero-mesh-shift 20s ease-in-out infinite alternate;
}

@keyframes hero-mesh-shift {
    0% {
        background-position: 0% 0%, 100% 100%, 50% 0%, 0% 100%, 0% 0%;
    }
    50% {
        background-position: 50% 30%, 60% 40%, 30% 50%, 70% 30%, 0% 0%;
    }
    100% {
        background-position: 100% 100%, 0% 0%, 50% 100%, 100% 0%, 0% 0%;
    }
}

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

.hero-title {
    font-family: var(--font-display);
    font-size: 6vw;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    gap: 0.02em;
}

.hero-letter {
    display: inline-block;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 600ms var(--ease-entrance), transform 600ms var(--ease-entrance);
    will-change: opacity, transform;
    text-shadow:
        0 0 40px rgba(180, 142, 224, 0.3),
        0 0 80px rgba(139, 26, 74, 0.2);
}

.hero-letter.visible {
    opacity: 1;
    transform: scale(1);
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: clamp(0.75rem, 1vw, 0.875rem);
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 24px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1000ms var(--ease-entrance) 1200ms, transform 1000ms var(--ease-entrance) 1200ms;
}

.hero-tagline.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   CHROME LINE DIVIDERS
   ============================================================ */
.chrome-line {
    width: 80%;
    max-width: 600px;
    height: 1px;
    margin: 0 auto;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent-secondary),
        transparent
    );
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1200ms var(--ease-entrance);
    position: relative;
    z-index: 2;
}

.chrome-line.revealed {
    transform: scaleX(1);
}

/* ============================================================
   EDITORIAL SECTIONS
   ============================================================ */
.editorial-section {
    position: relative;
    z-index: 2;
    padding: 120px 8vw;
    max-width: 1200px;
    margin: 0 auto;
}

.editorial-stagger {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.editorial-stagger-reverse {
    direction: rtl;
}

.editorial-stagger-reverse > * {
    direction: ltr;
}

.editorial-col-left {
    transform: translateY(0);
}

.editorial-col-right {
    transform: translateY(80px);
}

.editorial-stagger-reverse .editorial-col-right {
    transform: translateY(0);
}

.editorial-stagger-reverse .editorial-col-left {
    transform: translateY(80px);
}

.label-mono {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-primary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 16px;
}

.section-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0;
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.125rem);
    line-height: 1.72;
    color: var(--text-secondary);
    transition: text-shadow 400ms var(--ease-smooth);
}

.body-text:hover {
    text-shadow: 0 0 20px rgba(180, 142, 224, 0.3);
    color: var(--text-primary);
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 800ms var(--ease-entrance), transform 800ms var(--ease-entrance);
    will-change: opacity, transform;
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Keep the stagger offset even when revealed */
.editorial-col-right.revealed {
    transform: translateY(80px);
}

.editorial-stagger-reverse .editorial-col-left.revealed {
    transform: translateY(80px);
}

.editorial-stagger-reverse .editorial-col-right.revealed {
    transform: translateY(0);
}

.reveal-line {
    /* Uses chrome-line transform */
}

/* ============================================================
   SKELETON DECORATIVE DIVIDER (Perpetual)
   ============================================================ */
.skeleton-divider {
    position: relative;
    z-index: 2;
    padding: 40px 8vw;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.skeleton-bar {
    width: 80%;
    height: 8px;
    background: var(--surface);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.shimmer-perpetual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(232, 213, 183, 0.08) 50%,
        transparent 70%
    );
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

/* ============================================================
   SKELETON DECORATIVE BLOCKS
   ============================================================ */
.skeleton-blocks {
    position: relative;
    z-index: 2;
    padding: 60px 8vw;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.skeleton-block-deco {
    width: 120px;
    height: 80px;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--chrome-border);
    position: relative;
    overflow: hidden;
}

/* ============================================================
   BREATHING SECTIONS
   ============================================================ */
.breathing-section {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.breathing-gradient-mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 30% 40%, rgba(139, 26, 74, 0.4), transparent),
        radial-gradient(ellipse 50% 60% at 70% 70%, rgba(74, 26, 107, 0.35), transparent),
        radial-gradient(ellipse 80% 40% at 50% 50%, rgba(62, 34, 54, 0.5), transparent);
    background-size: 200% 200%, 200% 200%, 200% 200%;
    animation: breathing-mesh-shift 20s ease-in-out infinite alternate;
}

.breathing-gradient-mesh-alt {
    background:
        radial-gradient(ellipse 60% 50% at 60% 30%, rgba(180, 142, 224, 0.2), transparent),
        radial-gradient(ellipse 70% 60% at 30% 70%, rgba(139, 26, 74, 0.35), transparent),
        radial-gradient(ellipse 80% 40% at 50% 50%, rgba(45, 20, 37, 0.6), transparent);
    background-size: 200% 200%, 200% 200%, 200% 200%;
}

@keyframes breathing-mesh-shift {
    0% {
        background-position: 0% 0%, 100% 100%, 50% 50%;
    }
    100% {
        background-position: 100% 100%, 0% 0%, 50% 50%;
    }
}

.breathing-text {
    position: relative;
    z-index: 3;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-primary);
    text-align: center;
    padding: 0 8vw;
    opacity: 0.9;
    text-shadow: 0 0 40px rgba(180, 142, 224, 0.2);
}

/* ============================================================
   INTERSTITIAL BREATHER
   ============================================================ */
.interstitial {
    position: relative;
    z-index: 2;
    padding: 80px 8vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.interstitial-inner {
    width: 100%;
    max-width: 600px;
}

.interstitial-svg {
    width: 100%;
    height: auto;
    opacity: 0.5;
}

/* ============================================================
   TERMINAL SECTION
   ============================================================ */
.terminal-section {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 8vw;
    background: radial-gradient(
        ellipse 80% 60% at 50% 50%,
        rgba(45, 20, 37, 0.5),
        var(--bg-deep) 80%
    );
}

.terminal-content {
    text-align: center;
    margin-bottom: 80px;
}

.terminal-statement {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--text-primary);
    line-height: 1.3;
    text-shadow: 0 0 60px rgba(180, 142, 224, 0.2);
}

.terminal-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transition: opacity 600ms var(--ease-smooth);
}

.terminal-section:hover .terminal-nav {
    opacity: 1;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.1em;
    transition: color 400ms var(--ease-smooth), text-shadow 400ms var(--ease-smooth);
}

.nav-link:hover {
    color: var(--accent-secondary);
    text-shadow: 0 0 10px rgba(232, 213, 183, 0.3);
}

.nav-separator {
    color: var(--text-secondary);
    opacity: 0.4;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 10vw;
    }

    .editorial-stagger {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .editorial-stagger-reverse {
        direction: ltr;
    }

    .editorial-col-right,
    .editorial-col-right.revealed,
    .editorial-stagger-reverse .editorial-col-left,
    .editorial-stagger-reverse .editorial-col-left.revealed {
        transform: translateY(0);
    }

    .editorial-section {
        padding: 80px 6vw;
    }

    .skeleton-letter {
        width: 32px;
        height: 48px;
    }

    .skeleton-blocks {
        flex-direction: column;
        align-items: center;
    }

    .orb {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 12vw;
        gap: 0;
    }

    .terminal-statement {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
}
