/* algoha.com — Victorian curiosity cabinet, skeuomorphic & handwritten
   Compliance language: Interactive elements IntersectionObserver scroll-triggered reveals illustration animations IntersectionObserver` progress. subtle lag (Google `#f0e6ef`. `stroke: #f0e6ef` draws itself glow warmer */

:root {
    --moth-wing: #f0e6ef;
    --evening-parlor: #2a2035;
    --faded-rose: #d4a0a0;
    --faded-rose-deep: #b88585;
    --phantom-sage: #a3b8a0;
    --bruised-lavender: #9b8ec4;
    --inkwell: #2d2438;
    --graphite-dust: #6b5e7a;
    --candlelight: #f5deb3;
    --brass-mid: #c9b88c;
    --brass-light: #e0d5b8;

    --ease-weighted: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-velvet: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Lora", Georgia, serif;
    background: var(--moth-wing);
    color: var(--inkwell);
    line-height: 1.72;
    letter-spacing: 0.005em;
    font-size: clamp(1rem, 1.25vw, 1.125rem);
    overflow-x: hidden;
    position: relative;
}

main {
    position: relative;
}

main::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(240, 230, 239, 0.22), transparent 22%, transparent 78%, rgba(42, 32, 53, 0.08)),
        radial-gradient(ellipse at 50% 0%, rgba(245, 222, 179, 0.08), transparent 48%);
    mix-blend-mode: multiply;
}

/* Faint linen texture across the entire page */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        repeating-linear-gradient(0deg, rgba(107, 94, 122, 0.018) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgba(107, 94, 122, 0.014) 0 1px, transparent 1px 3px);
    mix-blend-mode: multiply;
}

.fog-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(240, 230, 239, 0.4) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 90%, rgba(155, 142, 196, 0.12) 0%, transparent 60%);
    opacity: 0.6;
}

/* Headings */
h1, h2, h3 {
    font-family: "Caveat", "Kalam", cursive;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--inkwell);
}

h2, h3 {
    font-family: "Architects Daughter", "Caveat", cursive;
    font-weight: 400;
    font-size: clamp(1.25rem, 3vw, 2.25rem);
    margin-bottom: 0.6em;
}

p {
    max-width: 52ch;
}

strong, em.emphasis {
    font-weight: 600;
    font-style: normal;
}

/* Annotation font */
.kalam-note {
    font-family: "Kalam", cursive;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--graphite-dust);
    opacity: 0.75;
    letter-spacing: 0.01em;
}

.kalam-light {
    color: rgba(240, 230, 239, 0.7);
}

/* =========================================
   NAVIGATION — brass rail with wax dots
   ========================================= */
.chamber-nav {
    position: fixed;
    right: 2vw;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 22px 10px;
}

.brass-rail {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background: linear-gradient(to right, var(--brass-mid), var(--brass-light), var(--brass-mid));
    border-radius: 2px;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.2);
}

.wax-dot {
    position: relative;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background:
        radial-gradient(circle at 35% 30%, var(--faded-rose) 0%, var(--faded-rose-deep) 70%, #8a6464 100%);
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.25),
        inset 0 -1px 2px rgba(255,255,255,0.12),
        0 1px 2px rgba(0,0,0,0.15);
    transition: all 0.3s var(--ease-velvet);
}

.wax-dot::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(155, 142, 196, 0.35) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s var(--ease-velvet);
}

.wax-dot:hover {
    transform: scale(1.15);
}

.wax-dot.active {
    background:
        radial-gradient(circle at 35% 30%, var(--candlelight) 0%, var(--faded-rose) 60%, var(--faded-rose-deep) 100%);
    transform: scale(1.25);
}

.wax-dot.active::after {
    opacity: 1;
}

/* =========================================
   CHAMBER BASE
   ========================================= */
.chamber {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    background: var(--moth-wing);
    transition: background 0.8s var(--ease-weighted);
    clip-path: inset(var(--reveal-top, 0%) 0 var(--reveal-bottom, 0%) 0);
    transform: translateY(var(--slide-shift, 0px));
    will-change: clip-path, transform;
}

.chamber:not(:last-child) {
    position: sticky;
    top: 0;
}

.tissue-reveal {
    position: absolute;
    inset: 0;
    z-index: 25;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(240, 230, 239, 0.45), transparent 32%, rgba(240, 230, 239, 0.08)),
        repeating-linear-gradient(90deg, rgba(107, 94, 122, 0.025) 0 1px, transparent 1px 5px);
    opacity: var(--tissue-opacity, 0.18);
    transform: translateY(var(--tissue-y, 0));
    transition: opacity 0.15s ease-out;
    mix-blend-mode: screen;
}

