/* =============================================================
   miris.quest :: The Blue Archive
   Blobitecture meets Garamond. Ethereal blue with one warm flame.
   ============================================================= */

:root {
    --midnight-ink: #0E1E2A;
    --tidal-blue: #1B3A4B;
    --ocean-mist: #3D7A9E;
    --soft-cerulean: #5B9BB5;
    --glacial-glow: #7EB8D4;
    --ice-spark: #A8D8EA;
    --frost-white: #E8F4F8;
    --candlewick-amber: #D4A054;
    --candle-error: #C4602A;
    --muted-ocean: #2C5F7A;
    --soft-teal: #4A8BA8;
    --faded-azure: #5B9BB5;
    --b8d8e8: #B8D8E8;

    --blob-morph-duration: 12s;
    --flicker-speed: 3s;
    --shake-duration: 0.4s;

    --font-display: "EB Garamond", "Cormorant Garamond", Garamond, serif;
    --font-body: "Cormorant Garamond", Garamond, serif;
    --font-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html, body {
    background: var(--midnight-ink);
    color: var(--frost-white);
    font-family: var(--font-body);
    font-size: 19px;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    background:
        radial-gradient(ellipse at 18% 12%, rgba(212, 160, 84, 0.08), transparent 40%),
        radial-gradient(ellipse at 80% 30%, rgba(91, 155, 181, 0.18), transparent 55%),
        radial-gradient(ellipse at 50% 80%, rgba(126, 184, 212, 0.10), transparent 60%),
        linear-gradient(180deg, #0E1E2A 0%, #122636 30%, #1B3A4B 65%, #0E1E2A 100%);
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    scroll-behavior: smooth;
}

/* Grain texture overlay */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.35;
    mix-blend-mode: overlay;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(232,244,248,0.08) 1px, transparent 1px),
        radial-gradient(circle at 3px 7px, rgba(14,30,42,0.10) 1px, transparent 1px);
    background-size: 4px 4px, 6px 6px;
}

/* =================== TYPOGRAPHY HELPERS =================== */
em { font-style: italic; }

::selection {
    background: var(--candlewick-amber);
    color: var(--midnight-ink);
}

/* =================== BLOB NAVIGATION =================== */
.blob-nav {
    position: fixed;
    top: 28px;
    right: 32px;
    z-index: 100;
    display: flex;
    gap: 6px;
    padding: 6px;
    align-items: center;
}

.blob-button {
    position: relative;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tidal-blue);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    will-change: transform;
    filter: drop-shadow(0 4px 14px rgba(126,184,212,0.18));
}

.blob-button:nth-child(1) { animation: nav-breathe 6s ease-in-out infinite; }
.blob-button:nth-child(2) { animation: nav-breathe 5.4s ease-in-out infinite 0.4s; }
.blob-button:nth-child(3) { animation: nav-breathe 6.6s ease-in-out infinite 0.9s; }
.blob-button:nth-child(4) { animation: nav-breathe 5.8s ease-in-out infinite 1.5s; }
.blob-button:nth-child(5) { animation: nav-breathe 6.2s ease-in-out infinite 2.1s; }

@keyframes nav-breathe {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-3px) scale(1.04); }
}

.blob-button .blob-shape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: var(--b8d8e8);
    opacity: 0.62;
    transition: opacity 0.3s ease, fill 0.3s ease;
}

.blob-button:hover {
    transform: scale(1.18);
    filter: drop-shadow(0 4px 22px rgba(212,160,84,0.4));
}
.blob-button:hover .blob-shape {
    opacity: 0.92;
    fill: var(--ice-spark);
}

.blob-button .glyph {
    position: relative;
    z-index: 2;
    color: var(--tidal-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blob-button .glyph svg { stroke: var(--tidal-blue); color: var(--tidal-blue); }
.flame-fill { fill: var(--candlewick-amber); animation: flicker var(--flicker-speed) ease-in-out infinite alternate; }

/* Tooltip blob */
.tooltip-blob {
    position: fixed;
    pointer-events: none;
    width: 180px;
    height: 70px;
    z-index: 200;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
    transition: opacity 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
}

.tooltip-blob.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.tooltip-shape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: var(--ice-spark);
    opacity: 0.92;
    filter: drop-shadow(0 4px 14px rgba(14,30,42,0.4));
}

.tooltip-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-style: italic;
    color: var(--midnight-ink);
    font-size: 18px;
    letter-spacing: -0.01em;
}

