/* =====================================================================
   goomimi.com — Provisional Bureau for the Study of Audient Beings
   Palette: navy-metallic (1%) — darkroom navy + cool brass duotone
   Type: Zilla Slab (display) + Cormorant Infant (body) + Cormorant SC
   Layout: hexagonal-honeycomb grid, right-margin processional ribbon
   ===================================================================== */

:root {
    --c-ground:        #0E1726;  /* Ground Navy */
    --c-vellum-navy:   #142238;  /* Vellum Navy Two */
    --c-vellum-shade1: #1B2C44;  /* relief light */
    --c-vellum-shade2: #0A111F;  /* relief dark */
    --c-pewter:        #7C8CA8;  /* Pewter Mist */
    --c-brass:         #C9A86A;  /* Brass Antique */
    --c-bone:          #E8DDC4;  /* Bone Vellum */
    --c-leather:       #9A6B4F;  /* Old Leather (sparing) */
    --c-slate:         #3F5269;  /* Slate Midnight (duotone shadow) */
    --c-lamp:          #F2E6CE;  /* Lamp Glow (one place only) */

    --hex-side: 220px;
    --ribbon-w: 88px;
}

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

html, body {
    margin: 0;
    padding: 0;
    background: var(--c-ground);
    color: var(--c-bone);
    font-family: "Cormorant Infant", "Cormorant Garamond", Georgia, serif;
    font-size: 16.5px;
    line-height: 1.74;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    position: relative;
    padding: 0 var(--ribbon-w) 0 0;
}

/* ---------- Hairline hexagonal lattice (no parallax) ---------- */
.lattice {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.4s ease-out;
}
.lattice.visible {
    opacity: 0.04;
}

/* ---------- Listening Cone (top-left fixed) ---------- */
.listening-cone {
    position: fixed;
    top: 28px;
    left: 28px;
    width: 84px;
    height: 84px;
    z-index: 50;
    cursor: pointer;
    user-select: none;
    transform-origin: 14px 60px;
}
.listening-cone svg {
    display: block;
    overflow: visible;
}
.listening-cone .cone-rotor {
    transform: rotate(-12deg);
    transform-origin: 14px 60px;
    transition: transform 1.6s cubic-bezier(0.18, 0.74, 0.31, 1);
}
.listening-cone.settled .cone-rotor {
    transform: rotate(0deg);
}
.listening-cone .halo {
    position: absolute;
    top: 12px;
    left: 6px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 230, 206, 0.18) 0%, rgba(242, 230, 206, 0.0) 60%);
    pointer-events: none;
    transform-origin: center;
    animation: halo-breathe 2s ease-in-out infinite;
    opacity: 0.18;
}
.listening-cone .cone-label {
    position: absolute;
    top: 88px;
    left: 0;
    font-family: "Cormorant SC", "Cormorant Infant", serif;
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    color: var(--c-pewter);
    text-transform: uppercase;
}
@keyframes halo-breathe {
    0%, 100% { transform: scale(1.00); opacity: 0.08; }
    50%      { transform: scale(1.04); opacity: 0.12; }
}

