/* ============================================================
   graphers.dev - Design Language Stylesheet
   1920s Parisian Cartography Salon - Maximalist Marble Canvas
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'DM Sans', sans-serif;
    color: #3b2314;
    background: #f5ede3;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
.domain-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(64px, 12vw, 120px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.0;
    color: #3b2314;
}

.title-dot {
    color: #c47832;
}

.title-dev {
    color: #8a9e7c;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(40px, 6vw, 80px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.0;
    color: #3b2314;
    margin-bottom: 48px;
}

.section-title-light {
    color: #f5ede3;
}

.body-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.7;
    color: #4a3728;
}

.mono-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a9e7c;
}

/* --- Plate Numerals --- */
.plate-numeral {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: #c47832;
    display: block;
    margin-bottom: 24px;
    text-align: center;
}

.plate-numeral-light {
    color: #e8b84a;
}

/* --- Full-Bleed Plate System --- */
.plate {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plate-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    padding: 80px 40px;
}

/* --- Marble Texture System (CSS-only) --- */
.marble-surface {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Layer 1: Base cream gradient */
    background:
        radial-gradient(ellipse at 30% 40%, #f5ede3 0%, #ede1d1 100%),
        /* Layer 2: Sage veins */
        repeating-linear-gradient(137deg, transparent, transparent 240px, rgba(138,158,124,0.08) 240px, rgba(138,158,124,0.04) 244px),
        /* Layer 3: Copper veins */
        repeating-linear-gradient(47deg, transparent, transparent 320px, rgba(196,120,50,0.05) 320px, rgba(196,120,50,0.02) 323px),
        /* Layer 4: Gilded glow pools */
        radial-gradient(ellipse at 70% 60%, rgba(232,184,74,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(232,184,74,0.04) 0%, transparent 40%);
    background-color: #f5ede3;
}

/* --- Dark Surface (for alternate plates) --- */
.dark-surface {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at 40% 30%, #3b2314 0%, #2b1a0e 100%),
        repeating-linear-gradient(137deg, transparent, transparent 240px, rgba(138,158,124,0.04) 240px, rgba(138,158,124,0.02) 244px),
        repeating-linear-gradient(47deg, transparent, transparent 320px, rgba(196,120,50,0.03) 320px, rgba(196,120,50,0.01) 323px);
    background-color: #2b1a0e;
}

/* --- Graph Paper Overlay --- */
.graph-paper-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image:
        linear-gradient(rgba(138,158,124,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(138,158,124,0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.graph-paper-dark {
    background-image:
        linear-gradient(rgba(138,158,124,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(138,158,124,0.05) 1px, transparent 1px);
}

/* --- Corner Ornaments --- */
.corner-ornament {
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: 4;
    pointer-events: none;
}

.corner-ornament::before,
.corner-ornament::after {
    content: '';
    position: absolute;
    background: #c47832;
}

.corner-tl { top: 24px; left: 24px; }
.corner-tr { top: 24px; right: 24px; }
.corner-bl { bottom: 24px; left: 24px; }
.corner-br { bottom: 24px; right: 24px; }

.corner-tl::before { width: 40px; height: 1px; top: 0; left: 0; }
.corner-tl::after { width: 1px; height: 40px; top: 0; left: 0; }

.corner-tr::before { width: 40px; height: 1px; top: 0; right: 0; }
.corner-tr::after { width: 1px; height: 40px; top: 0; right: 0; }

.corner-bl::before { width: 40px; height: 1px; bottom: 0; left: 0; }
.corner-bl::after { width: 1px; height: 40px; bottom: 0; left: 0; }

.corner-br::before { width: 40px; height: 1px; bottom: 0; right: 0; }
.corner-br::after { width: 1px; height: 40px; bottom: 0; right: 0; }

/* --- Ornament Lines --- */
.ornament-line {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c47832, transparent);
    margin: 32px auto;
}

/* ============================================================
   PLATE I - OPENING
   ============================================================ */
.plate-opening {
    min-height: 100vh;
}

.opening-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 0 40px;
}

.opening-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    font-weight: 400;
    color: #4a3728;
    margin-top: 24px;
    letter-spacing: 0.02em;
    font-style: italic;
}

.scroll-indicator {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, #c47832, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a9e7c;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================================
   PLATE II - MANIFESTO
   ============================================================ */
.manifesto-content {
    text-align: center;
}

.manifesto-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-top: 48px;
    text-align: left;
}

.manifesto-col {
    padding: 0 8px;
}

.manifesto-divider {
    margin-top: 64px;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

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

/* ============================================================
   PLATE III - ATLAS OF FORMS
   ============================================================ */
.atlas-content {
    text-align: center;
}

.atlas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.atlas-card {
    background: rgba(245,237,227,0.04);
    border: 1px solid rgba(196,120,50,0.2);
    border-radius: 2px;
    transition: border-color 0.4s ease, background 0.4s ease;
}

.atlas-card:hover {
    border-color: rgba(196,120,50,0.5);
    background: rgba(245,237,227,0.08);
}

.atlas-card-inner {
    padding: 36px 24px;
    text-align: center;
}

.atlas-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 24px;
}

.atlas-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: #f5ede3;
    margin-bottom: 12px;
}

.atlas-card-desc {
    color: #8a9e7c;
    line-height: 1.6;
}

/* ============================================================
   PLATE IV - INSTRUMENTS
   ============================================================ */
.instruments-content {
    text-align: center;
}

.instruments-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 64px;
    margin-top: 48px;
    text-align: left;
}

.instrument-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
}

