/* GGOGGL.com - Design System
   ============================
   Aesthetic: muji + abstract-tech + zen-contemplative
   Palette:
     --burgundy-noir  #4A0E1B
     --burgundy-core  #722F37
     --burgundy-blush #A2555A
     --cream-base     #F5F0EB
     --cream-deep     #E8DDD3
     --charcoal-warm  #2C2826
     --accent-terracotta #C4856A
     --accent-sage    #7A8B7E
     --error-carmine  #D4243B
   Fonts: Space Grotesk (headings), Inter (body), Cormorant Garamond (accent),
          IBM Plex Mono (monospace/nav)
*/

:root {
    --burgundy-noir: #4A0E1B;
    --burgundy-core: #722F37;
    --burgundy-blush: #A2555A;
    --cream-base: #F5F0EB;
    --cream-deep: #E8DDD3;
    --charcoal-warm: #2C2826;
    --accent-terracotta: #C4856A;
    --accent-sage: #7A8B7E;
    --error-carmine: #D4243B;

    --type-scale: 1.333;
    --space-unit: 1rem;
    --transition-contemplative: 800ms cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-nav: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--cream-base);
}

body {
    background-color: var(--cream-base);
    color: var(--charcoal-warm);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-optical-sizing: auto;
    line-height: 1.72;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

::selection {
    background-color: var(--accent-terracotta);
    color: var(--cream-base);
}

::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: var(--cream-base);
}
::-webkit-scrollbar-thumb {
    background: var(--burgundy-core);
    border-radius: 2px;
}

/* ==========================================
   Scroll progress indicator
   ========================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background-color: var(--burgundy-core);
    z-index: 200;
    transition: width 0.08s linear;
}

/* ==========================================
   Dot-grid texture
   ========================================== */
.dot-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(var(--cream-deep) 1.2px, transparent 1.2px);
    background-size: 48px 48px;
    background-position: 0 0;
    opacity: 0.55;
}

/* ==========================================
   Circuit trace - fixed full-viewport layer
   ========================================== */
.circuit-trace {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2;
    opacity: 0.2;
}

.circuit-path {
    fill: none;
    stroke: var(--burgundy-core);
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ==========================================
   Watermark double-G
   ========================================== */
.watermark {
    position: fixed;
    right: -40px;
    bottom: -40px;
    width: 540px;
    height: 540px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.08;
}
.watermark svg {
    width: 100%;
    height: 100%;
}

/* ==========================================
   Navigation - orb upper right
   ========================================== */
.nav-orb {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    z-index: 100;
}

.nav-trigger {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--burgundy-core);
    border: 1.5px solid var(--burgundy-core);
    cursor: pointer;
    transition: var(--transition-nav);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.nav-orb.on-burgundy .nav-trigger {
    background-color: var(--cream-base);
    border-color: var(--cream-base);
}
.nav-dot {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--cream-base);
    transition: var(--transition-nav);
}
.nav-orb.on-burgundy .nav-dot {
    background-color: var(--burgundy-core);
}

.nav-links {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%) scale(0.8);
    list-style: none;
    pointer-events: none;
    opacity: 0;
    transition: var(--transition-nav);
    width: 320px;
    height: 320px;
}
.nav-links li {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}
.nav-links a {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    color: var(--cream-base);
    text-decoration: none;
    background-color: var(--burgundy-core);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: inline-block;
}
.nav-links a:hover {
    background-color: var(--burgundy-noir);
    color: var(--accent-terracotta);
}

.nav-orb.expanded .nav-trigger {
    transform: scale(6);
    border-radius: 40%;
    background-color: var(--burgundy-noir);
    border-color: var(--burgundy-noir);
    opacity: 0.96;
}
.nav-orb.expanded .nav-dot {
    opacity: 0;
}
.nav-orb.expanded .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translate(50%, -50%) scale(1);
    transition-delay: 0.25s;
}

