/* ============================================================
   nonri.net — minimalist luxury, forest-green, bento + typewriter
   ============================================================ */

:root {
    --c-deep: #0D2818;        /* Midnight Forest */
    --c-deep-2: #1B3D2A;      /* Brunswick Green - mortar */
    --c-mid: #2D6A4F;         /* Amazon Green */
    --c-bright: #52B788;      /* Emerald Leaf */
    --c-parchment: #F7F5F0;   /* Antique Linen */
    --c-gold: #C9B458;        /* Champagne Gold */
    --c-gold-hi: #D4C76A;     /* Hover gold */
    --c-ink: #1A1A1A;         /* Charcoal */
    --c-mist: #EDEDED;        /* Mist white */
    --c-near-black: #1A1A1A;

    --font-display: 'Darker Grotesque', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-body: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-type: 'Special Elite', 'Courier New', monospace;

    --gap: 24px;
    --inner: 80px;

    --topbar-h: 72px;
}

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

html, body {
    background: var(--c-deep-2);
    color: var(--c-ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    cursor: default;
}

a { color: inherit; text-decoration: none; }
button { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
ul { list-style: none; }

/* ===== Top bar ===== */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 80;
    mix-blend-mode: normal;
    background: linear-gradient(180deg, rgba(247,245,240,0.92), rgba(247,245,240,0));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.topbar.is-dark {
    background: linear-gradient(180deg, rgba(13,40,24,0.92), rgba(13,40,24,0));
}
.topbar.is-dark .wordmark { color: var(--c-parchment); }
.topbar.is-dark .hamburger span { background: var(--c-parchment); }

.wordmark {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 20px;
    letter-spacing: -0.03em;
    color: var(--c-deep);
    transition: color 0.4s ease;
}
.wordmark::after {
    content: "·";
    color: var(--c-gold);
    margin-left: 8px;
}

.hamburger {
    width: 32px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 0;
}
.hamburger span {
    display: block;
    height: 1px;
    width: 100%;
    background: var(--c-deep);
    transition: background 0.4s ease, transform 0.4s ease, opacity 0.3s ease;
}
.hamburger:hover span:nth-child(2) { width: 70%; }

/* ===== Nav overlay ===== */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: var(--c-deep);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}
.nav-close {
    position: absolute;
    top: 24px;
    right: 32px;
    width: 32px;
    height: 32px;
}
.nav-close span {
    position: absolute;
    top: 50%; left: 0;
    width: 100%;
    height: 1px;
    background: var(--c-parchment);
    transform-origin: center;
}
.nav-close span:nth-child(1) { transform: rotate(45deg); }
.nav-close span:nth-child(2) { transform: rotate(-45deg); }

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.nav-item a {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 48px;
    letter-spacing: -0.03em;
    color: var(--c-parchment);
    position: relative;
    display: inline-block;
    padding: 4px 12px;
    transition: color 0.3s ease;
}
.nav-item a::before {
    content: "";
    position: absolute;
    left: 0; bottom: 6px;
    width: 0;
    height: 1px;
    background: var(--c-gold);
    transition: width 0.4s ease;
}
.nav-item a:hover { color: var(--c-bright); }
.nav-item a:hover::before { width: 100%; }
.nav-item.is-typing a::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 4px;
    background: var(--c-gold);
    vertical-align: -8px;
    animation: caret 530ms step-end infinite;
}

@keyframes caret {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ===== Bubble field (ambient) ===== */
.bubble-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(82, 183, 136, calc(var(--op) * 1.6)), rgba(82, 183, 136, 0));
    width: var(--sz);
    height: var(--sz);
    left: var(--lx);
    bottom: -200px;
    opacity: var(--op);
    animation: rise var(--dur) linear var(--delay) infinite;
}
.bubble.with-stroke {
    background: radial-gradient(circle at 30% 30%, rgba(82, 183, 136, 0.18), rgba(82, 183, 136, 0));
    border: 1px solid rgba(201, 180, 88, 0.35);
}

@keyframes rise {
    0%   { transform: translate(0, 0) scale(0.9); opacity: 0; }
    8%   { opacity: var(--op); }
    50%  { transform: translate(calc(var(--wob) * 1px), -50vh) scale(1); }
    92%  { opacity: var(--op); }
    100% { transform: translate(calc(var(--wob) * -0.6px), -110vh) scale(1.05); opacity: 0; }
}

body.scrolling .bubble { animation-duration: calc(var(--dur) * 0.7); }

