/* ============================================================
   sim-ai.xyz -- Maximalist Art Deco split-screen reel
   Palette: #1A1714 #0F0D0A #D4A44A #E8864A #D46A5C #F0E8D8 #A89878 #F4D98C
   Typography: Poiret One / Josefin Sans / Share Tech Mono
   ============================================================ */

:root {
    --bg-left: #1A1714;
    --bg-right: #0F0D0A;
    --gold: #D4A44A;
    --amber: #E8864A;
    --coral: #D46A5C;
    --cream: #F0E8D8;
    --bronze: #A89878;
    --white-gold: #F4D98C;

    --font-display: "Poiret One", "Josefin Sans", serif;
    --font-body: "Josefin Sans", "Inter", sans-serif;
    --font-mono: "Share Tech Mono", monospace;

    --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
    background: var(--bg-right);
    color: var(--cream);
    font-family: var(--font-body);
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    cursor: none;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, rgba(212, 164, 74, 0.025) 0 1px, transparent 1px 22px),
        repeating-linear-gradient(-45deg, rgba(212, 164, 74, 0.025) 0 1px, transparent 1px 22px);
    pointer-events: none;
    z-index: 1;
}

/* =========================
   Cursor trail
   ========================= */
.cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(circle, rgba(212, 164, 74, 0.45), rgba(244, 217, 140, 0.15) 40%, transparent 70%);
    mix-blend-mode: screen;
    transform: translate(-50%, -50%);
    transition: width 0.25s var(--ease-snap), height 0.25s var(--ease-snap);
}

.cursor-trail::after {
    content: "";
    position: absolute;
    inset: 40%;
    border-radius: 50%;
    background: var(--white-gold);
    box-shadow: 0 0 8px var(--white-gold);
}

/* =========================
   Watermark sunburst
   ========================= */
.deco-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 140vmin;
    height: 140vmin;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.06;
    background:
        repeating-conic-gradient(from 0deg at 50% 50%,
            var(--gold) 0deg 2deg,
            transparent 2deg 6deg);
    mask-image: radial-gradient(circle at 50% 50%, black 0%, black 35%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 0%, black 35%, transparent 70%);
    z-index: 0;
    animation: slow-rotate 240s linear infinite;
}

@keyframes slow-rotate {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* =========================
   Scroll indicator HUD
   ========================= */
.scroll-indicator {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    z-index: 100;
    padding: 10px 18px;
    background: rgba(15, 13, 10, 0.72);
    border: 1px solid rgba(212, 164, 74, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.scroll-indicator::before,
.scroll-indicator::after {
    content: "";
    width: 10px;
    height: 10px;
    border: 1px solid var(--gold);
    transform: rotate(45deg);
    border-right: none;
    border-bottom: none;
}

.scroll-indicator::after {
    border: 1px solid var(--gold);
    border-left: none;
    border-top: none;
}

.indicator-bar {
    display: inline-block;
    width: 180px;
    height: 1px;
    background: rgba(212, 164, 74, 0.25);
    position: relative;
}

.indicator-fill {
    position: absolute;
    top: -1px;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--white-gold), var(--coral));
    box-shadow: 0 0 10px rgba(244, 217, 140, 0.55);
    transition: width 0.2s linear;
}

/* =========================
   Reel layout
   ========================= */
.reel {
    position: relative;
    z-index: 2;
}

.split-section {
    position: relative;
    display: flex;
    width: 100%;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    background: var(--bg-right);
}

.split-section .half {
    position: relative;
    height: 100%;
    overflow: hidden;
    transition: width 0.9s var(--ease-snap);
}

.half-left {
    width: var(--split-left, 50%);
    background: var(--bg-left);
    background-image:
        repeating-linear-gradient(90deg, rgba(212, 164, 74, 0.04) 0 1px, transparent 1px 60px),
        radial-gradient(circle at 20% 80%, rgba(232, 134, 74, 0.08), transparent 55%);
}

.half-right {
    width: var(--split-right, 50%);
    background: var(--bg-right);
    background-image:
        repeating-linear-gradient(0deg, rgba(212, 164, 74, 0.04) 0 1px, transparent 1px 60px),
        radial-gradient(circle at 70% 30%, rgba(212, 106, 92, 0.1), transparent 60%);
}

.split-section.reverse .half-left {
    background-image:
        repeating-linear-gradient(-30deg, rgba(212, 164, 74, 0.05) 0 1px, transparent 1px 40px),
        radial-gradient(circle at 80% 20%, rgba(244, 217, 140, 0.08), transparent 55%);
}

/* split divider line */
.split-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--split-left, 50%);
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--gold) 15%, var(--white-gold) 50%, var(--gold) 85%, transparent);
    box-shadow: 0 0 16px rgba(244, 217, 140, 0.55);
    transform: translateX(-1px);
    z-index: 5;
    transition: left 0.9s var(--ease-snap);
    pointer-events: none;
}