/* Distribute links in radial arrangement */
.nav-links li:nth-child(1) { transform: translate(-50%, -50%) translate(0, -110px); }
.nav-links li:nth-child(2) { transform: translate(-50%, -50%) translate(-105px, -34px); }
.nav-links li:nth-child(3) { transform: translate(-50%, -50%) translate(-65px, 90px); }
.nav-links li:nth-child(4) { transform: translate(-50%, -50%) translate(65px, 90px); }
.nav-links li:nth-child(5) { transform: translate(-50%, -50%) translate(105px, -34px); }

/* ==========================================
   Zones - base
   ========================================== */
.zone {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    padding: clamp(4rem, 12vh, 10rem) clamp(2rem, 8vw, 10rem);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.zone-inner {
    max-width: 1280px;
    width: 100%;
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 2rem;
    row-gap: clamp(4rem, 12vh, 10rem);
}

.zone-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--burgundy-core);
    opacity: 0.75;
}
.zone-header .zone-index {
    color: var(--accent-terracotta);
}
.zone-4 .zone-header,
.zone-2 .zone-header,
.zone-5 .zone-header {
    color: var(--burgundy-core);
}

/* ==========================================
   Zone 1 - Arrival (burgundy noir + cream text)
   ========================================== */
.zone-1 {
    background-color: var(--burgundy-noir);
    color: var(--cream-base);
    min-height: 100vh;
    text-align: center;
    padding: 10vh 8vw;
    justify-content: center;
}
.zone-1 .zone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    max-width: 900px;
}

.arrival-meta {
    display: flex;
    gap: 1rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--cream-base);
    opacity: 0.5;
}
.arrival-meta .zone-index {
    color: var(--accent-terracotta);
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 13vw, 11rem);
    color: var(--cream-base);
    letter-spacing: -0.03em;
    line-height: 0.95;
    position: relative;
}
.stutter-letter {
    display: inline-block;
    position: relative;
}
.stutter-echo {
    opacity: 0.32;
    margin-left: -0.18em;
    color: var(--burgundy-blush);
}

.hero-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    color: var(--cream-base);
    opacity: 0.7;
    letter-spacing: 0.02em;
}

.hero-node {
    width: 16px;
    height: 16px;
    background-color: var(--accent-terracotta);
    border-radius: 50%;
    margin-top: 1rem;
    animation: breathe 4s ease-in-out infinite;
    opacity: 0.7;
}

.breathing-node {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--burgundy-core);
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(0.95); opacity: 0.6; }
    50% { transform: scale(1.05); opacity: 1; }
}

.breath-indicator {
    margin-top: 6vh;
    cursor: pointer;
    animation: breathBounce 3.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    opacity: 0.6;
}
@keyframes breathBounce {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(10px); opacity: 0.3; }
}

/* ==========================================
   Divider trace
   ========================================== */
.divider-trace {
    width: 100%;
    height: 60px;
    display: block;
    position: relative;
    z-index: 3;
    opacity: 0.45;
    padding: 0 clamp(2rem, 8vw, 10rem);
}
.divider-trace svg {
    width: 100%;
    height: 100%;
    display: block;
}
.divider-path {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.divider-trace.active .divider-path {
    stroke-dashoffset: 0;
}

/* ==========================================
   Zone 2 - Unfolding (cream, F-top)
   ========================================== */
.zone-2 {
    background-color: var(--cream-base);
    min-height: 120vh;
    padding-top: 18vh;
    padding-bottom: 18vh;
}
.zone-2 .zone-inner {
    grid-template-columns: repeat(12, 1fr);
}

.f-top-grid {
    grid-column: 1 / span 9;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 6rem;
    align-items: center;
}

.content-block {
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: var(--accent-terracotta);
    display: block;
}

.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(2.2rem, 4.4vw, 4rem);
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--burgundy-noir);
}
.zone-1 .section-heading,
.zone-4 .section-heading {
    color: var(--burgundy-noir);
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.05vw, 1.15rem);
    line-height: 1.72;
    color: var(--charcoal-warm);
    max-width: 520px;
}
.body-text em {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    color: var(--burgundy-core);
}
.body-text-secondary {
    color: var(--burgundy-core);
    opacity: 0.75;
}

.illustration-container {
    width: 100%;
    max-width: 420px;
    justify-self: end;
    position: relative;
}
.illustration {
    width: 100%;
    height: auto;
    display: block;
}

