/* ============================================
   GGOGGL.com - Deco-Futurist Intelligence Systems
   Art Deco + Technical Monospace Command Center
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --bg-primary: #1C1917;
    --bg-elevated: #292524;
    --gold-primary: #C9A54E;
    --gold-secondary: #D4A843;
    --gold-muted: #8B7635;
    --text-primary: #F5F0E8;
    --text-secondary: #BFB5A3;
    --accent-warm: #C2703E;
    --accent-deep: #6B2D2D;

    --font-display: 'Poiret One', cursive;
    --font-secondary: 'Josefin Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

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

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: clamp(0.875rem, 1.1vw, 1.05rem);
    line-height: 1.85;
    letter-spacing: 0.02em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Grid Overlay (Fixed Background) --- */
#grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

#grid-svg {
    width: 100%;
    height: 100%;
}

/* --- Plate Base Styles --- */
.plate {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

/* --- Plate Numeral (ghosted background label) --- */
.plate-numeral {
    position: absolute;
    font-family: var(--font-display);
    font-size: 15vw;
    color: var(--gold-primary);
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    letter-spacing: 0.1em;
    user-select: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.plate-numeral.revealed {
    opacity: 0.04;
}

/* ============================================
   PLATE 1: HERO
   ============================================ */
.plate-hero {
    background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(201, 165, 78, 0.06) 0%, transparent 70%),
                var(--bg-primary);
}

/* Vertical lines flanking title */
.hero-lines {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-line {
    position: absolute;
    left: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--gold-primary), transparent);
    opacity: 0.15;
}

.hero-line-top {
    top: 0;
    height: 35%;
}

.hero-line-bottom {
    bottom: 0;
    height: 35%;
}

/* 3D Polyhedron */
.polyhedron-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    perspective: 1200px;
    z-index: 0;
    width: 350px;
    height: 350px;
}

.polyhedron {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: spin 60s linear infinite;
}

.face {
    position: absolute;
    width: 120px;
    height: 120px;
    top: 50%;
    left: 50%;
    margin-top: -60px;
    margin-left: -60px;
    background: linear-gradient(135deg, #8B7635, #C9A54E);
    opacity: 0.3;
    border: 1px solid var(--gold-primary);
    backface-visibility: visible;
}

/* Dodecahedron-like face rotations */
.face-1  { transform: rotateY(0deg) translateZ(150px); }
.face-2  { transform: rotateY(60deg) translateZ(150px); }
.face-3  { transform: rotateY(120deg) translateZ(150px); }
.face-4  { transform: rotateY(180deg) translateZ(150px); }
.face-5  { transform: rotateY(240deg) translateZ(150px); }
.face-6  { transform: rotateY(300deg) translateZ(150px); }
.face-7  { transform: rotateX(90deg) translateZ(150px); }
.face-8  { transform: rotateX(-90deg) translateZ(150px); }
.face-9  { transform: rotateX(45deg) rotateY(45deg) translateZ(150px); }
.face-10 { transform: rotateX(-45deg) rotateY(45deg) translateZ(150px); }
.face-11 { transform: rotateX(45deg) rotateY(-45deg) translateZ(150px); }
.face-12 { transform: rotateX(-45deg) rotateY(-45deg) translateZ(150px); }

@keyframes spin {
    0%   { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* Hero Title */
.hero-title {
    position: relative;
    z-index: 2;
    font-family: var(--font-display);
    font-size: clamp(4rem, 10vw, 12rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-primary);
    text-align: center;
    opacity: 0;
    transition: opacity 800ms ease-out, letter-spacing 800ms ease-out;
}

.hero-title.revealed {
    opacity: 1;
    letter-spacing: 0.15em;
}

/* Hero Subtitle */
.hero-subtitle {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    opacity: 0;
    transition: opacity 800ms ease-out 400ms;
}

.hero-subtitle.revealed {
    opacity: 1;
}

.subtitle-text {
    font-family: var(--font-secondary);
    font-weight: 300;
    font-size: clamp(0.9rem, 1.5vw, 1.3rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-muted);
    white-space: nowrap;
}

.parallel-rule {
    display: block;
    width: 60px;
    height: 5px;
    position: relative;
}

.parallel-rule::before,
.parallel-rule::after,
.parallel-rule span {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gold-muted);
}

.parallel-rule::before {
    top: 0;
    opacity: 0.6;
}

.parallel-rule::after {
    bottom: 0;
    opacity: 0.6;
}

/* ============================================
   DECO DIVIDERS
   ============================================ */
.deco-divider {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 800px;
    height: 60px;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 600ms ease-out;
}

.deco-divider.revealed {
    opacity: 1;
}

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

/* ============================================
   PLATE 2: STATEMENT
   ============================================ */
.plate-statement {
    background: var(--bg-primary);
    padding: 4rem 2rem;
}

.statement-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.statement-line {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    line-height: 2.2;
    color: var(--text-primary);
    letter-spacing: 0.03em;
    opacity: 0;
    transition: opacity 400ms ease-out;
}

.statement-line.revealed {
    opacity: 1;
}

/* ============================================
   PLATE 3: FEATURES (Stepped Diagonal)
   ============================================ */
.plate-features {
    background: var(--bg-primary);
    padding: 6rem 2rem;
    min-height: 100vh;
}

.features-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding: 2rem;
}

.feature-block {
    position: relative;
    max-width: 420px;
    padding: 2.5rem 2.5rem 2.5rem 2.5rem;
    background: var(--bg-elevated);
    border-top: 1px solid var(--gold-primary);
    border-left: 1px solid var(--gold-primary);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 700ms ease-out, transform 700ms ease-out;
}

.feature-block.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stepped diagonal offset */
.feature-block-1 {
    align-self: flex-start;
    margin-left: 0;
}

.feature-block-2 {
    align-self: flex-start;
    margin-left: calc(2 * (100% / 12) + 80px);
    margin-top: -20px;
}

.feature-block-3 {
    align-self: flex-start;
    margin-left: calc(4 * (100% / 12) + 160px);
    margin-top: -20px;
}

/* Corner ornaments */
.feature-corner-tl,
.feature-corner-br {
    position: absolute;
    width: 16px;
    height: 16px;
}

.feature-corner-tl {
    top: -1px;
    left: -1px;
}

.feature-corner-tl::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 7px;
    width: 4px;
    height: 4px;
    background: var(--gold-primary);
    opacity: 0.5;
    transform: rotate(45deg);
}