/* Cursor trail bubbles */
.cursor-trail { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.trail-bubble {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(82, 183, 136, 0.55);
    box-shadow: 0 0 10px rgba(82, 183, 136, 0.4);
    transform: translate(-50%, -50%);
    animation: trail-fade 1.5s ease-out forwards;
}
@keyframes trail-fade {
    0%   { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, calc(-50% - 24px)) scale(0.4); }
}

/* ===== Bento stage ===== */
.bento-stage {
    position: relative;
    z-index: 5;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    overflow-x: hidden;
    height: 100vh;
    background: var(--c-deep-2);
}

.bento-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: 100vh;
    padding: calc(var(--topbar-h) + 24px) 32px 32px;
    display: flex;
    align-items: stretch;
    background: var(--c-deep-2);
    position: relative;
}

.bento-grid {
    width: 100%;
    height: calc(100vh - var(--topbar-h) - 56px);
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: var(--gap);
    transition: gap 0.4s ease;
}

body.in-transition .bento-grid { gap: 32px; }

/* ===== Cell base ===== */
.cell {
    position: relative;
    background: var(--c-parchment);
    border-radius: 4px;
    padding: var(--inner) calc(var(--inner) * 0.75);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--c-ink);
    transform: scale(0.96);
    opacity: 0;
    transition:
        transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 600ms ease,
        background 0.4s ease;
}
.bento-section.is-active .cell {
    transform: scale(1);
    opacity: 1;
}
.bento-section.is-active .cell:nth-child(1) { transition-delay: 60ms; }
.bento-section.is-active .cell:nth-child(2) { transition-delay: 120ms; }
.bento-section.is-active .cell:nth-child(3) { transition-delay: 180ms; }
.bento-section.is-active .cell:nth-child(4) { transition-delay: 240ms; }
.bento-section.is-active .cell:nth-child(5) { transition-delay: 300ms; }
.bento-section.is-active .cell:nth-child(6) { transition-delay: 360ms; }

.cell-light { background: var(--c-parchment); color: var(--c-ink); }
.cell-deep { background: var(--c-deep); color: var(--c-mist); }
.cell-emerald { background: var(--c-mid); color: var(--c-mist); }
.cell-dark { background: var(--c-deep); color: var(--c-mist); }

/* ===== Eyebrow / small text ===== */
.eyebrow {
    font-family: var(--font-type);
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-mid);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}
.eyebrow::before {
    content: "";
    display: inline-block;
    width: 36px;
    height: 1px;
    background: var(--c-gold);
}
.eyebrow.inverted { color: var(--c-gold); }

.cell-tag {
    font-family: var(--font-type);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-gold);
    display: block;
    margin-bottom: 28px;
}

/* ===== Display headings ===== */
.display-xl, .display-lg, .display-md, .display-sm {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
    line-height: 1.05;
    font-weight: 900;
    margin-bottom: 28px;
    white-space: pre-line;
    color: inherit;
}
.display-xl { font-size: clamp(56px, 8vw, 112px); }
.display-lg { font-size: clamp(44px, 6.4vw, 84px); }
.display-md { font-size: clamp(36px, 5vw, 64px); font-weight: 700; }
.display-sm { font-size: clamp(28px, 3.4vw, 42px); font-weight: 700; }

/* ===== Typewriter text ===== */
.typewriter {
    font-family: var(--font-type);
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.2;
}
.display-xl.typewriter,
.display-lg.typewriter,
.display-md.typewriter,
.display-sm.typewriter {
    font-family: var(--font-type);
    line-height: 1.18;
    letter-spacing: 0.01em;
    font-weight: 400;
}
.display-xl.typewriter { font-size: clamp(38px, 5.4vw, 72px); }
.display-lg.typewriter { font-size: clamp(32px, 4.6vw, 60px); }
.display-md.typewriter { font-size: clamp(28px, 3.6vw, 44px); }
.display-sm.typewriter { font-size: clamp(22px, 2.6vw, 30px); }

.typewriter::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 6px;
    background: var(--c-gold);
    vertical-align: -8px;
    opacity: 0;
    animation: caret 530ms step-end infinite;
}
.typewriter.is-typing::after,
.typewriter.is-cursor::after { opacity: 1; }

/* ===== Body text ===== */
.body-fade {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    letter-spacing: 0.01em;
    max-width: 56ch;
    color: var(--c-ink);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 600ms ease, transform 600ms ease;
}
.body-fade.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.body-fade.inverted { color: var(--c-mist); }