/* =================== HERO =================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}

.hero-atmosphere {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 30%, rgba(212,160,84,0.10), transparent 35%),
        radial-gradient(ellipse at 50% 50%, rgba(91,155,181,0.18), transparent 65%),
        radial-gradient(ellipse at 70% 70%, rgba(126,184,212,0.10), transparent 50%);
    filter: blur(2px);
    z-index: 1;
}

.hero-blob-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    filter: drop-shadow(0 22px 60px rgba(14,30,42,0.55));
}

.hero-blob {
    width: min(72vmin, 700px);
    height: min(72vmin, 700px);
    overflow: visible;
    will-change: transform;
    animation: hero-float 11s ease-in-out infinite;
}

@keyframes hero-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-12px) rotate(0.6deg); }
}

.hero-blob-fill {
    transform-origin: center;
}

.hero-blob-edgeglow {
    filter: blur(3px);
    opacity: 0.7;
}

.hero-photo {
    mix-blend-mode: luminosity;
    filter: sepia(0.3) saturate(0.7) contrast(1.1) brightness(0.9);
}

.hero-candle-halo {
    mix-blend-mode: screen;
    animation: candle-pulse 5s ease-in-out infinite alternate;
}

@keyframes candle-pulse {
    0%   { opacity: 0.55; transform: translateX(-4px); }
    100% { opacity: 0.85; transform: translateX(2px); }
}

/* Satellite orbit cluster */
.satellite-cluster {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.satellite {
    position: absolute;
    width: 110px;
    height: 110px;
    top: 50%;
    left: 50%;
    margin-left: -55px;
    margin-top: -55px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: default;
    will-change: transform;
}

.satellite .blob-shape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: var(--soft-cerulean);
    opacity: 0.55;
    filter: drop-shadow(0 2px 12px rgba(126,184,212,0.4));
}

.satellite-word {
    position: relative;
    z-index: 2;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 17px;
    color: var(--frost-white);
    letter-spacing: -0.01em;
    text-shadow: 0 1px 6px rgba(14,30,42,0.7);
}

.satellite-1 { animation: orbit-1 22s linear infinite; }
.satellite-2 { animation: orbit-2 28s linear infinite reverse; }
.satellite-3 { animation: orbit-3 32s linear infinite; }
.satellite-4 { animation: orbit-4 26s linear infinite reverse; }

@keyframes orbit-1 {
    0%   { transform: translate(0, -260px) scale(0.9); }
    25%  { transform: translate(290px, -60px) scale(1.0); }
    50%  { transform: translate(20px, 240px) scale(0.85); }
    75%  { transform: translate(-280px, 20px) scale(1.0); }
    100% { transform: translate(0, -260px) scale(0.9); }
}

@keyframes orbit-2 {
    0%   { transform: translate(240px, -120px) scale(0.7); }
    33%  { transform: translate(-50px, 260px) scale(0.85); }
    66%  { transform: translate(-260px, -100px) scale(0.7); }
    100% { transform: translate(240px, -120px) scale(0.7); }
}

@keyframes orbit-3 {
    0%   { transform: translate(-180px, 180px) scale(0.8); }
    25%  { transform: translate(180px, 180px) scale(0.95); }
    50%  { transform: translate(180px, -180px) scale(0.8); }
    75%  { transform: translate(-180px, -180px) scale(0.95); }
    100% { transform: translate(-180px, 180px) scale(0.8); }
}

@keyframes orbit-4 {
    0%   { transform: translate(0, 280px) scale(0.7); }
    33%  { transform: translate(260px, 60px) scale(0.85); }
    66%  { transform: translate(-260px, -60px) scale(0.85); }
    100% { transform: translate(0, 280px) scale(0.7); }
}