/* ---------- Index overlay ---------- */
.index-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(14, 23, 38, 0.94);
    backdrop-filter: blur(2px);
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity 0.6s ease-out;
}
.index-overlay.visible {
    opacity: 1;
}
.index-overlay[hidden] { display: none; }
.index-inner {
    max-width: 720px;
    width: 90%;
    text-align: center;
}
.index-eyebrow {
    font-family: "Cormorant SC", serif;
    color: var(--c-pewter);
    letter-spacing: 0.2em;
    font-size: 0.86rem;
    margin-bottom: 1.6rem;
}
.index-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}
.index-list li {
    border: 0.75px solid var(--c-pewter);
    padding: 1.2rem 0.6rem;
    color: var(--c-bone);
    cursor: pointer;
    transition: border-color 240ms ease, color 240ms ease;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: rgba(20, 34, 56, 0.4);
    aspect-ratio: 1 / 0.866;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.index-list li:hover {
    border-color: var(--c-brass);
    color: var(--c-brass);
}
.index-list .kor {
    font-family: "Noto Serif KR", serif;
    font-size: 1.4rem;
    font-weight: 500;
}
.index-list .ttl {
    font-family: "Zilla Slab", serif;
    font-size: 0.86rem;
    margin-top: 0.4rem;
    letter-spacing: -0.012em;
}
.index-close {
    margin-top: 2rem;
    background: none;
    border: 0.75px solid var(--c-pewter);
    color: var(--c-pewter);
    padding: 0.5rem 1.4rem;
    font-family: "Cormorant SC", serif;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    cursor: pointer;
    transition: color 240ms ease, border-color 240ms ease;
}
.index-close:hover {
    color: var(--c-brass);
    border-color: var(--c-brass);
}

/* ---------- Right-margin processional ribbon ---------- */
.ribbon {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--ribbon-w);
    height: 100vh;
    z-index: 40;
    pointer-events: none;
}
.ribbon-line {
    position: absolute;
    top: 0;
    right: 36px;
    width: 12px;
    height: 100%;
    overflow: visible;
}
.ribbon-ticks {
    position: absolute;
    top: 7%;
    right: 18px;
    bottom: 9%;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: auto;
}
.ribbon-ticks li button {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--c-pewter);
    font-family: "Noto Serif KR", serif;
    font-size: 0.94rem;
    transition: color 360ms ease;
}
.ribbon-ticks .tick {
    width: 6px;
    height: 1px;
    background: var(--c-pewter);
    display: inline-block;
    margin-right: 6px;
    transition: width 240ms ease, background-color 240ms ease, height 240ms ease;
    transform-origin: right;
}
.ribbon-ticks .kor {
    opacity: 0;
    transition: opacity 0.6s ease, color 360ms ease;
    font-weight: 500;
}
.ribbon-ticks .rom {
    font-family: "Cormorant SC", serif;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    color: var(--c-pewter);
    margin-left: 4px;
    opacity: 0;
    transition: opacity 0.6s ease, color 360ms ease;
}
.ribbon-ticks li.revealed .kor,
.ribbon-ticks li.revealed .rom { opacity: 1; }
.ribbon-ticks li.active button { color: var(--c-brass); }
.ribbon-ticks li.active .tick {
    width: 10px;
    height: 1.4px;
    background: var(--c-brass);
}
.ribbon-ticks li.active .kor,
.ribbon-ticks li.active .rom {
    color: var(--c-brass);
}
.ribbon-ticks li button:hover {
    color: var(--c-brass);
}
.ribbon-tassel {
    position: absolute;
    bottom: 1.6%;
    right: 24px;
    width: 28px;
    height: 50px;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.ribbon-tassel.visible { opacity: 0.9; }
.ribbon-tassel.glimmer {
    filter: drop-shadow(0 0 6px rgba(242, 230, 206, 0.32));
}

/* ---------- Halls ---------- */
.halls {
    position: relative;
    z-index: 2;
}
.hall {
    position: relative;
    min-height: 100vh;
    padding: 14vh 6vw 10vh 6vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.station {
    position: absolute;
    top: 4vh;
    left: 6vw;
    display: flex;
    align-items: center;
    gap: 2rem;
    pointer-events: none;
    width: calc(94vw - var(--ribbon-w));
}
.station-num {
    font-family: "Zilla Slab", serif;
    font-weight: 500;
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: -0.012em;
    color: var(--c-vellum-navy);
    transform: translateY(0.18em);
    text-shadow:
        1px 1px 0 var(--c-vellum-shade2),
        -1px -1px 0 var(--c-vellum-shade1);
}
.station-seam {
    flex: 1;
    height: 0.5px;
    background-image: linear-gradient(
        to right,
        transparent 0,
        transparent 4px,
        var(--c-pewter) 4px,
        var(--c-pewter) 10px,
        transparent 10px,
        transparent 16px
    );
    background-size: 16px 0.5px;
    background-repeat: repeat-x;
    transform: skewX(-30deg);
    transform-origin: left;
    opacity: 0.5;
}
.hall:first-child .station { display: none; }

/* ---------- Hex grid (two-up, two-down offset rows) ---------- */
.hex-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, 540px) minmax(220px, 360px);
    gap: 36px;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    max-width: 1080px;
    width: 100%;
}
/* offset row pattern: alternate halls shift the second cell down */
.hall:nth-child(odd) .hex-grid > .plate-hex {
    transform: translateY(72px);
}
.hall:nth-child(even) .hex-grid > .plate-hex {
    transform: translateY(-58px);
}