.draw-line {
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.draw-line.animated {
    stroke-dashoffset: 0;
}
.stutter-line {
    transition-delay: 0.3s;
}
.node-dot {
    opacity: 0;
    transition: opacity 0.8s ease 0.5s;
}
.node-dot.animated {
    opacity: 1;
}
.pulse-node.animated {
    animation: breathe 4s ease-in-out infinite;
}
.center-node.animated {
    animation: breathe 4s ease-in-out infinite;
}
.waveform {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.waveform.animated {
    stroke-dashoffset: 0;
}

/* ==========================================
   Zone 3 - Pause (toasted cream, centered quote)
   ========================================== */
.zone-3 {
    background-color: var(--cream-deep);
    min-height: 100vh;
    padding-top: 18vh;
    padding-bottom: 18vh;
    justify-content: center;
    text-align: center;
}
.zone-3 .zone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(3rem, 8vh, 8rem);
    max-width: 820px;
}

.quote-block {
    text-align: center;
    padding: 0 2rem;
}
.accent-quote {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.8rem, 4.5vw, 3.5rem);
    line-height: 1.35;
    color: var(--burgundy-noir);
    letter-spacing: -0.005em;
}
.accent-quote em {
    color: var(--burgundy-core);
}
.quote-mark {
    display: inline;
    font-size: 1.3em;
    color: var(--accent-terracotta);
    opacity: 0.45;
    line-height: 0;
    vertical-align: -0.08em;
}
.quote-cite {
    display: block;
    margin-top: 2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: lowercase;
    color: var(--accent-sage);
    font-style: normal;
}

.empty-region {
    width: min(460px, 90%);
    height: 120px;
    border: 1px dashed rgba(114, 47, 55, 0.25);
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.4s ease, background-color 0.4s ease;
    cursor: crosshair;
}
.empty-region:hover {
    border-color: rgba(212, 36, 59, 0.45);
    background-color: rgba(212, 36, 59, 0.03);
}
.empty-hint {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: var(--burgundy-core);
    opacity: 0.35;
    transition: opacity 0.4s ease;
}
.empty-region:hover .empty-hint {
    opacity: 0.8;
    color: var(--error-carmine);
}

/* Breathing orb */
.breathing-element {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    cursor: pointer;
}
.orb-outer {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 1.5px solid var(--burgundy-core);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
    animation: orbBreathe 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.orb-inner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--burgundy-core);
    opacity: 0.55;
    animation: orbInnerBreathe 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes orbBreathe {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.06); opacity: 1; }
}
@keyframes orbInnerBreathe {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50% { transform: scale(0.85); opacity: 0.85; }
}
.orb-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: lowercase;
    color: var(--accent-terracotta);
    opacity: 0.6;
}

/* Shake-as-poetry motif */
@keyframes shake {
    0%   { transform: translateX(0); }
    12%  { transform: translateX(-3px); }
    24%  { transform: translateX(3px); }
    36%  { transform: translateX(-2px); }
    48%  { transform: translateX(2px); }
    60%  { transform: translateX(-1px); }
    72%  { transform: translateX(1px); }
    100% { transform: translateX(0); }
}
.shake-active {
    animation: shake 400ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ==========================================
   Zone 4 - Depth (cream, F-mid + vertical stem)
   ========================================== */
.zone-4 {
    background-color: var(--cream-base);
    min-height: 120vh;
    padding-top: 18vh;
    padding-bottom: 18vh;
}
.zone-4 .zone-inner {
    grid-template-columns: repeat(12, 1fr);
}

.f-mid {
    grid-column: 3 / span 7;
    margin-left: 6%;
}
.f-mid .content-block {
    max-width: 560px;
}

.depth-illust-wrap {
    grid-column: 3 / span 8;
    margin-left: 6%;
}
.depth-illust {
    width: 100%;
    max-width: 720px;
}

.f-stem {
    grid-column: 5 / span 4;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 420px;
    margin-left: 8%;
}
.stem-fragment {
    padding: 2.2rem 0 2.2rem 1.5rem;
    border-bottom: 1px solid rgba(114, 47, 55, 0.22);
    position: relative;
}
.stem-fragment:first-child {
    border-top: 1px solid rgba(114, 47, 55, 0.22);
}
.stem-marginalia {
    position: absolute;
    left: -8px;
    top: 2.4rem;
    width: 6px;
    height: 6px;
    display: block;
}
.fragment-text {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.1rem, 1.4vw, 1.4rem);
    line-height: 1.6;
    color: var(--burgundy-noir);
    letter-spacing: 0.005em;
}