.chamber.dark {
    background: var(--evening-parlor);
    color: var(--moth-wing);
}

.chamber.dark h1,
.chamber.dark h2,
.chamber.dark h3 {
    color: var(--moth-wing);
}

.chamber-grid {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: 38.2% 61.8%;
    padding: 4vh 5vw;
    gap: 1rem;
    z-index: 10;
}

.grid-annotation {
    grid-column: 1 / span 5;
    grid-row: 1 / 2;
    align-self: start;
}

.grid-annotation.top-left {
    grid-column: 1 / span 5;
}

.grid-ornament.bottom-center {
    grid-column: 5 / span 4;
    grid-row: 2 / 3;
    align-self: end;
    text-align: center;
}

.grid-content {
    grid-column: 2 / span 7;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: start;
    z-index: 5;
}

.grid-specimen {
    grid-column: 7 / span 5;
    grid-row: 2 / 3;
    align-self: end;
    justify-self: end;
    opacity: 0.4;
    max-width: min(60vw, 500px);
    width: 100%;
}

.grid-specimen.small-right {
    grid-column: 9 / span 4;
    grid-row: 1 / span 2;
    align-self: center;
    opacity: 0.55;
    max-width: min(30vw, 300px);
}

.specimen {
    width: 100%;
    height: auto;
}

/* =========================================
   SVG DRAW-PATH ANIMATION
   ========================================= */
.draw-path path,
.draw-path circle,
.draw-path ellipse,
.draw-path rect,
.draw-path line {
    fill: none;
    stroke: var(--inkwell);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: var(--dash, 1000);
    stroke-dashoffset: var(--dash, 1000);
    transition: stroke-dashoffset 3s var(--ease-weighted);
}

.draw-path .compass-pin {
    fill: var(--inkwell);
    stroke: none;
    opacity: 0;
    transition: opacity 1.2s ease 2s;
}

.chamber.dark .draw-path path,
.chamber.dark .draw-path circle,
.chamber.dark .draw-path ellipse,
.chamber.dark .draw-path rect,
.chamber.dark .draw-path line {
    stroke: var(--moth-wing);
}

.chamber.revealed .draw-path path,
.chamber.revealed .draw-path circle,
.chamber.revealed .draw-path ellipse,
.chamber.revealed .draw-path rect,
.chamber.revealed .draw-path line {
    stroke-dashoffset: 0;
}

.chamber.revealed .draw-path .compass-pin {
    opacity: 1;
}

.compass-letter {
    font-family: "Caveat", cursive;
    font-size: 22px;
    fill: var(--inkwell);
    text-anchor: middle;
    opacity: 0;
    transition: opacity 1.2s ease 2s;
}

.chamber.revealed .compass-letter {
    opacity: 0.7;
}

/* =========================================
   CHAMBER 1 — The Threshold
   ========================================= */
.chamber-1 {
    background: var(--moth-wing);
}

.lightning-wash {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 35vh;
    background: linear-gradient(180deg, rgba(155, 142, 196, 0.18) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
    animation: lightningPulse 7s ease-in-out infinite;
}

@keyframes lightningPulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.75; }
}

.logotype {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: clamp(4rem, 14vw, 12rem);
    line-height: 0.95;
    letter-spacing: 0.02em;
    color: var(--inkwell);
    margin-bottom: 0.1em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s var(--ease-weighted), transform 1.5s var(--ease-weighted);
}

.chamber-1.revealed .logotype {
    opacity: 1;
    transform: translateY(0);
}

.tagline {
    font-family: "Architects Daughter", cursive;
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    color: var(--graphite-dust);
    letter-spacing: 0.04em;
    margin-top: 0.4em;
    opacity: 0;
    transition: opacity 1.2s ease 0.8s;
}

.chamber-1.revealed .tagline {
    opacity: 0.9;
}

.compass-rose {
    transform: translate(10%, 10%);
}

/* =========================================
   CHAMBER 2 — The Collection
   ========================================= */
.chamber-2 {
    background: var(--evening-parlor);
}

.bg-specimen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.22;
    z-index: 1;
    pointer-events: none;
}

.bg-specimen.moth {
    opacity: 0.28;
}

.journal-stack {
    grid-column: 2 / span 10;
    grid-row: 1 / span 2;
    position: relative;
    align-self: center;
    justify-self: center;
    width: 100%;
    height: 70%;
    z-index: 10;
}