/* Hex shape — flat-top hexagon via clip-path */
.hex {
    position: relative;
    aspect-ratio: 1 / 0.866;
    /* "0.75px hairlines in #7C8CA8" -> faux border via inner clip */
    color: var(--c-bone);
}
.hex::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--c-pewter);
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    z-index: 0;
}
.hex::after {
    content: "";
    position: absolute;
    inset: 0.75px;
    background: var(--c-ground);
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    z-index: 1;
}
.hex.prose-hex {
    background: transparent;
}
.hex.prose-hex.wide {
    /* span entire grid */
    grid-column: 1 / -1;
    aspect-ratio: 1 / 0.55;
    max-width: 880px;
    margin: 0 auto;
}
.hex .hex-inner {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12% 14%;
    text-align: center;
}
.prose-hex .hex-inner {
    text-align: left;
}
.prose-hex.wide .hex-inner {
    padding: 5% 12%;
    text-align: left;
}

/* Highlighted hex (when active) */
.hex.is-active::after {
    background: var(--c-vellum-navy);
}

/* ---------- Typography in halls ---------- */
.hall-eyebrow {
    font-family: "Cormorant SC", serif;
    font-weight: 500;
    color: var(--c-pewter);
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    margin: 0 0 0.6rem;
    text-transform: uppercase;
}
.hall-eyebrow .kor-num {
    font-family: "Noto Serif KR", serif;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
    color: var(--c-brass);
    margin-right: 0.4em;
}
.masthead {
    font-family: "Zilla Slab", serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-size: clamp(4rem, 9vw, 7rem);
    line-height: 1;
    color: var(--c-bone);
    margin: 0.2rem 0 0.5rem;
}
.masthead.small {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 500;
    letter-spacing: -0.012em;
}
.subtitle {
    font-family: "Cormorant Infant", serif;
    font-style: italic;
    font-weight: 400;
    color: var(--c-pewter);
    font-size: 1.05rem;
    margin: 0 0 1.4rem;
    line-height: 1.5;
}
.hall-title {
    font-family: "Zilla Slab", serif;
    font-weight: 500;
    letter-spacing: -0.012em;
    font-size: clamp(2.6rem, 5.4vw, 4.4rem);
    line-height: 1.04;
    color: var(--c-bone);
    margin: 0 0 1.2rem;
}
.hall-title em {
    font-family: "Cormorant Infant", serif;
    font-style: italic;
    font-weight: 400;
    font-size: 0.6em;
    letter-spacing: 0;
    color: var(--c-pewter);
}
.prose {
    max-width: 36ch;
    margin: 0 0 1rem;
    color: var(--c-bone);
    font-size: 1rem;
    line-height: 1.74;
    font-weight: 400;
}
.prose em {
    color: var(--c-leather);
    font-style: italic;
    font-weight: 500;
}
.curator-aside {
    color: var(--c-leather);
    font-style: italic;
    font-weight: 500;
    font-size: 0.96rem;
    margin: 0.4rem 0 1rem;
    max-width: 36ch;
}
.catalogue {
    font-family: "Cormorant SC", serif;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    color: var(--c-pewter);
    margin-top: 1.2rem;
    text-transform: uppercase;
}