.feature-corner-br {
    bottom: -1px;
    right: -1px;
}

.feature-corner-br::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 4px;
    height: 4px;
    border-right: 1px solid var(--gold-muted);
    border-bottom: 1px solid var(--gold-muted);
    opacity: 0.3;
}

.feature-heading {
    font-family: var(--font-secondary);
    font-weight: 300;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-primary);
    margin-bottom: 1.2rem;
}

.feature-text {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    line-height: 1.85;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

/* ============================================
   PLATE 4: DEEP CONTENT (Editorial Layout)
   ============================================ */
.plate-deep {
    background: var(--bg-primary);
    padding: 6rem 2rem;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.deep-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 3fr 8fr;
    gap: 3rem;
}

/* Annotations (left column) */
.deep-annotations {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding-top: 4rem;
}

.annotation {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.annotation.revealed {
    opacity: 1;
    transform: translateX(0);
}

.annotation-label {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gold-primary);
    letter-spacing: 0.05em;
    background: rgba(201, 165, 78, 0.08);
    display: inline-block;
    padding: 0.15rem 0.5rem;
    width: fit-content;
}

.annotation-text {
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: 0.8rem;
    color: var(--gold-muted);
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.deco-glyph {
    width: 60px;
    height: 60px;
    opacity: 0;
    transition: opacity 800ms ease-out;
}

.deco-glyph.revealed {
    opacity: 1;
}

/* Main editorial content (right column) */
.deep-content {
    padding-left: 2rem;
    border-left: 1px solid rgba(201, 165, 78, 0.12);
}

.deep-heading {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 3rem;
    opacity: 0;
    transition: opacity 800ms ease-out, letter-spacing 800ms ease-out;
}

.deep-heading.revealed {
    opacity: 1;
    letter-spacing: 0.15em;
}

.deep-body {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.deep-body p {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: clamp(0.875rem, 1.1vw, 1.05rem);
    line-height: 1.85;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    opacity: 0;
    transition: opacity 400ms ease-out;
}

.deep-body p.revealed {
    opacity: 1;
}

/* ============================================
   PLATE 5: CLOSING
   ============================================ */
.plate-closing {
    background: var(--bg-primary);
    padding: 6rem 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Increase ornamental density on final plate */
.plate-closing .plate-numeral.revealed {
    opacity: 0.06;
}

.closing-arch {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    max-width: 90vw;
    z-index: 0;
}

.arch-svg {
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 1200ms ease-out;
}

.arch-svg.revealed {
    opacity: 1;
}

.closing-content {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.closing-tagline {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-primary);
    line-height: 1.4;
    opacity: 0;
    transition: opacity 800ms ease-out, letter-spacing 800ms ease-out;
}

.closing-tagline.revealed {
    opacity: 1;
    letter-spacing: 0.15em;
}

/* Decorative rule with diamond */
.closing-rule {
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 600ms ease-out;
}

.closing-rule.revealed {
    opacity: 1;
}

.rule-line {
    display: block;
    width: 80px;
    height: 1px;
    background: var(--gold-primary);
    opacity: 0.4;
}

.rule-diamond {
    display: block;
    width: 8px;
    height: 8px;
    background: var(--gold-primary);
    opacity: 0.5;
    transform: rotate(45deg);
}

.closing-domain {
    font-family: var(--font-secondary);
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.5rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold-muted);
    opacity: 0;
    transition: opacity 600ms ease-out 300ms;
}

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

/* Corner ornaments on closing plate */
.closing-ornaments {
    position: absolute;
    bottom: 3rem;
    left: 3rem;
    right: 3rem;
    height: 40px;
    pointer-events: none;
}

.corner-ornament {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0;
    transition: opacity 800ms ease-out;
}

.corner-ornament.revealed {
    opacity: 1;
}

.corner-bl {
    left: 0;
    bottom: 0;
}

.corner-br {
    right: 0;
    bottom: 0;
}

/* ============================================
   FADE-REVEAL ANIMATION CLASSES
   ============================================ */
.fade-reveal {
    opacity: 0;
    transition: opacity 800ms ease-out;
}

.fade-reveal.revealed {
    opacity: 1;
}

/* Heading specific: letter-spacing tightens */
.hero-title.fade-reveal {
    letter-spacing: 0.3em;
}

.hero-title.fade-reveal.revealed {
    letter-spacing: 0.15em;
}

.deep-heading.fade-reveal {
    letter-spacing: 0.3em;
}

.deep-heading.fade-reveal.revealed {
    letter-spacing: 0.15em;
}

.closing-tagline.fade-reveal {
    letter-spacing: 0.3em;
}

.closing-tagline.fade-reveal.revealed {
    letter-spacing: 0.15em;
}

/* Gold border extend animation */
.feature-block {
    border-top-color: transparent;
    border-left-color: transparent;
}

.feature-block.revealed {
    border-top-color: var(--gold-primary);
    border-left-color: var(--gold-primary);
    transition: opacity 700ms ease-out, transform 700ms ease-out, border-top-color 600ms ease-out, border-left-color 600ms ease-out 200ms;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 1024px) {
    .deep-container {
        grid-template-columns: 1fr;
    }

    .deep-annotations {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem;
        padding-top: 0;
        margin-bottom: 2rem;
    }

    .annotation {
        flex: 1 1 200px;
    }

    .deep-content {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(201, 165, 78, 0.12);
        padding-top: 2rem;
    }
}

@media (max-width: 768px) {
    .feature-block-1,
    .feature-block-2,
    .feature-block-3 {
        margin-left: 0;
        margin-top: 2rem;
        max-width: 100%;
    }

    .feature-block-2 {
        margin-left: 2rem;
    }

    .feature-block-3 {
        margin-left: 4rem;
    }

    .polyhedron-container {
        width: 250px;
        height: 250px;
    }

    .face {
        width: 90px;
        height: 90px;
        margin-top: -45px;
        margin-left: -45px;
    }

    .face-1  { transform: rotateY(0deg) translateZ(110px); }
    .face-2  { transform: rotateY(60deg) translateZ(110px); }
    .face-3  { transform: rotateY(120deg) translateZ(110px); }
    .face-4  { transform: rotateY(180deg) translateZ(110px); }
    .face-5  { transform: rotateY(240deg) translateZ(110px); }
    .face-6  { transform: rotateY(300deg) translateZ(110px); }
    .face-7  { transform: rotateX(90deg) translateZ(110px); }
    .face-8  { transform: rotateX(-90deg) translateZ(110px); }
    .face-9  { transform: rotateX(45deg) rotateY(45deg) translateZ(110px); }
    .face-10 { transform: rotateX(-45deg) rotateY(45deg) translateZ(110px); }
    .face-11 { transform: rotateX(45deg) rotateY(-45deg) translateZ(110px); }
    .face-12 { transform: rotateX(-45deg) rotateY(-45deg) translateZ(110px); }

    .hero-subtitle {
        flex-direction: column;
        gap: 0.5rem;
    }

    .parallel-rule {
        width: 40px;
    }

    .closing-ornaments {
        left: 1.5rem;
        right: 1.5rem;
        bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .feature-block-2 {
        margin-left: 1rem;
    }

    .feature-block-3 {
        margin-left: 2rem;
    }

    .deep-annotations {
        flex-direction: column;
    }

    .annotation {
        flex: 1 1 100%;
    }
}