/* ===== Section 01 layout ===== */
[data-layout="prologue"] .cell-hero {
    grid-column: 1 / span 8;
    grid-row: 1 / span 6;
}
[data-layout="prologue"] .cell-dark {
    grid-column: 9 / span 4;
    grid-row: 1 / span 4;
    justify-content: space-between;
}
[data-layout="prologue"] .cell-bubble {
    grid-column: 9 / span 4;
    grid-row: 5 / span 2;
    background: var(--c-deep-2);
    color: var(--c-mist);
    align-items: center;
    justify-content: center;
    padding: 32px;
}
[data-layout="prologue"] .cell-strip {
    grid-column: 1 / span 12;
    grid-row: 7 / span 2;
    background: var(--c-deep);
    color: var(--c-gold);
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    flex-direction: row;
}

/* ===== Section 02 layout ===== */
[data-layout="logic"] .cell-typo {
    grid-column: 1 / span 4;
    grid-row: 1 / span 8;
    background: var(--c-deep);
    color: var(--c-parchment);
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}
[data-layout="logic"] .cell-light {
    grid-column: 5 / span 5;
    grid-row: 1 / span 5;
}
[data-layout="logic"] .cell-emerald {
    grid-column: 10 / span 3;
    grid-row: 1 / span 5;
    padding: 56px 40px;
    justify-content: flex-start;
}
[data-layout="logic"] .cell-thin {
    grid-column: 5 / span 8;
    grid-row: 6 / span 3;
    background: var(--c-parchment);
    border: 1px solid rgba(45, 106, 79, 0.18);
    align-items: flex-start;
    justify-content: center;
    padding: 56px 80px;
}

.oversized {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(280px, 34vw, 460px);
    letter-spacing: -0.06em;
    line-height: 0.7;
    color: var(--c-bright);
    user-select: none;
    transform: translateY(12%);
}
.oversized.lighter { color: var(--c-gold); }

.principle-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    color: var(--c-mist);
}
.principle-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px dashed rgba(247,245,240,0.18);
    padding-bottom: 12px;
}
.principle-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.principle-list .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-gold);
    display: inline-block;
}

.thin-quote {
    font-family: var(--font-type);
    font-size: clamp(20px, 2vw, 24px);
    color: var(--c-mid);
    letter-spacing: 0.04em;
    line-height: 1.7;
    display: inline-block;
    max-width: 70ch;
}

/* ===== Section 03 layout ===== */
[data-layout="forest"] .cell-collage {
    grid-column: 1 / span 6;
    grid-row: 1 / span 8;
    padding: 0;
    background: #0d1310;
    overflow: hidden;
}
[data-layout="forest"] .cell-deep {
    grid-column: 7 / span 6;
    grid-row: 1 / span 4;
}
[data-layout="forest"] .cell-portrait-light {
    grid-column: 7 / span 3;
    grid-row: 5 / span 4;
    background: var(--c-parchment);
    justify-content: space-between;
}
[data-layout="forest"] .cell-portrait-deep {
    grid-column: 10 / span 3;
    grid-row: 5 / span 4;
    background: var(--c-deep);
    color: var(--c-mist);
    justify-content: space-between;
}