/* ---------- Ear-print glyph (replaces final period) ---------- */
.earprint {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 0.32em;
    vertical-align: -2px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><g fill='none' stroke='%23C9A86A' stroke-width='0.9' stroke-linecap='round'><path d='M7 7 m -0.6 0 a 0.6 0.6 0 1 1 1.2 0 a 0.6 0.6 0 1 1 -1.2 0'/><path d='M7 7 m -1.6 0 a 1.6 1.6 0 1 1 3.2 0'/><path d='M7 7 m -2.6 0 a 2.6 2.6 0 1 1 5.2 0 a 2.6 2.6 0 0 1 -2.4 2.6'/><path d='M7 7 m -3.6 -0.4 a 3.6 3.6 0 1 1 7 0.7'/><path d='M7 7 m -4.6 -0.6 a 4.6 4.6 0 1 1 9 1.4'/><path d='M7 7 m -5.6 -0.8 a 5.6 5.6 0 1 1 11 2.0'/></g></svg>");
    background-repeat: no-repeat;
    background-size: contain;
    transform-origin: center;
    transition: transform 4.2s linear;
}
.earprint.spin {
    transform: rotate(360deg);
}

/* ---------- Lists (Hall III nine ears) ---------- */
.nine-ears {
    list-style: none;
    margin: 0.6rem 0 1.4rem;
    padding: 0;
    display: grid;
    gap: 0.6rem;
    max-width: 56ch;
}
.nine-ears li {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 0.5px solid rgba(124, 140, 168, 0.22);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.nine-ears li.revealed {
    opacity: 1;
    transform: translateY(0);
}
.nine-ears .ear-mark {
    font-family: "Noto Serif KR", serif;
    font-weight: 500;
    color: var(--c-brass);
    font-size: 1.18rem;
    flex: 0 0 auto;
    min-width: 2.4em;
}
.nine-ears .ear-line {
    color: var(--c-bone);
    font-style: italic;
    font-size: 1rem;
    line-height: 1.6;
    flex: 1;
}

/* ---------- Phenomena (Hall IV) ---------- */
.phenomena {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 1.2rem;
    max-width: 36ch;
}
.phenomena li {
    padding-left: 1.4em;
    text-indent: -1.4em;
    margin-bottom: 0.4rem;
    color: var(--c-bone);
}
.phenomena li::before {
    content: "—";
    color: var(--c-brass);
    margin-right: 0.6em;
}

/* ---------- Protocol (Hall VII) ---------- */
.protocol {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 1.2rem;
    max-width: 40ch;
    counter-reset: proto;
}
.protocol li {
    display: grid;
    grid-template-columns: 2em 1fr;
    gap: 0.6rem;
    padding: 0.4rem 0;
    color: var(--c-bone);
    border-bottom: 0.5px solid rgba(124, 140, 168, 0.18);
}
.protocol li:last-child { border-bottom: 0; }
.protocol .proto-n {
    font-family: "Cormorant SC", serif;
    color: var(--c-brass);
    letter-spacing: 0.06em;
    font-size: 0.86rem;
    text-align: right;
}

/* ---------- Field notes (Hall VIII) ---------- */
.field-note {
    margin: 0 0 1rem;
    padding-left: 0.8rem;
    border-left: 0.5px solid var(--c-pewter);
    max-width: 40ch;
}
.note-date {
    font-family: "Cormorant SC", serif;
    color: var(--c-pewter);
    letter-spacing: 0.16em;
    font-size: 0.74rem;
    margin: 0 0 0.3rem;
    text-transform: uppercase;
}

/* ---------- Plates (duotone images) ---------- */
.plate-hex .hex-inner {
    padding: 14% 12% 16% 12%;
}
.plate {
    width: 78%;
    aspect-ratio: 1 / 1;
    border: 1px solid rgba(201, 168, 106, 0.6);
    overflow: hidden;
    background: var(--c-slate);
}
.plate svg {
    display: block;
    width: 100%;
    height: 100%;
}
.plate-caption {
    margin-top: 0.7rem;
    font-family: "Cormorant SC", serif;
    color: var(--c-pewter);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-align: center;
    text-transform: lowercase;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 220ms ease, transform 220ms ease;
}
.plate-hex:hover .plate-caption {
    opacity: 1;
    transform: translateY(0);
}
.plate-hex.small {
    transform: translateY(-32px) scale(0.78);
}
.hall:nth-child(odd) .hex-grid > .plate-hex.small { transform: translateY(38px) scale(0.78); }

/* ---------- Scattered listening tubes (Hall IV, VII) ---------- */
.scattered-tube {
    position: absolute;
    width: 70px;
    height: 70px;
    pointer-events: none;
    transition: filter 220ms ease;
}
.scattered-tube:hover {
    filter: drop-shadow(0 0 8px rgba(242, 230, 206, 0.4));
}
.tube-iv  { right: -32px; top: 14%; transform: rotate(-12deg); }
.tube-vii { left: 4%; bottom: 8%; transform: rotate(18deg); }

/* ---------- Closing tube (Hall IX) ---------- */
.closing-tube {
    width: 88px;
    height: 88px;
    margin-top: 1rem;
    opacity: 0.86;
}
.colophon .hex-inner {
    align-items: flex-start;
}
.prose.closing {
    color: var(--c-leather);
    font-style: italic;
    font-size: 1.06rem;
    margin-top: 1rem;
    max-width: 44ch;
}

/* ---------- Initial fade-in for masthead (opening sequence) ---------- */
.masthead, .subtitle {
    opacity: 0;
    animation: fade-up 1.2s ease-out forwards;
    animation-delay: 2.4s;
}
.subtitle { animation-delay: 3s; }

@keyframes fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Mobile (≤ 720px) ---------- */
@media (max-width: 720px) {
    body {
        padding: 0 36px 0 0;
    }
    .listening-cone {
        top: 16px;
        left: 16px;
        width: 56px;
        height: 56px;
    }
    .listening-cone svg { width: 56px; height: 56px; }
    .listening-cone .halo { width: 64px; height: 64px; top: 8px; left: 4px; }
    .listening-cone .cone-label { display: none; }

    .ribbon { width: 36px; }
    .ribbon-line { right: 12px; }
    .ribbon-ticks { right: 4px; }
    .ribbon-ticks .tick { width: 4px; }
    .ribbon-ticks .kor { font-size: 0.72rem; }
    .ribbon-ticks .rom { display: none; }
    .ribbon-tassel { right: 8px; bottom: 1%; width: 18px; height: 32px; }

    .hex-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .hall:nth-child(odd) .hex-grid > .plate-hex,
    .hall:nth-child(even) .hex-grid > .plate-hex {
        transform: none;
    }
    .hex { aspect-ratio: 1 / 0.92; }
    .hex.prose-hex.wide { aspect-ratio: 1 / 0.95; }
    .hex .hex-inner { padding: 12% 10%; }
    .station { left: 4vw; width: 86vw; }
    .station-seam { display: none; }

    .hall { padding: 12vh 4vw 8vh 4vw; }
    .scattered-tube { display: none; }

    .nine-ears { max-width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .listening-cone .cone-rotor,
    .listening-cone .halo,
    .earprint,
    .ribbon-ticks .tick,
    .nine-ears li {
        transition: none !important;
        animation: none !important;
    }
    .lattice { opacity: 0.04; transition: none; }
    .listening-cone .cone-rotor { transform: rotate(0deg); }
    .nine-ears li { opacity: 1; transform: none; }
    .masthead, .subtitle { opacity: 1; animation: none; }
}