/* Hero typography content */
.hero-content {
    position: relative;
    z-index: 4;
    text-align: center;
    max-width: 720px;
    padding: 0 32px;
    pointer-events: none;
}

.hero-content > * { pointer-events: auto; }

.hero-eyebrow {
    font-family: var(--font-ui);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--faded-azure);
    margin-bottom: 18px;
    opacity: 0.85;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(64px, 11vmin, 128px);
    line-height: 1.0;
    letter-spacing: -0.03em;
    color: var(--frost-white);
    text-shadow: 0 4px 30px rgba(14,30,42,0.6);
    margin-bottom: 22px;
}

.hero-title .dotted-i {
    position: relative;
    font-style: normal;
}
.hero-title .dotted-i::after {
    content: "";
    position: absolute;
    top: 0.06em;
    left: 50%;
    transform: translateX(-50%);
    width: 0.16em;
    height: 0.16em;
    border-radius: 50%;
    background: var(--candlewick-amber);
    box-shadow:
        0 0 8px rgba(212,160,84,0.8),
        0 0 18px rgba(212,160,84,0.5),
        0 0 32px rgba(212,160,84,0.25);
    animation: flicker var(--flicker-speed) ease-in-out infinite alternate;
}

.hero-title .hero-period {
    color: var(--candlewick-amber);
    animation: flicker 4s ease-in-out infinite alternate;
}

.hero-title .hero-quest {
    font-style: italic;
    font-weight: 500;
    color: var(--ice-spark);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(18px, 2.2vmin, 22px);
    color: var(--frost-white);
    opacity: 0.92;
    max-width: 580px;
    margin: 0 auto 18px;
    line-height: 1.55;
}

.hero-meta {
    font-family: var(--font-ui);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--faded-azure);
    opacity: 0.85;
}

.meta-flicker {
    color: var(--candlewick-amber);
    font-size: 14px;
    animation: flicker 2.4s ease-in-out infinite alternate;
}

@keyframes flicker {
    0%, 100% { opacity: 0.85; filter: brightness(0.92); }
    20%      { opacity: 1.0;  filter: brightness(1.08); }
    40%      { opacity: 0.65; filter: brightness(0.78); }
    60%      { opacity: 0.95; filter: brightness(1.0); }
    80%      { opacity: 0.7;  filter: brightness(0.85); }
}

/* =================== WAX DRIP DIVIDER =================== */
.wax-drip {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 110px;
    z-index: 4;
    pointer-events: none;
    transform-origin: top;
    animation: wax-pulse 8s ease-in-out infinite alternate;
}

.wax-drip-blue { animation-duration: 9s; }

@keyframes wax-pulse {
    0%   { transform: scaleY(1.0); }
    100% { transform: scaleY(1.005); }
}

/* =================== CHAMBERS =================== */
.chamber {
    position: relative;
    padding: 160px 32px 120px;
    z-index: 2;
    overflow: hidden;
}

.chamber-blob {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

.chamber-blob-one   { animation: chamber-breathe 14s ease-in-out infinite; }
.chamber-blob-two   { animation: chamber-breathe 16s ease-in-out infinite reverse; }
.chamber-blob-three { animation: chamber-breathe 18s ease-in-out infinite; }
.chamber-blob-four  { animation: chamber-breathe 20s ease-in-out infinite reverse; }

@keyframes chamber-breathe {
    0%, 100% { transform: scale(1) translateY(0); }
    50%      { transform: scale(1.012) translateY(-6px); }
}

.chamber-inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.chamber-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 80px;
}

.chamber-numeral {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ice-spark);
    margin-bottom: 22px;
    opacity: 0.9;
    padding: 8px 18px;
    background: rgba(168,216,234,0.08);
    border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.chamber-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(44px, 7vmin, 84px);
    line-height: 1.06;
    letter-spacing: -0.025em;
    color: var(--frost-white);
    margin-bottom: 20px;
}

.chamber-title em {
    color: var(--ice-spark);
    font-weight: 600;
}