/* Collage layers */
.collage-base {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 40%, rgba(247,245,240,0.06), transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(82,183,136,0.04), transparent 65%),
        repeating-linear-gradient(135deg, rgba(247,245,240,0.025) 0 1px, transparent 1px 5px),
        repeating-linear-gradient(45deg, rgba(13,40,24,0.6) 0 2px, transparent 2px 4px),
        linear-gradient(180deg, #1a2a20 0%, #0d1813 100%);
    filter: contrast(1.1) saturate(0.2);
}
.collage-base::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(247,245,240,0.18), transparent 45%),
        radial-gradient(ellipse at 80% 20%, rgba(0,0,0,0.5), transparent 50%);
    mix-blend-mode: overlay;
}
.collage-vector {
    position: absolute;
    top: 50%; left: 50%;
    width: 78%; height: 78%;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    mix-blend-mode: screen;
    animation: collage-spin 80s linear infinite;
}
@keyframes collage-spin {
    from { transform: translate(-50%, -50%) rotate(0); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}
.collage-bubble {
    position: absolute;
    left: var(--bx);
    top: var(--by);
    width: var(--bs);
    height: var(--bs);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(82,183,136,0.18), rgba(82,183,136,0));
    border: 1px solid rgba(201,180,88,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.caption {
    font-family: var(--font-type);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-mid);
    border-top: 1px solid rgba(45,106,79,0.25);
    padding-top: 14px;
}
.caption.inverted {
    color: var(--c-gold);
    border-top-color: rgba(201,180,88,0.3);
}

/* ===== Section 04 layout ===== */
[data-layout="bubbles"] .cell-light.cell-wide {
    grid-column: 1 / span 7;
    grid-row: 1 / span 5;
}
[data-layout="bubbles"] .cell-bubble-host {
    grid-column: 8 / span 5;
    grid-row: 1 / span 8;
    background: var(--c-deep);
    color: var(--c-mist);
    padding: 0;
    align-items: center;
    justify-content: center;
}
[data-layout="bubbles"] .cell-emerald.cell-quote {
    grid-column: 1 / span 7;
    grid-row: 6 / span 3;
    background: var(--c-mid);
    color: var(--c-mist);
    align-items: flex-start;
    justify-content: center;
}
[data-layout="bubbles"] .cell-emerald.cell-quote .thin-quote { color: var(--c-mist); }

/* ===== Section 05 layout ===== */
[data-layout="practice"] .cell-deep.cell-tall {
    grid-column: 1 / span 5;
    grid-row: 1 / span 8;
    justify-content: flex-end;
}
[data-layout="practice"] .cell-room {
    background: var(--c-parchment);
    color: var(--c-ink);
    justify-content: flex-end;
    padding: 48px 40px;
    transition: transform 0.4s ease, background 0.4s ease, color 0.4s ease, opacity 600ms ease;
}
[data-layout="practice"] .cell-room:hover {
    background: var(--c-deep);
    color: var(--c-mist);
}
[data-layout="practice"] .cell-room:hover .room-num,
[data-layout="practice"] .cell-room:hover .body-fade { color: var(--c-gold); }
[data-layout="practice"] .cell-room[data-room="01"] { grid-column: 6 / span 4; grid-row: 1 / span 4; }
[data-layout="practice"] .cell-room[data-room="02"] { grid-column: 10 / span 3; grid-row: 1 / span 4; }
[data-layout="practice"] .cell-room[data-room="03"] { grid-column: 6 / span 3; grid-row: 5 / span 4; }
[data-layout="practice"] .cell-room[data-room="04"] { grid-column: 9 / span 4; grid-row: 5 / span 4; }

.room-num {
    font-family: var(--font-type);
    font-size: 13px;
    letter-spacing: 0.18em;
    color: var(--c-mid);
    margin-bottom: 16px;
    transition: color 0.4s ease;
}
.room-title {
    font-family: var(--font-type);
    font-size: clamp(28px, 3.2vw, 40px);
    letter-spacing: 0.01em;
    margin-bottom: 16px;
    color: inherit;
    line-height: 1.18;
}
[data-layout="practice"] .cell-room .body-fade { font-size: 15px; }

/* ===== Section 06 layout ===== */
[data-layout="contact"] .cell-typo {
    grid-column: 1 / span 4;
    grid-row: 1 / span 8;
    background: var(--c-mid);
    color: var(--c-parchment);
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}
[data-layout="contact"] .cell-light {
    grid-column: 5 / span 5;
    grid-row: 1 / span 6;
}
[data-layout="contact"] .cell-coords {
    grid-column: 10 / span 3;
    grid-row: 1 / span 6;
    justify-content: flex-start;
}
[data-layout="contact"] .cell-foot {
    grid-column: 5 / span 8;
    grid-row: 7 / span 2;
    background: var(--c-deep);
    color: var(--c-gold);
    flex-direction: row;
    align-items: center;
    padding: 0;
    overflow: hidden;
}

.contact-line {
    margin-top: 28px;
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid var(--c-gold);
    padding-top: 14px;
    transition: border-color 0.4s ease;
}
.contact-line:hover { border-top-color: var(--c-bright); }
.contact-label {
    font-family: var(--font-type);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-mid);
}
.contact-value {
    font-family: var(--font-type);
    font-size: clamp(20px, 2vw, 26px);
    color: var(--c-ink);
}

.studio-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 24px;
}
.studio-list li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px dashed rgba(247,245,240,0.18);
    padding-bottom: 18px;
}
.studio-list li:last-child { border-bottom: 0; }
.studio-list .city {
    font-family: var(--font-type);
    font-size: clamp(28px, 3vw, 38px);
    color: var(--c-mist);
}
.studio-list .coord {
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--c-gold);
}