.journal-page {
    position: absolute;
    width: 38%;
    min-height: 58%;
    padding: 2.4rem 2.2rem;
    background: var(--moth-wing);
    color: var(--inkwell);
    border: 1px solid rgba(107, 94, 122, 0.18);
    box-shadow:
        2px 2px 8px rgba(42, 32, 53, 0.35),
        6px 6px 22px rgba(0, 0, 0, 0.25);
    font-family: "Lora", serif;
    transition: transform 0.6s var(--ease-weighted), box-shadow 0.4s ease;
}

.journal-page::before {
    content: "";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--faded-rose) 0%, var(--faded-rose-deep) 75%);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
}

.journal-page h2 {
    font-family: "Architects Daughter", cursive;
    color: var(--inkwell);
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    margin-bottom: 0.8em;
}

.journal-page p {
    font-size: clamp(0.92rem, 1.05vw, 1rem);
    color: var(--inkwell);
}

.page-a {
    top: 8%;
    left: 4%;
    transform: rotate(-1deg);
    clip-path: polygon(0 2%, 96% 0, 100% 6%, 98% 94%, 100% 100%, 3% 98%, 0 92%, 2% 40%);
}

.page-b {
    top: 18%;
    left: 33%;
    transform: rotate(2deg);
    z-index: 2;
    clip-path: polygon(3% 0, 98% 3%, 100% 98%, 94% 100%, 0 96%, 2% 60%, 0 20%);
}

.page-c {
    top: 10%;
    left: 60%;
    transform: rotate(-0.5deg);
    clip-path: polygon(0 4%, 94% 0, 100% 100%, 6% 96%, 3% 50%, 0 30%);
}

.journal-page:hover {
    transform: rotate(0deg) translateY(-4px);
    box-shadow:
        4px 6px 14px rgba(42, 32, 53, 0.5),
        10px 12px 36px rgba(0, 0, 0, 0.35);
    z-index: 5;
}

/* =========================================
   CHAMBER 3 — The Instrument
   ========================================= */
.instrument-wrap {
    grid-column: 2 / span 7;
    grid-row: 1 / span 2;
    position: relative;
    align-self: center;
    justify-self: center;
    width: min(600px, 60vh);
    aspect-ratio: 1 / 1;
    z-index: 10;
}

.dial {
    position: absolute;
    inset: 20%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 40% 30%, #f4e9c5 0%, var(--brass-light) 45%, var(--brass-mid) 85%, #9a8756 100%);
    box-shadow:
        inset 0 4px 10px rgba(255, 255, 255, 0.45),
        inset 0 -6px 14px rgba(80, 60, 30, 0.45),
        inset 0 0 0 6px rgba(154, 135, 86, 0.6),
        0 8px 24px rgba(42, 32, 53, 0.35),
        0 2px 4px rgba(0,0,0,0.15);
    cursor: grab;
    transition: box-shadow 0.3s var(--ease-velvet);
}

.dial:active {
    cursor: grabbing;
}

.dial-face {
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 40% 35%, #fff8e7 0%, #f0e3c0 60%, #d6c594 100%);
    box-shadow:
        inset 0 3px 8px rgba(120, 95, 40, 0.3),
        inset 0 -2px 4px rgba(255,255,255,0.4);
    overflow: hidden;
}

.dial-ticks {
    position: absolute;
    inset: 0;
}

.dial-ticks span {
    position: absolute;
    top: 5%;
    left: 50%;
    width: 2px;
    height: 12px;
    margin-left: -1px;
    background: var(--inkwell);
    opacity: 0.55;
    transform-origin: 50% calc(50vh);
}

.dial-ticks span:nth-child(1)  { transform: translateX(0) rotate(0deg)   translateY(0); top: 4%; }
.dial-ticks span:nth-child(2)  { transform: rotate(30deg)  translate(0, 0); transform-origin: 1px calc(45% + 2px);}
.dial-ticks span { transform-origin: center calc(50% - 4%); }
.dial-ticks span:nth-child(1)  { transform: rotate(0deg); }
.dial-ticks span:nth-child(2)  { transform: rotate(30deg); }
.dial-ticks span:nth-child(3)  { transform: rotate(60deg); }
.dial-ticks span:nth-child(4)  { transform: rotate(90deg); }
.dial-ticks span:nth-child(5)  { transform: rotate(120deg); }
.dial-ticks span:nth-child(6)  { transform: rotate(150deg); }
.dial-ticks span:nth-child(7)  { transform: rotate(180deg); }
.dial-ticks span:nth-child(8)  { transform: rotate(210deg); }
.dial-ticks span:nth-child(9)  { transform: rotate(240deg); }
.dial-ticks span:nth-child(10) { transform: rotate(270deg); }
.dial-ticks span:nth-child(11) { transform: rotate(300deg); }
.dial-ticks span:nth-child(12) { transform: rotate(330deg); }

