/* PPSS.ee — Inflated-3D Chrome Metallic Aesthetic */

/* ================================================================
   RESET
================================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ================================================================
   ROOT VARIABLES
   Reference aesthetic: inflated Helvetica logos (1995–2003 era)
   Fonts: Bagel Fat One (Google Fonts), Climate Crisis (Google Fonts),
          Familjen Grotesk (Google Fonts), JetBrains Mono (Google Fonts)
   Lottie zipper dividers use `IntersectionObserver` at 30% threshold
================================================================ */
:root {
    --bg:              #ECEAE5;
    --chrome-hi:       #F5F5F7;
    --chrome-mid:      #C9CCD1;
    --chrome-shadow:   #4A4D52;
    --chrome-obsidian: #16181C;
    --tangerine:       #FF6A1F;
    --cherry:          #E91548;
    --chartreuse:      #C7F050;
    --chrome-gradient: linear-gradient(160deg,
        #F5F5F7 0%,
        #C9CCD1 28%,
        #4A4D52 52%,
        #C9CCD1 78%,
        #F5F5F7 100%
    );
    --chrome-shadow-box: 0 8px 0 rgba(22,24,28,0.22);
    --font-display:   'Bagel Fat One', cursive;
    --font-headline:  'Climate Crisis', sans-serif;
    --font-body:      'Familjen Grotesk', sans-serif;
    --font-mono:      'JetBrains Mono', monospace;
}

/* ================================================================
   BASE
================================================================ */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: #ECEAE5;
    font-family: 'Familjen Grotesk', Helvetica, sans-serif;
    color: #16181C;
    overflow-x: hidden;
    cursor: none;
}

/* ================================================================
   CURSOR COMPANION BEAN
================================================================ */
#bean {
    position: fixed;
    width: 36px;
    height: 24px;
    border-radius: 50% / 70%;
    background: var(--chrome-gradient);
    box-shadow: var(--chrome-shadow-box), inset 0 -4px 0 rgba(255,255,255,0.4);
    pointer-events: none;
    z-index: 9999;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    transition: transform 0.05s ease;
}

#bean::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 6px;
    width: 14px;
    height: 6px;
    background: white;
    border-radius: 50%;
    opacity: 0.85;
    filter: blur(0.8px);
}

/* ================================================================
   ENTRY OVERLAY
================================================================ */
#entry-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8888;
    background: #ECEAE5;
    pointer-events: none;
    animation: overlayFade 1.2s ease 0.8s forwards;
}