.chamber-lede {
    font-family: var(--font-body);
    font-size: clamp(19px, 2.2vmin, 22px);
    line-height: 1.6;
    color: var(--frost-white);
    opacity: 0.9;
    max-width: 620px;
    margin: 0 auto;
}

/* =================== BLOB GRID =================== */
.blob-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 60px 50px;
    margin-top: 40px;
}

.blob-card {
    position: relative;
    width: 360px;
    min-height: 460px;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
    will-change: transform;
    filter: drop-shadow(0 18px 36px rgba(14,30,42,0.45));
}

.blob-card:nth-child(1) { transform: translateY(0) rotate(-1deg); animation: card-drift 10s ease-in-out infinite alternate; }
.blob-card:nth-child(2) { transform: translateY(20px) rotate(1deg);  animation: card-drift 12s ease-in-out infinite alternate-reverse; }
.blob-card:nth-child(3) { transform: translateY(-10px) rotate(-0.5deg); animation: card-drift 11s ease-in-out infinite alternate; }

@keyframes card-drift {
    0%   { transform: translateY(0) rotate(-1deg); }
    100% { transform: translateY(-12px) rotate(0.5deg); }
}

.blob-card:hover {
    filter: drop-shadow(0 22px 44px rgba(212,160,84,0.25));
}

.card-shape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.blob-card[data-blob="alpha"] .card-shape path { fill: rgba(61,122,158,0.95); }
.blob-card[data-blob="beta"]  .card-shape path { fill: rgba(91,155,181,0.92); }
.blob-card[data-blob="gamma"] .card-shape path { fill: rgba(43,95,122,0.95); }

.card-photo {
    position: relative;
    z-index: 1;
    width: 80%;
    height: 160px;
    margin: 0 auto 18px;
    border-radius: 55% 45% 60% 40% / 50% 60% 40% 50%;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(14,30,42,0.55);
    filter: sepia(0.3) saturate(0.6) contrast(1.05) brightness(0.9);
    mix-blend-mode: luminosity;
    background: var(--midnight-ink);
}

.ken-burns {
    position: absolute;
    inset: -8%;
    background-position: center;
    background-size: cover;
    will-change: transform;
    animation: ken-burns 24s ease-in-out infinite alternate;
}

@keyframes ken-burns {
    0%   { transform: scale(1.0) translate(0, 0); }
    100% { transform: scale(1.10) translate(-2%, 1%); }
}

/* Faux-vintage compositions per card via SVG data-uris */
.kb-1 {
    background-image:
        radial-gradient(circle at 30% 30%, #5B9BB5 0%, #1B3A4B 60%, #0E1E2A 100%),
        linear-gradient(180deg, #3D7A9E, #1B3A4B 70%, #0E1E2A);
    background-blend-mode: multiply;
}
.kb-2 {
    background-image:
        radial-gradient(ellipse at 60% 40%, rgba(168,216,234,0.55), rgba(27,58,75,0.95) 70%),
        linear-gradient(180deg, #2C5F7A, #0E1E2A);
}
.kb-3 {
    background-image:
        radial-gradient(circle at 50% 70%, #5B9BB5, #1B3A4B 70%, #0E1E2A);
    background-blend-mode: multiply;
}
.kb-feature {
    background-image:
        radial-gradient(ellipse at 35% 30%, rgba(212,160,84,0.30), transparent 45%),
        radial-gradient(circle at 50% 50%, #5B9BB5, #1B3A4B 65%, #0E1E2A 100%);
}

.card-body {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--frost-white);
    padding: 0 4px;
}

.card-label {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 11px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--ice-spark);
    opacity: 0.85;
    margin-bottom: 8px;
}

.card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 24px;
    line-height: 1.18;
    letter-spacing: -0.015em;
    color: var(--frost-white);
    margin-bottom: 12px;
}

.card-title em {
    font-style: italic;
    color: var(--ice-spark);
    font-weight: 500;
}

.card-text {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--frost-white);
    opacity: 0.88;
}

/* =================== CHAMBER TWO :: Two Column =================== */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.column-text {
    position: relative;
}

.column-text .chamber-numeral {
    margin-bottom: 18px;
    text-align: left;
}

.column-text .chamber-title {
    text-align: left;
    margin-bottom: 16px;
}

.column-text .chamber-lede {
    text-align: left;
    margin: 0 0 32px;
    max-width: none;
}

.diary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.diary-list li {
    display: flex;
    gap: 22px;
    padding: 14px 0;
    border-bottom: 1px dashed rgba(168,216,234,0.18);
}

.diary-time {
    font-family: var(--font-ui);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--candlewick-amber);
    flex: 0 0 70px;
    padding-top: 4px;
    opacity: 0.92;
}