/* ===== Strips / tickers ===== */
.cell-strip { padding: 0; }
.cell-strip .ticker {
    display: inline-block;
    white-space: nowrap;
    font-family: var(--font-type);
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    animation: ticker 40s linear infinite;
}
@keyframes ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ===== Content bubbles ===== */
.content-bubble {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(247, 245, 240, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--c-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--c-deep);
    position: relative;
    transition: transform 400ms ease-in-out, border-color 400ms ease, background 400ms ease;
}
.content-bubble.small { width: 110px; height: 110px; }
.content-bubble.medium { width: 150px; height: 150px; }
.content-bubble.inverted {
    background: rgba(13,40,24,0.7);
    color: var(--c-gold);
    border-color: var(--c-gold);
}
.content-bubble:hover {
    transform: scale(1.03);
    border-color: var(--c-gold-hi);
    animation: wobble 2s ease-in-out infinite;
}
@keyframes wobble {
    0%, 100% { transform: scale(1.03) translate(0, 0); }
    25%      { transform: scale(1.03) translate(2px, -2px); }
    50%      { transform: scale(1.03) translate(0, -3px); }
    75%      { transform: scale(1.03) translate(-2px, -1px); }
}
.bubble-num {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 38px;
    letter-spacing: -0.04em;
    line-height: 1;
}
.content-bubble.small .bubble-num { font-size: 24px; }
.bubble-label {
    font-family: var(--font-type);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 8px;
    color: var(--c-mid);
}
.content-bubble.inverted .bubble-label { color: var(--c-gold); }

.content-bubble.interactive { cursor: pointer; background: rgba(247,245,240,0.86); }
.content-bubble.interactive:active { transform: scale(0.98); }
.content-bubble.popping {
    animation: pop 600ms cubic-bezier(0.2, 1.6, 0.2, 1) forwards;
}
@keyframes pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.cell-bubble-host {
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
}
.cell-bubble-host .content-bubble:nth-child(1) {
    position: absolute; top: 18%; left: 22%;
    animation: float-a 7s ease-in-out infinite;
}
.cell-bubble-host .content-bubble:nth-child(2) {
    position: absolute; top: 56%; left: 60%;
    animation: float-b 8s ease-in-out infinite;
}
.cell-bubble-host .content-bubble:nth-child(3) {
    position: absolute; top: 30%; left: 60%;
    animation: float-c 9s ease-in-out infinite;
}
@keyframes float-a {
    0%,100% { transform: translate(0,0); }
    50%     { transform: translate(8px,-12px); }
}
@keyframes float-b {
    0%,100% { transform: translate(0,0); }
    50%     { transform: translate(-10px,-8px); }
}
@keyframes float-c {
    0%,100% { transform: translate(0,0); }
    50%     { transform: translate(6px,8px); }
}

/* burst particles */
.burst-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(82,183,136,0.6);
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: burst 700ms ease-out forwards;
}
@keyframes burst {
    0%   { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.4); }
}

/* ===== Progress rail ===== */
.progress-rail {
    position: fixed;
    bottom: 24px;
    left: 32px;
    right: 32px;
    height: 1px;
    background: rgba(201, 180, 88, 0.18);
    z-index: 70;
}
.progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--c-gold);
    transition: width 0.2s ease-out;
}

/* ===== Theme switching for top bar ===== */
.bento-section[data-layout="prologue"],
.bento-section[data-layout="logic"],
.bento-section[data-layout="bubbles"],
.bento-section[data-layout="contact"] { /* light */ }
.bento-section[data-layout="forest"],
.bento-section[data-layout="practice"] { /* dark */ }

/* ===== Responsive ===== */
@media (max-width: 980px) {
    :root { --inner: 40px; --gap: 16px; }
    .topbar { padding: 0 20px; }
    .nav-item a { font-size: 36px; }
    .bento-section { padding: calc(var(--topbar-h) + 16px) 16px 16px; }
    .bento-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-auto-rows: minmax(140px, auto);
        grid-template-rows: none;
        height: auto;
        min-height: calc(100vh - var(--topbar-h) - 40px);
    }
    .cell { grid-column: 1 / -1 !important; grid-row: auto !important; min-height: 320px; padding: 40px 32px; }
    .bento-stage { scroll-snap-type: none; height: auto; overflow: visible; }
    .bento-section { min-height: auto; }
    .oversized { font-size: 220px; }
    .display-xl.typewriter { font-size: 36px; }
    .display-lg.typewriter { font-size: 30px; }
    .progress-rail { display: none; }
}

@media (max-width: 560px) {
    .display-xl.typewriter { font-size: 30px; }
    .display-lg.typewriter { font-size: 26px; }
    .display-md.typewriter { font-size: 22px; }
    .nav-item a { font-size: 28px; }
    .content-bubble { width: 140px; height: 140px; }
    .content-bubble.small { width: 90px; height: 90px; }
    .content-bubble.medium { width: 120px; height: 120px; }
    .bubble-num { font-size: 28px; }
}