/* =========================
   Corner Art Deco brackets
   ========================= */
.corner {
    position: absolute;
    width: 42px;
    height: 42px;
    border: 1px solid var(--gold);
    z-index: 3;
}
.corner-tl { top: 24px; left: 24px; border-right: none; border-bottom: none; }
.corner-tr { top: 24px; right: 24px; border-left: none; border-bottom: none; }
.corner-bl { bottom: 24px; left: 24px; border-right: none; border-top: none; }
.corner-br { bottom: 24px; right: 24px; border-left: none; border-top: none; }

.corner::before {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--white-gold);
    box-shadow: 0 0 10px var(--white-gold);
    transform: rotate(45deg);
}
.corner-tl::before { top: -5px; left: -5px; }
.corner-tr::before { top: -5px; right: -5px; }
.corner-bl::before { bottom: -5px; left: -5px; }
.corner-br::before { bottom: -5px; right: -5px; }

/* =========================
   Left content (typography)
   ========================= */
.left-content {
    position: absolute;
    top: 50%;
    left: 8%;
    right: 10%;
    transform: translateY(-50%);
    max-width: 640px;
}

.left-content.narrow { max-width: 420px; left: 10%; }
.left-content.wide { max-width: 760px; }
.left-content.center { left: 50%; transform: translate(-50%, -50%); text-align: center; }

.mono {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: rgba(212, 164, 74, 0.7);
    text-transform: uppercase;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 28px;
    padding: 6px 12px;
    border: 1px solid rgba(212, 164, 74, 0.4);
    background: rgba(212, 164, 74, 0.04);
    color: var(--white-gold);
}

.display-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 0.92;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cream);
    margin-bottom: 26px;
}

.display-title.small { font-size: clamp(2.4rem, 5.5vw, 4.6rem); }
.display-title.xl { font-size: clamp(3.5rem, 10vw, 9rem); }

.display-title .line {
    display: block;
    position: relative;
}

.display-title .line.amber {
    color: var(--amber);
    font-style: italic;
    padding-left: 0.4em;
}

.display-title .line::before {
    content: "";
    display: inline-block;
    width: 38px;
    height: 1px;
    background: var(--gold);
    vertical-align: middle;
    margin-right: 14px;
    transform: translateY(-6px);
    box-shadow: 0 0 6px rgba(212, 164, 74, 0.55);
}

/* gilded rule */
.gilded-rule {
    position: relative;
    width: 240px;
    height: 1px;
    margin: 10px 0 28px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    box-shadow: 0 0 8px rgba(212, 164, 74, 0.4);
}

.gilded-rule.long { width: 360px; }

.gilded-rule::before,
.gilded-rule::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    background: var(--white-gold);
    transform: translateY(-50%) rotate(45deg);
    box-shadow: 0 0 8px var(--white-gold);
}
.gilded-rule::before { left: -4px; }
.gilded-rule::after { right: -4px; }

.lede {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.35rem);
    line-height: 1.6;
    color: var(--cream);
    max-width: 52ch;
    margin-bottom: 32px;
    letter-spacing: 0.01em;
}

.body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.8;
    color: var(--cream);
    max-width: 54ch;
    margin-bottom: 22px;
}