.diary-entry {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.55;
    color: var(--frost-white);
    opacity: 0.92;
}

.diary-entry em {
    color: var(--ice-spark);
}

.column-feature {
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-blob {
    position: relative;
    width: 480px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    filter: drop-shadow(0 26px 50px rgba(14,30,42,0.55));
    animation: feature-float 7s ease-in-out infinite alternate;
}

@keyframes feature-float {
    0%   { transform: translateY(0) rotate(-1deg); }
    100% { transform: translateY(-16px) rotate(1deg); }
}

.feature-shape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.feature-photo {
    position: absolute;
    top: 18%;
    left: 18%;
    width: 64%;
    height: 50%;
    border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
    overflow: hidden;
    box-shadow: inset 0 0 60px rgba(14,30,42,0.6);
    filter: sepia(0.3) saturate(0.6) contrast(1.1) brightness(0.9);
    mix-blend-mode: luminosity;
    z-index: 1;
}

.feature-caption {
    position: absolute;
    bottom: 12%;
    left: 12%;
    right: 12%;
    z-index: 2;
    text-align: center;
    color: var(--frost-white);
}

.feature-caption .card-label {
    margin-bottom: 6px;
}

.feature-caption p {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 16px;
    line-height: 1.4;
    color: var(--frost-white);
    opacity: 0.9;
}

/* =================== CHAMBER THREE :: Tickle Index =================== */
.tickle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 32px;
    max-width: 980px;
    margin: 0 auto 90px;
}

.ticklish-blob {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
    will-change: transform;
    filter: drop-shadow(0 14px 30px rgba(14,30,42,0.42));
    font-family: inherit;
    color: inherit;
}

.ticklish-blob .card-shape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.ticklish-1 .card-shape path { fill: var(--soft-cerulean); animation: blob-breathe 7s ease-in-out infinite alternate; }
.ticklish-2 .card-shape path { fill: var(--ocean-mist);    animation: blob-breathe 8s ease-in-out infinite alternate-reverse; }
.ticklish-3 .card-shape path { fill: var(--soft-cerulean); animation: blob-breathe 9s ease-in-out infinite alternate; }
.ticklish-4 .card-shape path { fill: var(--ocean-mist);    animation: blob-breathe 6.5s ease-in-out infinite alternate-reverse; }
.ticklish-5 .card-shape path { fill: var(--glacial-glow);  animation: blob-breathe 7.5s ease-in-out infinite alternate; opacity: 0.85; }
.ticklish-6 .card-shape path { fill: var(--ocean-mist);    animation: blob-breathe 8.5s ease-in-out infinite alternate-reverse; }

@keyframes blob-breathe {
    0%   { transform: scale(1) translateY(0); }
    100% { transform: scale(1.04) translateY(-3px); }
}

.ticklish-glyph {
    position: relative;
    z-index: 2;
    font-family: var(--font-display);
    font-size: 36px;
    color: var(--frost-white);
    text-shadow: 0 2px 10px rgba(14,30,42,0.6);
    transition: transform 0.3s ease, color 0.3s ease;
}

.ticklish-blob:hover .ticklish-glyph {
    color: var(--candlewick-amber);
    transform: scale(1.1);
}