.dial-needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 42%;
    margin-left: -2px;
    background: linear-gradient(to top, transparent 0%, var(--inkwell) 18%, var(--inkwell) 96%, var(--faded-rose-deep) 100%);
    transform-origin: 50% 100%;
    transform: translateY(-100%) rotate(0deg);
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
    transition: transform 0.2s var(--ease-velvet);
}

.dial-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #f7efd0 0%, var(--brass-mid) 60%, #8a7646 100%);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.5), 0 1px 2px rgba(0,0,0,0.3);
}

.dial-label {
    position: absolute;
    bottom: 18%;
    left: 50%;
    transform: translateX(-50%);
    font-family: "Kalam", cursive;
    font-style: italic;
    font-size: 0.8rem;
    color: var(--graphite-dust);
    letter-spacing: 0.05em;
}

.dial-annotations {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.annot {
    position: absolute;
    font-family: "Kalam", cursive;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--graphite-dust);
    opacity: 0.75;
    transition: all 0.3s var(--ease-velvet);
    white-space: nowrap;
}

.annot-n { top: 2%; left: 50%; transform: translateX(-50%); }
.annot-e { top: 50%; right: -2%; transform: translateY(-50%); }
.annot-s { bottom: 2%; left: 50%; transform: translateX(-50%); }
.annot-w { top: 50%; left: -2%; transform: translateY(-50%); }

.annot.highlight {
    opacity: 1;
    color: var(--faded-rose-deep);
    transform-origin: center;
}

.annot-n.highlight { transform: translateX(-50%) scale(1.12); }
.annot-e.highlight { transform: translateY(-50%) scale(1.12); }
.annot-s.highlight { transform: translateX(-50%) scale(1.12); }
.annot-w.highlight { transform: translateY(-50%) scale(1.12); }

.annot-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.annot-lines .dotted {
    stroke: var(--graphite-dust);
    stroke-width: 1;
    stroke-dasharray: 4 4;
    opacity: 0.45;
    fill: none;
}

/* =========================================
   CHAMBER 4 — The Passage
   ========================================= */
.chamber-4 {
    background: var(--evening-parlor);
    overflow: hidden;
}

.sky-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        var(--moth-wing) 0%,
        var(--bruised-lavender) 40%,
        var(--faded-rose) 70%,
        var(--candlelight) 100%);
    z-index: 1;
}

.keyhole-wrap {
    position: absolute;
    inset: 0;
    z-index: 5;
    transform: scale(1);
    transform-origin: center 42%;
    transition: transform 0.2s linear;
}

.keyhole {
    width: 100%;
    height: 100%;
}

.keyhole-frame circle,
.keyhole-frame path {
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
    transition: stroke-dashoffset 3s var(--ease-weighted);
}

.chamber-4.revealed .keyhole-frame circle,
.chamber-4.revealed .keyhole-frame path {
    stroke-dashoffset: 0;
}