.body.quote {
    font-style: italic;
    color: var(--white-gold);
    padding-left: 18px;
    border-left: 1px solid var(--gold);
    font-weight: 600;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 22px;
}
.meta span {
    position: relative;
    padding-left: 14px;
}
.meta span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    background: var(--gold);
    transform: translateY(-50%) rotate(45deg);
    box-shadow: 0 0 6px var(--gold);
}

.chevron-row {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}
.chevron-row svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 0 4px rgba(212, 164, 74, 0.5));
}

/* =========================
   Right geometry panel
   ========================= */
.geo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 0 12px rgba(212, 164, 74, 0.3));
}

.geo-label {
    position: absolute;
    bottom: 48px;
    right: 48px;
    padding: 6px 12px;
    border: 1px solid rgba(212, 164, 74, 0.35);
    background: rgba(15, 13, 10, 0.72);
    z-index: 4;
    color: var(--white-gold);
}

.overlap-quote {
    position: absolute;
    top: 12%;
    left: -40px;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2vw, 2rem);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--cream);
    mix-blend-mode: difference;
    z-index: 6;
    max-width: 60%;
}

/* =========================
   Slide-reveal animation
   ========================= */
[data-reveal] {
    opacity: 0;
    transition: opacity 0.9s var(--ease-snap), transform 0.9s var(--ease-snap);
    will-change: transform, opacity;
}
[data-reveal="left"] { transform: translateX(-60px); }
[data-reveal="right"] { transform: translateX(60px); }

.split-section.in-view [data-reveal] {
    opacity: 1;
    transform: translateX(0);
}

/* stagger */
.split-section.in-view [data-reveal]:nth-child(1) { transition-delay: 0ms; }
.split-section.in-view [data-reveal]:nth-child(2) { transition-delay: 80ms; }
.split-section.in-view [data-reveal]:nth-child(3) { transition-delay: 160ms; }
.split-section.in-view [data-reveal]:nth-child(4) { transition-delay: 240ms; }
.split-section.in-view [data-reveal]:nth-child(5) { transition-delay: 320ms; }
.split-section.in-view [data-reveal]:nth-child(6) { transition-delay: 400ms; }

/* sunburst stroke draw */
.sunburst-rays circle,
.sunburst-lines line,
.sunburst-chevrons polyline,
#concentricArcs circle,
#concentricTicks line,
#diamondGrid line,
#horizonRays line,
#cipherGrid line,
#cipherZigzag polyline,
#finalSunburst line,
.divider-sun g line {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 1.4s var(--ease-snap);
}

.split-section.in-view .sunburst-rays circle,
.split-section.in-view .sunburst-lines line,
.split-section.in-view .sunburst-chevrons polyline,
.split-section.in-view #concentricArcs circle,
.split-section.in-view #concentricTicks line,
.split-section.in-view #diamondGrid line,
.split-section.in-view #horizonRays line,
.split-section.in-view #cipherGrid line,
.split-section.in-view #cipherZigzag polyline,
.split-section.in-view #finalSunburst line {
    stroke-dashoffset: 0;
}

/* =========================
   Section dividers
   ========================= */
.section-divider {
    position: relative;
    width: 100%;
    height: 120px;
    background: var(--bg-right);
    overflow: hidden;
}

.divider-sun {
    width: 100%;
    height: 100%;
    display: block;
}

.section-divider.in-view g line {
    stroke-dashoffset: 0;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 820px) {
    .split-section {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .split-section .half {
        width: 100% !important;
        height: 70vh;
        min-height: 520px;
    }
    .split-divider {
        display: none;
    }
    .left-content {
        position: relative;
        top: auto;
        left: 0 !important;
        right: 0;
        transform: none !important;
        padding: 80px 32px 40px;
        text-align: left;
    }
    .left-content.center { transform: none !important; text-align: center; }
    .display-title .line::before { width: 24px; margin-right: 10px; }
    .geo-label { bottom: 24px; right: 24px; }
    .cursor-trail { display: none; }
    html, body { cursor: auto; }
}