.ticklish-blob.shake {
    animation: shake var(--shake-duration) cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes shake {
    0%   { transform: translateX(0) rotate(0deg); }
    25%  { transform: translateX(-4px) rotate(-1.2deg); }
    50%  { transform: translateX(3px) rotate(0.8deg); }
    75%  { transform: translateX(-2px) rotate(-0.6deg); }
    100% { transform: translateX(0) rotate(0deg); }
}

/* =================== ARCHIVE FORM =================== */
.archive-form {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 40px 70px;
    position: relative;
    text-align: center;
}

.archive-form::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 40% 40%, rgba(126,184,212,0.12), transparent 60%),
        rgba(27,58,75,0.55);
    border-radius: 60% 40% 55% 45% / 50% 60% 45% 55%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
    box-shadow: 0 20px 60px rgba(14,30,42,0.5);
}

.form-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 36px;
    line-height: 1.1;
    color: var(--frost-white);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.form-title em {
    color: var(--ice-spark);
    font-weight: 500;
}

.form-lede {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 17px;
    color: var(--frost-white);
    opacity: 0.85;
    margin-bottom: 36px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 26px;
    text-align: left;
    margin-bottom: 30px;
}

.form-field {
    display: block;
}

.form-label {
    display: block;
    font-family: var(--font-ui);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ice-spark);
    opacity: 0.9;
    margin-bottom: 10px;
}

.form-blob-input {
    position: relative;
    display: block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 8px 22px rgba(14,30,42,0.4));
}

.input-blob {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.input-blob path {
    fill: rgba(168,216,234,0.18);
    stroke: rgba(126,184,212,0.5);
    stroke-width: 1.2;
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.form-blob-input:focus-within .input-blob path {
    fill: rgba(168,216,234,0.32);
    stroke: rgba(212,160,84,0.7);
}

.form-blob-input input,
.form-blob-input textarea {
    position: relative;
    z-index: 1;
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--frost-white);
    font-family: var(--font-display);
    font-size: 19px;
    padding: 18px 32px;
    line-height: 1.5;
    resize: none;
}

.form-blob-input.form-blob-text input,
.form-blob-input.form-blob-text textarea { padding: 22px 36px; }

.form-blob-input input::placeholder,
.form-blob-input textarea::placeholder {
    color: rgba(232,244,248,0.45);
    font-style: italic;
}

.form-blob-input.shake {
    animation: shake var(--shake-duration) cubic-bezier(0.34, 1.56, 0.64, 1);
}

.form-blob-input.shake .input-blob path {
    fill: rgba(196,96,42,0.18);
    stroke: var(--candle-error);
    animation: error-flicker 0.6s ease-in-out;
}

@keyframes error-flicker {
    0%, 100% { opacity: 1; }
    20%      { opacity: 0.4; }
    40%      { opacity: 1; }
    60%      { opacity: 0.5; }
    80%      { opacity: 1; }
}

.form-submit {
    position: relative;
    width: 240px;
    height: 80px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
    filter: drop-shadow(0 12px 28px rgba(14,30,42,0.45));
}

.submit-blob {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.submit-blob path {
    fill: var(--candlewick-amber);
    transition: fill 0.3s ease;
}

.form-submit span {
    position: relative;
    z-index: 1;
    font-family: var(--font-ui);
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--midnight-ink);
}

.form-submit:hover {
    transform: scale(1.06) translateY(-2px);
}

.form-submit:hover .submit-blob path {
    fill: var(--ice-spark);
}

.form-submit.success .submit-blob path {
    fill: var(--ice-spark);
}

/* =================== CHAMBER FOUR :: Closing =================== */
.closing {
    text-align: center;
}

.closing-blob-wrap {
    position: relative;
    margin: 50px auto 70px;
    max-width: 720px;
    filter: drop-shadow(0 28px 60px rgba(14,30,42,0.55));
}

.closing-blob {
    width: 100%;
    height: auto;
    overflow: visible;
}

.candle-glow {
    mix-blend-mode: screen;
    animation: candle-pulse 4s ease-in-out infinite alternate;
    transform-origin: 300px 220px;
}

.candle-flame {
    transform-origin: 300px 250px;
    animation: flame-dance 1.3s ease-in-out infinite alternate;
}

@keyframes flame-dance {
    0%   { transform: scaleX(0.94) scaleY(1.0) translateX(-1px); }
    50%  { transform: scaleX(1.04) scaleY(0.96) translateX(1px); }
    100% { transform: scaleX(0.96) scaleY(1.04) translateX(-2px); }
}

.candle-flame-inner {
    transform-origin: 300px 230px;
    animation: flame-dance 0.9s ease-in-out infinite alternate-reverse;
}

.closing-quote {
    position: relative;
    margin-top: -40px;
    padding: 0 32px;
    font-family: var(--font-display);
    font-size: clamp(20px, 2.6vmin, 26px);
    line-height: 1.5;
    color: var(--frost-white);
    opacity: 0.92;
}

.closing-quote em {
    color: var(--ice-spark);
}

/* Footer */
.archive-foot {
    border-top: 1px dashed rgba(168,216,234,0.22);
    padding-top: 50px;
    margin-top: 30px;
}

.foot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 36px;
    text-align: center;
    margin-bottom: 36px;
}