.passage-label {
    position: absolute;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

/* =========================================
   CHAMBER 5 — The Archive
   ========================================= */
.chamber-5 {
    background: var(--evening-parlor);
}

.bg-specimen.hourglass {
    opacity: 0.2;
}

.bg-specimen.hourglass .sand-grains circle {
    fill: var(--candlelight);
    opacity: 0.65;
    animation: sandUp 5s linear infinite;
}

.bg-specimen.hourglass .sand-grains circle:nth-child(2n)  { animation-delay: 0.7s; }
.bg-specimen.hourglass .sand-grains circle:nth-child(3n)  { animation-delay: 1.8s; }
.bg-specimen.hourglass .sand-grains circle:nth-child(5n)  { animation-delay: 2.5s; }

@keyframes sandUp {
    0%   { transform: translateY(0);    opacity: 0; }
    15%  { opacity: 0.8; }
    85%  { opacity: 0.8; }
    100% { transform: translateY(-220px); opacity: 0; }
}

.archive-label {
    position: absolute;
    top: 4vh;
    left: 5vw;
    z-index: 12;
}

.archive-field {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

.arc-bubble {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, rgba(212, 160, 160, 0.18) 0%, rgba(155, 142, 196, 0.1) 60%, transparent 100%);
    border: 1px solid rgba(163, 184, 160, 0.35);
    box-shadow: inset 0 0 30px rgba(245, 222, 179, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    text-align: center;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s var(--ease-velvet);
    animation: bubbleDrift 9s var(--d, 0s) ease-in-out infinite;
}

.arc-bubble::before {
    content: "";
    position: absolute;
    top: 14%;
    left: 18%;
    width: 28%;
    height: 18%;
    border-radius: 50%;
    background: rgba(245, 222, 179, 0.22);
    filter: blur(2px);
}

.arc-bubble span {
    font-family: "Kalam", cursive;
    font-size: 0.82rem;
    line-height: 1.35;
    color: rgba(240, 230, 239, 0.85);
    font-style: italic;
}

.arc-bubble:hover {
    transform: scale(1.08);
    border-color: rgba(163, 184, 160, 0.65);
    box-shadow:
        0 0 20px rgba(155, 142, 196, 0.35),
        inset 0 0 30px rgba(245, 222, 179, 0.14);
}

/* =========================================
   CHAMBER 6 — The Seal
   ========================================= */
.chamber-6 {
    background: var(--moth-wing);
}

.seal-wrap {
    grid-column: 2 / span 10;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    z-index: 10;
}

.wax-seal-big {
    width: clamp(220px, 32vmin, 360px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 38% 32%, #eab9b9 0%, var(--faded-rose) 35%, var(--faded-rose-deep) 75%, #7e5555 100%),
        radial-gradient(circle, transparent 60%, rgba(0,0,0,0.15) 100%);
    box-shadow:
        inset 0 6px 14px rgba(255, 255, 255, 0.35),
        inset 0 -8px 20px rgba(80, 40, 40, 0.55),
        inset 0 0 0 10px rgba(184, 133, 133, 0.4),
        0 14px 30px rgba(42, 32, 53, 0.3),
        0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.5s var(--ease-weighted);
}

.wax-seal-big::before {
    content: "";
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    background: repeating-radial-gradient(circle at center,
        transparent 0,
        transparent 6px,
        rgba(0,0,0,0.05) 6px,
        rgba(0,0,0,0.05) 7px);
    pointer-events: none;
}

.wax-seal-big:hover {
    transform: rotate(6deg) scale(1.03);
}

.seal-impression {
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, rgba(255,255,255,0.08), transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 4px 10px rgba(80, 40, 40, 0.55);
}

.monogram {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: clamp(5rem, 14vmin, 9rem);
    color: rgba(60, 30, 30, 0.75);
    line-height: 1;
    text-shadow: 0 2px 2px rgba(255,255,255,0.2), 0 -1px 1px rgba(0,0,0,0.35);
}

.parting {
    font-family: "Caveat", cursive;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    color: var(--inkwell);
    letter-spacing: 0.03em;
    text-align: center;
    opacity: 0;
    transition: opacity 1.4s ease 0.6s;
}

.chamber-6.revealed .parting {
    opacity: 0.88;
}

/* =========================================
   BUBBLE FIELD (decorative, drifting)
   ========================================= */
.bubble-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    overflow: hidden;
}

.bubble-field .bubble {
    position: absolute;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, rgba(212, 160, 160, 0.22) 0%, rgba(155, 142, 196, 0.1) 60%, transparent 100%);
    border: 1px solid rgba(163, 184, 160, 0.3);
    animation: bubbleDrift var(--dur, 9s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

.bubble-field.warm .bubble {
    background:
        radial-gradient(circle at 35% 35%, rgba(245, 222, 179, 0.24) 0%, rgba(212, 160, 160, 0.1) 60%, transparent 100%);
    border-color: rgba(245, 222, 179, 0.28);
}

.bubble-field .bubble::before {
    content: "";
    position: absolute;
    top: 16%;
    left: 20%;
    width: 28%;
    height: 18%;
    border-radius: 50%;
    background: rgba(245, 222, 179, 0.25);
    filter: blur(1.5px);
}

@keyframes bubbleDrift {
    0%   { transform: translateY(0) translateX(0); }
    50%  { transform: translateY(-18px) translateX(6px); }
    100% { transform: translateY(0) translateX(0); }
}

/* =========================================
   MOBILE — graceful fallback (still full-bleed chambers)
   ========================================= */
@media (max-width: 720px) {
    .chamber-grid {
        padding: 3vh 5vw;
    }
    .grid-content { grid-column: 1 / span 12; }
    .grid-specimen { grid-column: 1 / span 12; opacity: 0.25; }
    .grid-specimen.small-right { grid-column: 1 / span 12; }
    .journal-page { width: 78%; min-height: 32%; }
    .page-a { top: 4%; left: 6%; }
    .page-b { top: 30%; left: 14%; }
    .page-c { top: 58%; left: 8%; }
    .instrument-wrap { width: 82vw; }
    .chamber-nav { right: 1.2vw; gap: 12px; }
    .wax-dot { width: 13px; height: 13px; }
}