.instrument-icon svg {
    width: 100%;
    height: 100%;
}

.instrument-title {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 700;
    color: #3b2314;
    margin-bottom: 16px;
}

.instrument-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #4a3728;
}

/* ============================================================
   PLATE V - PROCESS
   ============================================================ */
.process-content {
    text-align: center;
}

.process-timeline {
    position: relative;
    max-width: 700px;
    margin: 48px auto 0;
    text-align: left;
}

.timeline-line {
    position: absolute;
    left: 28px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, #c47832, rgba(196,120,50,0.2));
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    padding: 32px 0;
    position: relative;
}

.step-marker {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border: 1px solid #c47832;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2b1a0e;
    position: relative;
    z-index: 2;
}

.step-num {
    font-size: 14px;
    color: #e8b84a;
    letter-spacing: 0.05em;
}

.step-content {
    padding-top: 8px;
}

.step-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    color: #f5ede3;
    margin-bottom: 12px;
}

.step-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: rgba(245,237,227,0.7);
}

/* ============================================================
   PLATE VI - CLOSING
   ============================================================ */
.plate-closing {
    min-height: 100vh;
}

.closing-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 0 40px;
}

.closing-epigraph {
    font-family: 'Playfair Display', serif;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 400;
    font-style: italic;
    color: #3b2314;
    max-width: 700px;
    line-height: 1.4;
}

.closing-attribution {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: #8a9e7c;
    margin-top: 16px;
    margin-bottom: 80px;
}

.closing-domain {
    display: flex;
    align-items: center;
    gap: 24px;
}

.closing-glyph {
    font-size: 18px;
    color: #e8b84a;
}

.closing-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #3b2314;
}

.closing-tagline {
    margin-top: 24px;
    font-size: 14px;
}

.closing-year {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    letter-spacing: 0.3em;
    color: #d4a04a;
    opacity: 0.5;
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
[data-reveal] {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-reveal='fade-up'] {
    transform: translateY(30px);
}

[data-reveal='fade'] {
    transform: none;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0) !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .atlas-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .instruments-showcase {
        grid-template-columns: repeat(2, 1fr);
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .plate-content {
        padding: 60px 24px;
    }

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

    .atlas-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .instruments-showcase {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .corner-ornament {
        width: 40px;
        height: 40px;
    }

    .corner-tl::before, .corner-tr::before,
    .corner-bl::before, .corner-br::before {
        width: 24px;
    }

    .corner-tl::after, .corner-tr::after,
    .corner-bl::after, .corner-br::after {
        height: 24px;
    }

    .closing-domain {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .domain-title {
        font-size: 48px;
    }

    .section-title {
        font-size: 32px;
        margin-bottom: 32px;
    }
}