.foot-block {
    padding: 20px;
}

.foot-label {
    display: block;
    font-family: var(--font-ui);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--faded-azure);
    opacity: 0.85;
    margin-bottom: 8px;
}

.foot-text {
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1.3;
    color: var(--frost-white);
    letter-spacing: -0.01em;
}

.foot-text em {
    font-style: italic;
    color: var(--ice-spark);
}

.foot-flicker {
    color: var(--candlewick-amber);
    animation: flicker 2.8s ease-in-out infinite alternate;
}

.foot-fineprint {
    text-align: center;
    font-family: var(--font-ui);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--faded-azure);
    opacity: 0.7;
    margin-top: 20px;
}

/* =================== REVEAL ON SCROLL =================== */
.reveal {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
    transition: opacity 0.9s cubic-bezier(0.42, 0, 0.58, 1), transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* =================== SHADOW PUPPETRY (mousemove) =================== */
.blob-card,
.feature-blob,
.ticklish-blob,
.closing-blob-wrap {
    --shadow-x: 0px;
    --shadow-y: 18px;
}

.blob-card,
.ticklish-blob {
    box-shadow:
        var(--shadow-x) var(--shadow-y) 36px rgba(14,30,42,0.45);
}

/* =================== RESPONSIVE =================== */
@media (max-width: 900px) {
    .two-column {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .column-text .chamber-title,
    .column-text .chamber-lede,
    .column-text .chamber-numeral { text-align: center; }
    .column-text .chamber-numeral { margin-left: auto; margin-right: auto; }
    .feature-blob { width: 380px; }
    .blob-card { width: 320px; min-height: 420px; padding: 38px 36px; }
    .satellite { width: 84px; height: 84px; margin-left: -42px; margin-top: -42px; }
    .satellite-word { font-size: 13px; }
}

@media (max-width: 560px) {
    .blob-nav { top: 18px; right: 18px; gap: 4px; padding: 4px; }
    .blob-button { width: 44px; height: 44px; }
    .chamber { padding: 100px 22px 80px; }
    .chamber-header { margin-bottom: 50px; }
    .blob-grid { gap: 36px 18px; }
    .blob-card { width: 100%; max-width: 340px; }
    .feature-blob { width: 100%; max-width: 340px; }
    .archive-form { padding: 40px 24px 50px; }
    .form-blob-input input,
    .form-blob-input textarea { padding: 16px 26px; font-size: 17px; }
    .satellite { display: none; }
    .satellite-1, .satellite-3 { display: flex; }
    .hero-blob { width: 88vmin; height: 88vmin; }
    .closing-quote { padding: 0 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .satellite, .blob-card, .feature-blob,
    .chamber-blob-one, .chamber-blob-two, .chamber-blob-three, .chamber-blob-four,
    .candle-flame, .candle-flame-inner, .candle-glow,
    .hero-blob, .ticklish-blob .card-shape path,
    .blob-button { animation: none; }
}