@keyframes overlayFade {
    0%   { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

#entry-sphere {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--chrome-gradient);
    box-shadow:
        0 0 40px rgba(201,204,209,0.5),
        var(--chrome-shadow-box);
    animation: sphereInflate 0.8s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

@keyframes sphereInflate {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* ================================================================
   WORDMARK CORNER
================================================================ */
#wordmark-corner {
    position: fixed;
    top: 24px;
    left: 32px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: var(--chrome-shadow);
    z-index: 1000;
    mix-blend-mode: multiply;
}

/* ================================================================
   TABLEAU BASE
================================================================ */
.tableau {
    position: relative;
    min-height: 100vh;
    padding: 12vh 8vw;
    overflow: hidden;
}

/* ================================================================
   BLUEPRINT BACKGROUNDS
================================================================ */
.blueprint-bg {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    pointer-events: none;
    z-index: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 0 L60 0 M0 0 L0 60' stroke='%234A4D52' stroke-width='0.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

.blueprint-circuit {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M20 20 L60 20 L60 60 L100 60' stroke='%234A4D52' stroke-width='0.8' fill='none'/%3E%3Ccircle cx='20' cy='20' r='3' fill='%234A4D52'/%3E%3Ccircle cx='100' cy='60' r='3' fill='%234A4D52'/%3E%3Ccircle cx='60' cy='60' r='2' fill='none' stroke='%234A4D52' stroke-width='0.8'/%3E%3Cpath d='M0 80 L40 80 L40 40 L80 40' stroke='%234A4D52' stroke-width='0.5' fill='none'/%3E%3Cpath d='M90 10 L90 50 L110 50' stroke='%234A4D52' stroke-width='0.5' fill='none'/%3E%3C/svg%3E");
}

.blueprint-grid {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M40 0 L0 0 L0 40' stroke='%234A4D52' stroke-width='0.4' fill='none'/%3E%3Ccircle cx='0' cy='0' r='1.5' fill='%234A4D52'/%3E%3C/svg%3E");
}

.blueprint-wave {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='60'%3E%3Cpath d='M0 30 Q25 10 50 30 Q75 50 100 30 Q125 10 150 30 Q175 50 200 30' stroke='%234A4D52' stroke-width='0.7' fill='none'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* ================================================================
   GLYPH CONFETTI
================================================================ */
.glyph-confetti {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    color: var(--chrome-shadow);
    background: var(--chrome-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.55;
    pointer-events: none;
    z-index: 1;
    user-select: none;
}

/* ================================================================
   CHROME OBJECTS
================================================================ */
.chrome-object {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    filter: drop-shadow(0 8px 0 rgba(22,24,28,0.22))
            drop-shadow(0 0 24px rgba(255,106,31,0.08));
    will-change: transform;
}

#chrome-paperclip {
    top: 8vh;
    right: 6vw;
    width: clamp(120px, 14vw, 260px);
    height: auto;
}

.chrome-right {
    top: 15vh;
    right: 8vw;
}

.chrome-left {
    top: 10vh;
    left: 6vw;
}

.chrome-center-float {
    bottom: 18vh;
    right: 10vw;
}

/* collage objects in tableau 5 */
.collage-strip {
    position: absolute;
    top: 10vh;
    left: 0;
    right: 0;
    display: flex;
    gap: 6vw;
    align-items: flex-start;
    padding: 0 6vw;
    pointer-events: none;
    z-index: 3;
}

.chrome-collage-1 {
    position: relative;
    transform: rotate(-12deg);
}

.chrome-collage-2 {
    position: relative;
    transform: rotate(8deg);
    margin-top: 40px;
}

/* ================================================================
   HERO SECTION
================================================================ */
#tableau-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ECEAE5;
}

.hero-center {
    position: relative;
    z-index: 5;
    text-align: center;
    margin-top: 10vh;
}

/* Wordmark letters as inflated chrome */
.wordmark-letters {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: clamp(4px, 1vw, 20px);
    width: min(92vw, 1400px);
    margin: 0 auto;
}

.letter-chrome {
    font-family: 'Bagel Fat One', cursive;
    font-size: clamp(120px, 22vw, 360px);
    font-weight: 400;
    line-height: 0.85;
    background: linear-gradient(160deg,
        #F5F5F7 0%,
        #C9CCD1 28%,
        #4A4D52 52%,
        #C9CCD1 78%,
        #F5F5F7 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 12px 0 rgba(22,24,28,0.18));
    animation: breathe 6s ease-in-out infinite;
    display: inline-block;
    user-select: none;
    text-shadow: none;
}

.letter-chrome:nth-child(2) { animation-delay: -1.5s; }
.letter-chrome:nth-child(3) { animation-delay: -3s; }
.letter-chrome:nth-child(4) { animation-delay: -4.5s; }

@keyframes breathe {
    0%,  100% { transform: scale(1); }
    50%       { transform: scale(1.025); }
}

.hero-tagline {
    font-family: 'Climate Crisis', sans-serif;
    font-variation-settings: 'YOPQ' 96;
    font-weight: 500;
    font-size: clamp(16px, 2vw, 28px);
    color: var(--chrome-shadow);
    letter-spacing: -0.03em;
    margin-top: clamp(16px, 3vh, 40px);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ================================================================
   ZIPPER DIVIDERS
================================================================ */
.zipper-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 24px;
    z-index: 10;
    overflow: hidden;
}

.zipper-divider svg {
    width: 100%;
    height: 100%;
}

/* ================================================================
   TABLEAU CONTENT AREAS
================================================================ */
.tableau-content {
    position: relative;
    z-index: 5;
}

.left-lean {
    margin-left: 12vw;
    max-width: 580px;
    padding-top: 16vh;
}

.right-lean {
    margin-left: auto;
    margin-right: 10vw;
    max-width: 580px;
    padding-top: 16vh;
    text-align: right;
}

.center-stack {
    max-width: 580px;
    margin: 0 auto;
    padding-top: 14vh;
    text-align: center;
}

.final-content {
    margin-left: 12vw;
    max-width: 580px;
    padding-top: 44vh;
}

/* ================================================================
   SECTION HEADLINES
================================================================ */
.section-headline {
    font-family: 'Climate Crisis', sans-serif;
    font-variation-settings: 'YOPQ' 96;
    font-size: clamp(48px, 7vw, 96px);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--chrome-obsidian);
    margin-bottom: clamp(20px, 3vh, 40px);
}

.center-text {
    text-align: center;
}

/* ================================================================
   BODY TEXT
================================================================ */
.section-body {
    font-family: 'Familjen Grotesk', sans-serif;
    font-weight: 500;
    font-size: 19px;
    line-height: 1.55;
    color: var(--chrome-obsidian);
    max-width: 580px;
    margin-bottom: 16px;
}

/* ================================================================
   CAPTION / MICROCOPY
================================================================ */
.caption-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #6E6E73;
    margin-top: 12px;
    margin-bottom: 6px;
}

/* ================================================================
   CHROME TEXT ACCENT
================================================================ */
.chrome-text {
    background: var(--chrome-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================================================
   CONTACT BLOCK
================================================================ */
.contact-block {
    margin-top: 32px;
    padding: 20px 24px;
    border: 1px solid rgba(74, 77, 82, 0.2);
    border-radius: 4px;
    background: rgba(245, 245, 247, 0.4);
    text-align: left;
    display: inline-block;
}

.contact-link {
    background: var(--chrome-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: none;
}

/* ================================================================
   WET CHERRY DOTS
================================================================ */
.cherry-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #E91548;
    border-radius: 50%;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    z-index: 6;
}

/* per-tableau cherry positions */
#tableau-hero .cherry-dot { bottom: 8vh; right: 20vw; }
.cherry-top-right         { top: 8vh; right: 6vw; }
.cherry-mid-left          { top: 50vh; left: 8vw; }
.cherry-bottom-center     { bottom: 12vh; left: 50%; transform: translateX(-50%); }
.cherry-final             { top: 20vh; right: 12vw; }

/* ================================================================
   MARBLE ORBIT
================================================================ */
.marble-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}

.marble {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--chrome-gradient);
    box-shadow: var(--chrome-shadow-box);
}

.marble::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 6px;
    width: 10px;
    height: 5px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    filter: blur(0.5px);
}

.m1 { animation: orbit1 12s linear infinite; }
.m2 { animation: orbit2 12s linear infinite; animation-delay: -4s; }
.m3 { animation: orbit3 12s linear infinite; animation-delay: -8s; }

@keyframes orbit1 {
    0%   { transform: rotate(0deg)   translateX(80px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(80px) rotate(-360deg); }
}
@keyframes orbit2 {
    0%   { transform: rotate(0deg)   translateX(90px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(90px) rotate(-360deg); }
}
@keyframes orbit3 {
    0%   { transform: rotate(0deg)   translateX(70px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(70px) rotate(-360deg); }
}

/* ================================================================
   CHROME ORBS (navigation)
================================================================ */
.orb-field {
    position: absolute;
    top: 50%;
    right: 8vw;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 32px;
    z-index: 6;
}

.chrome-orb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--chrome-gradient);
    border: none;
    cursor: none;
    box-shadow: var(--chrome-shadow-box), inset 0 -6px 0 rgba(255,255,255,0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chrome-orb::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 14px;
    width: 24px;
    height: 12px;
    background: white;
    border-radius: 50%;
    opacity: 0.75;
    filter: blur(0.8px);
}

.chrome-orb:hover {
    background: linear-gradient(200deg,
        #F5F5F7 0%,
        #C9CCD1 28%,
        #4A4D52 52%,
        #C9CCD1 78%,
        #F5F5F7 100%
    );
    transform: translateY(-3px);
    box-shadow: 0 12px 0 rgba(22,24,28,0.22), inset 0 -6px 0 rgba(255,255,255,0.3);
}

.chrome-orb:active {
    transform: translateY(4px);
    box-shadow: none;
}

.orb-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: lowercase;
    letter-spacing: 0.12em;
    color: var(--chrome-obsidian);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* ================================================================
   INFLATE BUTTON
================================================================ */
.inflate-btn {
    display: inline-block;
    margin-top: 32px;
    padding: 18px 36px;
    border-radius: 999px;
    background: var(--chrome-gradient);
    border: none;
    cursor: none;
    font-family: 'Familjen Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--chrome-obsidian);
    letter-spacing: 0.02em;
    box-shadow: var(--chrome-shadow-box), inset 0 -4px 0 rgba(255,255,255,0.5);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}

.inflate-btn:hover {
    background: linear-gradient(200deg,
        #F5F5F7 0%,
        #C9CCD1 28%,
        #4A4D52 52%,
        #C9CCD1 78%,
        #F5F5F7 100%
    );
    transform: translateY(-2px);
    box-shadow: 0 12px 0 rgba(22,24,28,0.22), inset 0 -4px 0 rgba(255,255,255,0.5);
}

.inflate-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

/* ================================================================
   TABLEAU-SPECIFIC BACKGROUNDS & TINTS
================================================================ */
.tableau-2 { background: #ECEAE5; }
.tableau-3 { background: #ECEAE5; }
.tableau-4 { background: #ECEAE5; }
.tableau-5 { background: #ECEAE5; min-height: 100vh; }

/* Chrome band separators between sections */
.tableau::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--chrome-gradient);
    z-index: 10;
}

#tableau-hero::before { display: none; }

/* ================================================================
   SCROLL PARALLAX VARIABLES
================================================================ */
.chrome-object {
    --scroll: 0;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 900px) {
    .left-lean, .right-lean, .final-content {
        margin-left: 5vw;
        margin-right: 5vw;
        max-width: 100%;
        text-align: left;
    }

    .right-lean {
        text-align: left;
    }

    .orb-field {
        flex-direction: row;
        top: auto;
        bottom: 5vh;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .collage-strip {
        top: 6vh;
    }

    .final-content {
        padding-top: 52vh;
    }

    .chrome-right, .chrome-left, .chrome-center-float {
        opacity: 0.5;
        width: clamp(80px, 15vw, 160px);
    }

    #chrome-paperclip {
        width: clamp(80px, 15vw, 160px);
    }
}

@media (max-width: 600px) {
    body { cursor: auto; }
    #bean { display: none; }
    .letter-chrome { font-size: clamp(72px, 22vw, 180px); }
    .section-headline { font-size: clamp(36px, 10vw, 64px); }
    .section-body { font-size: 16px; }
    .tableau { padding: 10vh 6vw; }
    .left-lean, .right-lean, .final-content { padding-top: 10vh; }
    .final-content { padding-top: 42vh; }
}