/* Data display */
.data-display {
    grid-column: 6 / span 5;
    margin-left: 6%;
    max-width: 380px;
    border-left: 1.5px solid var(--burgundy-core);
    padding-left: 2rem;
}
.data-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(114, 47, 55, 0.18);
}
.data-row:last-child {
    border-bottom: none;
}
.data-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--accent-sage);
    text-transform: lowercase;
}
.data-value {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--charcoal-warm);
}
.data-row:hover .data-value {
    color: var(--burgundy-blush);
    transition: color 0.3s ease;
}

/* ==========================================
   Zone 5 - Departure (fade to cream)
   ========================================== */
.zone-5 {
    background: linear-gradient(180deg, var(--cream-deep) 0%, var(--cream-base) 45%, var(--cream-base) 100%);
    min-height: 100vh;
    padding-top: 18vh;
    padding-bottom: 8vh;
}
.zone-5 .zone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6vh;
    text-align: center;
    max-width: 820px;
}

.closing-mark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    cursor: default;
}
.mark-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 8vw, 7rem);
    color: var(--burgundy-core);
    letter-spacing: -0.03em;
    line-height: 1;
}
.mark-text .stutter-echo {
    color: var(--burgundy-core);
    opacity: 0.22;
}
.closing-circuit {
    width: 220px;
    height: 220px;
}

.departure-line {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.1rem, 1.4vw, 1.4rem);
    color: var(--burgundy-core);
    opacity: 0.8;
    letter-spacing: 0.01em;
}

.site-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    max-width: 720px;
    gap: 2rem;
    padding-top: 4vh;
    border-top: 1px solid rgba(114, 47, 55, 0.22);
    margin-top: 2rem;
}
.footer-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--accent-sage);
    text-align: left;
    text-transform: lowercase;
}
.footer-email {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--burgundy-core);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, color 0.3s ease;
    text-transform: lowercase;
}
.footer-email:hover {
    color: var(--burgundy-noir);
    border-bottom-color: var(--burgundy-core);
}
.footer-year {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.72rem;
    color: var(--charcoal-warm);
    opacity: 0.55;
    text-align: right;
}

/* ==========================================
   Reveal animation
   ========================================== */
.reveal-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 800ms cubic-bezier(0.25, 0.1, 0.25, 1);
}
.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 960px) {
    .zone {
        padding: 10vh 6vw;
    }
    .zone-inner {
        column-gap: 1.25rem;
    }
    .f-top-grid {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    .f-mid,
    .depth-illust-wrap,
    .f-stem,
    .data-display {
        grid-column: 1 / -1;
        margin-left: 0;
    }
    .illustration-container {
        justify-self: start;
        max-width: 100%;
    }
    .nav-orb {
        top: 1.2rem;
        right: 1.2rem;
    }
    .nav-orb.expanded .nav-trigger {
        transform: scale(4.5);
    }
    .nav-links li:nth-child(1) { transform: translate(-50%, -50%) translate(0, -80px); }
    .nav-links li:nth-child(2) { transform: translate(-50%, -50%) translate(-78px, -24px); }
    .nav-links li:nth-child(3) { transform: translate(-50%, -50%) translate(-48px, 66px); }
    .nav-links li:nth-child(4) { transform: translate(-50%, -50%) translate(48px, 66px); }
    .nav-links li:nth-child(5) { transform: translate(-50%, -50%) translate(78px, -24px); }
    .site-footer {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    .footer-text, .footer-year { text-align: center; }
}

@media (max-width: 520px) {
    .hero-title {
        font-size: clamp(3rem, 16vw, 5rem);
    }
    .orb-outer {
        width: 90px;
        height: 90px;
    }
    .orb-inner {
        width: 30px;
        height: 30px;
    }
}
