/* tanso.center — Carbon Science Exhibition Hall
   Aesthetic: muji + neomorphism + Japanese science museum
   Palette: Museum Gray surface (#e8e8e8) with paired light/dark shadows
*/

:root {
    /* Palette from DESIGN.md */
    --surface: #e8e8e8;
    --surface-soft: #d1d1d1;
    --surface-light: #ffffff;
    --ink: #2a2a2a;
    --ink-soft: #3a3a3a;
    --gray-mid: #5a8a6a;        /* Bamboo Green accent */
    --gray-warm: #8a8a8a;       /* Exhibit Gray */
    --indigo: #4a5568;          /* Museum Indigo */
    --amber: #d4a036;           /* Carbon Amber (warm accent) */
    --neutral-pale: #d1d1d1;

    /* Neomorphic shadow tokens */
    --raise-lg: 12px 12px 24px var(--surface-soft), -12px -12px 24px var(--surface-light);
    --raise-md: 8px 8px 16px var(--surface-soft), -8px -8px 16px var(--surface-light);
    --raise-sm: 5px 5px 10px var(--surface-soft), -5px -5px 10px var(--surface-light);
    --raise-xs: 3px 3px 6px var(--surface-soft), -3px -3px 6px var(--surface-light);
    --inset-md: inset 4px 4px 8px var(--surface-soft), inset -4px -4px 8px var(--surface-light);
    --inset-sm: inset 2px 2px 4px var(--surface-soft), inset -2px -2px 4px var(--surface-light);

    /* Typography */
    --font-jp-head: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
    --font-en-head: 'Manrope', 'Inter', system-ui, sans-serif;
    --font-body: 'Noto Sans JP', 'Zen Kaku Gothic New', sans-serif;
    --font-label: 'Sawarabi Gothic', 'Noto Sans JP', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    background: var(--surface);
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 28px;
    font-weight: 400;
    color: var(--ink);
    background: var(--surface);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ambient surface noise — fixed overlay for matte texture */
.surface-noise {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0.55;
    mix-blend-mode: multiply;
}

/* ============== Museum Entrance Sequence ============== */

.entrance-overlay {
    position: fixed;
    inset: 0;
    background: var(--surface);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    transition: opacity 700ms ease, visibility 700ms ease;
}

.entrance-overlay.entrance-fade {
    opacity: 0;
    visibility: hidden;
}

.entrance-card {
    position: relative;
    width: 180px;
    height: 220px;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 0 0 var(--surface-soft), 0 0 0 var(--surface-light);
    transition: box-shadow 800ms cubic-bezier(0.22, 0.61, 0.36, 1);
    display: grid;
    place-items: center;
    color: var(--ink);
}

.entrance-card.entrance-card-rise {
    box-shadow: var(--raise-lg);
}

.entrance-num {
    position: absolute;
    top: 16px;
    left: 20px;
    font-family: var(--font-en-head);
    font-weight: 600;
    font-size: 18px;
    color: var(--indigo);
    letter-spacing: 0.02em;
    opacity: 0;
    transition: opacity 600ms ease 200ms;
}

.entrance-mass {
    position: absolute;
    bottom: 16px;
    right: 20px;
    font-family: var(--font-label);
    font-size: 13px;
    color: var(--gray-warm);
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 600ms ease 320ms;
}

.entrance-symbol {
    font-family: var(--font-en-head);
    font-weight: 800;
    font-size: 110px;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
    opacity: 0;
    transition: opacity 700ms ease 200ms;
}

.entrance-card.entrance-card-rise .entrance-num,
.entrance-card.entrance-card-rise .entrance-symbol,
.entrance-card.entrance-card-rise .entrance-mass {
    opacity: 1;
}

.entrance-title {
    font-family: var(--font-en-head);
    font-weight: 700;
    font-size: 30px;
    letter-spacing: -0.01em;
    color: var(--ink);
    min-height: 40px;
    display: flex;
}

.entrance-title .ec-char {
    opacity: 0;
    transform: translateY(6px);
    display: inline-block;
    transition: opacity 220ms ease, transform 220ms ease;
}

.entrance-title .ec-char.show {
    opacity: 1;
    transform: translateY(0);
}

.entrance-sub {
    font-family: var(--font-label);
    font-size: 13px;
    line-height: 20px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gray-warm);
    opacity: 0;
    transition: opacity 500ms ease 300ms;
}

.entrance-overlay.subtitle-on .entrance-sub {
    opacity: 1;
}

/* ============== Persistent Identity Card (top-right) ============== */

.identity-card {
    position: fixed;
    top: 28px;
    right: 32px;
    width: 80px;
    height: 80px;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--raise-md);
    z-index: 50;
    display: grid;
    place-items: center;
    transition: box-shadow 200ms ease, transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 500ms ease;
    opacity: 0;
    transform: scale(0.6);
    color: var(--ink);
    will-change: transform;
}

.identity-card.identity-on {
    opacity: 1;
    transform: scale(1);
}

.identity-card .id-num {
    position: absolute;
    top: 6px;
    left: 9px;
    font-family: var(--font-en-head);
    font-weight: 600;
    font-size: 11px;
    color: var(--indigo);
}

.identity-card .id-symbol {
    font-family: var(--font-en-head);
    font-weight: 800;
    font-size: 38px;
    line-height: 1;
    color: var(--ink);
    letter-spacing: -0.02em;
    animation: id-rotate 30s linear infinite;
    transform-origin: center;
}

.identity-card .id-mass {
    position: absolute;
    bottom: 6px;
    right: 9px;
    font-family: var(--font-label);
    font-size: 9px;
    color: var(--gray-warm);
    letter-spacing: 0.04em;
}

@keyframes id-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============== Top Navigation ============== */

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 140px 18px 48px;
    background: var(--surface);
    z-index: 40;
    opacity: 0;
    transition: opacity 600ms ease;
}

.top-nav.nav-on {
    opacity: 1;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--ink);
}

.nav-brand .brand-mark {
    font-family: var(--font-jp-head);
    font-weight: 700;
    font-size: 20px;
    color: var(--indigo);
    letter-spacing: 0.04em;
}

.nav-brand .brand-name {
    font-family: var(--font-en-head);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.nav-channel {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--inset-md);
}

.nav-link {
    font-family: var(--font-en-head);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--gray-warm);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    transition: color 220ms ease, font-weight 220ms ease, box-shadow 220ms ease;
}

.nav-link:hover {
    color: var(--ink);
}

.nav-link.active {
    color: var(--ink);
    font-weight: 600;
    box-shadow: var(--raise-xs);
    background: var(--surface);
}

.nav-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-label);
    font-size: 13px;
    color: var(--gray-warm);
    letter-spacing: 0.04em;
}

.nav-meta .meta-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-mid);
    box-shadow: 0 0 0 3px rgba(90, 138, 106, 0.15);
}

/* ============== Hall (main) ============== */

.hall {
    position: relative;
    z-index: 5;
    max-width: 1280px;
    margin: 0 auto;
    padding: 160px 48px 200px;
}

/* ============== Exhibits ============== */

.exhibit {
    position: relative;
    margin-bottom: 110px;
    scroll-margin-top: 110px;
}

.exhibit-number {
    font-family: var(--font-en-head);
    font-weight: 800;
    font-size: 120px;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--ink);
    opacity: 0.05;
    margin-bottom: -44px;
    margin-left: -8px;
    user-select: none;
    pointer-events: none;
}

.exhibit-grid {
    display: grid;
    grid-template-columns: 55fr 5fr 40fr;
    align-items: stretch;
    gap: 0;
}

.exhibit-grid.reverse {
    grid-template-columns: 40fr 5fr 55fr;
}

.exhibit-grid > .panel-major {
    grid-column: 1;
}

.exhibit-grid > .panel-diagram {
    grid-column: 3;
}

.exhibit-grid.reverse > .panel-diagram {
    grid-column: 1;
}

.exhibit-grid.reverse > .panel-major {
    grid-column: 3;
}

/* ============== Panels ============== */

.panel {
    position: relative;
    background: var(--surface);
    border-radius: 18px;
    padding: 48px;
    box-shadow: 2px 2px 6px var(--surface-soft), -2px -2px 6px var(--surface-light);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms ease, transform 500ms cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 500ms ease;
    will-change: transform, opacity, box-shadow;
}

.panel.panel-rise {
    opacity: 1;
    transform: translateY(0);
    box-shadow: var(--raise-md);
}

.panel-major {
    min-height: 420px;
}

.panel-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    gap: 22px;
    min-height: 420px;
}

.panel-label {
    font-family: var(--font-label);
    font-size: 13px;
    line-height: 20px;
    color: var(--gray-warm);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.panel-headline {
    font-family: var(--font-en-head);
    font-weight: 700;
    font-size: 30px;
    line-height: 40px;
    color: var(--ink);
    letter-spacing: -0.015em;
    margin-bottom: 6px;
}

h1.panel-headline {
    font-size: 38px;
    line-height: 48px;
}

.panel-headline-jp {
    font-family: var(--font-jp-head);
    font-weight: 700;
    font-size: 22px;
    line-height: 32px;
    color: var(--indigo);
    letter-spacing: 0.04em;
    margin-bottom: 22px;
}

.panel-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 28px;
    color: var(--ink-soft);
    margin-bottom: 16px;
}

.panel-body strong {
    font-weight: 700;
    color: var(--ink);
}

.panel-body em {
    font-style: italic;
    color: var(--indigo);
}

/* ============== Recessed Divider ============== */

.recessed-divider {
    height: 6px;
    border-radius: 3px;
    background: var(--surface);
    box-shadow: var(--inset-sm);
    margin: 28px 0;
}

/* ============== Atrium card (Exhibit 01) ============== */

.atrium-card {
    position: relative;
    width: 240px;
    height: 280px;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--raise-lg);
    margin: 12px auto 4px;
    display: grid;
    place-items: center;
    color: var(--ink);
}

.atrium-num {
    position: absolute;
    top: 18px;
    left: 22px;
    font-family: var(--font-en-head);
    font-weight: 600;
    font-size: 22px;
    color: var(--indigo);
}

.atrium-c {
    font-family: var(--font-en-head);
    font-weight: 800;
    font-size: 130px;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.atrium-mass {
    position: absolute;
    bottom: 50px;
    right: 22px;
    font-family: var(--font-label);
    font-size: 13px;
    color: var(--gray-warm);
}

.atrium-config {
    position: absolute;
    bottom: 26px;
    left: 22px;
    font-family: var(--font-label);
    font-size: 13px;
    color: var(--gray-warm);
    letter-spacing: 0.04em;
}

.atrium-name {
    position: absolute;
    bottom: 26px;
    right: 22px;
    font-family: var(--font-en-head);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.22em;
    color: var(--gray-warm);
    text-transform: uppercase;
}

/* ============== Diagram pieces ============== */

.diagram-label {
    font-family: var(--font-label);
    font-size: 13px;
    line-height: 20px;
    color: var(--gray-warm);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.allotrope-svg {
    width: 240px;
    height: 240px;
    filter: drop-shadow(2px 2px 3px rgba(209, 209, 209, 0.7))
            drop-shadow(-2px -2px 3px rgba(255, 255, 255, 0.85));
}

.allotrope-svg .allotrope-strokes line,
.allotrope-svg .allotrope-strokes polygon,
.allotrope-svg .allotrope-strokes circle,
.allotrope-svg .allotrope-strokes ellipse,
.allotrope-svg .allotrope-strokes rect {
    fill: none;
    stroke: var(--indigo);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 400ms ease;
}

.allotrope-svg .allotrope-nodes circle {
    r: 3;
    fill: var(--indigo);
    stroke: none;
    transition: fill 400ms ease;
}

.allotrope-svg .archive-marks circle {
    fill: var(--amber);
    stroke: none;
}

.exhibit.allotrope-active .allotrope-svg .allotrope-strokes line,
.exhibit.allotrope-active .allotrope-svg .allotrope-strokes polygon,
.exhibit.allotrope-active .allotrope-svg .allotrope-strokes circle,
.exhibit.allotrope-active .allotrope-svg .allotrope-strokes ellipse,
.exhibit.allotrope-active .allotrope-svg .allotrope-strokes rect {
    stroke: var(--ink);
}

.exhibit.allotrope-active .allotrope-svg {
    filter: drop-shadow(0 0 6px rgba(212, 160, 54, 0.18))
            drop-shadow(2px 2px 3px rgba(209, 209, 209, 0.7))
            drop-shadow(-2px -2px 3px rgba(255, 255, 255, 0.85));
}

.diagram-caption {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 24px;
    color: var(--gray-warm);
    max-width: 320px;
    margin-top: 4px;
}

/* ============== Data list (specs) ============== */

.data-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.data-row {
    display: grid;
    grid-template-columns: 38% auto;
    align-items: baseline;
    gap: 16px;
    padding: 8px 0;
    border-top: 1px solid transparent;
}

.data-row + .data-row {
    border-top: 1px solid rgba(138, 138, 138, 0.18);
}

.data-row dt {
    font-family: var(--font-label);
    font-size: 13px;
    line-height: 20px;
    color: var(--gray-warm);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.data-row dd {
    font-family: var(--font-en-head);
    font-weight: 500;
    font-size: 15px;
    line-height: 22px;
    color: var(--ink);
    letter-spacing: 0.01em;
}

/* ============== Atrium meta blocks ============== */

.panel-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 12px;
}

.meta-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--inset-sm);
}

.meta-key {
    font-family: var(--font-label);
    font-size: 12px;
    color: var(--gray-warm);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.meta-value {
    font-family: var(--font-en-head);
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
}

/* ============== Archive grid ============== */

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 24px;
    margin-top: 6px;
}

.archive-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: var(--inset-sm);
}

.archive-key {
    font-family: var(--font-label);
    font-size: 12px;
    color: var(--gray-warm);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.archive-value {
    font-family: var(--font-en-head);
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
}

/* ============== Allotrope Navigator (bottom-left) ============== */

.allotrope-nav {
    position: fixed;
    left: 28px;
    bottom: 28px;
    z-index: 45;
    background: var(--surface);
    border-radius: 16px;
    padding: 14px 14px 16px;
    box-shadow: var(--raise-md);
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 168px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.allotrope-nav.anav-on {
    opacity: 1;
    transform: translateY(0);
}

.anav-label {
    font-family: var(--font-label);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gray-warm);
    padding: 4px 6px 8px;
    border-bottom: 1px solid rgba(138, 138, 138, 0.18);
    margin-bottom: 4px;
}

.anav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: none;
    background: var(--surface);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    color: var(--gray-warm);
    transition: box-shadow 200ms ease, color 200ms ease, transform 150ms ease;
    font-family: var(--font-en-head);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.anav-item svg {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
}

.anav-strokes line,
.anav-strokes polygon,
.anav-strokes circle,
.anav-strokes ellipse {
    fill: none;
    stroke: var(--indigo);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 200ms ease;
}

.anav-item:hover {
    color: var(--ink);
    box-shadow: var(--raise-xs);
}

.anav-item:hover .anav-strokes line,
.anav-item:hover .anav-strokes polygon,
.anav-item:hover .anav-strokes circle,
.anav-item:hover .anav-strokes ellipse {
    stroke: var(--ink);
}

.anav-item:active {
    box-shadow: var(--inset-sm);
    transform: translateY(0);
}

.anav-item.anav-active {
    color: var(--ink);
    font-weight: 600;
    box-shadow: var(--raise-xs);
}

.anav-item.anav-active .anav-strokes line,
.anav-item.anav-active .anav-strokes polygon,
.anav-item.anav-active .anav-strokes circle,
.anav-item.anav-active .anav-strokes ellipse {
    stroke: var(--ink);
}

.anav-item.anav-active::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 6px rgba(212, 160, 54, 0.55);
    margin-left: auto;
}

/* ============== Footer Plate ============== */

.footer-plate {
    position: relative;
    z-index: 5;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 48px 80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-line {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-en-head);
    font-size: 14px;
    color: var(--ink);
}

.footer-line.subtle {
    font-family: var(--font-label);
    font-size: 13px;
    color: var(--gray-warm);
    letter-spacing: 0.06em;
}

.footer-key {
    font-weight: 700;
}

.footer-sep {
    color: var(--gray-warm);
}

/* ============== Responsive ============== */

@media (max-width: 1100px) {
    .top-nav {
        padding: 18px 120px 18px 32px;
    }
    .nav-channel {
        gap: 0;
    }
    .nav-link {
        padding: 8px 10px;
        font-size: 12px;
    }
}

@media (max-width: 900px) {
    .hall {
        padding: 140px 28px 160px;
    }

    .top-nav {
        padding: 14px 100px 14px 24px;
        height: 76px;
    }

    .nav-meta {
        display: none;
    }

    .exhibit-grid,
    .exhibit-grid.reverse {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .exhibit-grid > .panel-major,
    .exhibit-grid > .panel-diagram,
    .exhibit-grid.reverse > .panel-major,
    .exhibit-grid.reverse > .panel-diagram {
        grid-column: 1;
    }

    .panel {
        padding: 36px 30px;
        min-height: 0;
    }

    .panel-major {
        min-height: 0;
    }

    .panel-diagram {
        min-height: 0;
    }

    .panel-meta,
    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    h1.panel-headline {
        font-size: 30px;
        line-height: 40px;
    }

    .exhibit-number {
        font-size: 88px;
        margin-bottom: -28px;
    }

    .identity-card {
        top: 18px;
        right: 18px;
        width: 64px;
        height: 64px;
    }

    .identity-card .id-symbol {
        font-size: 30px;
    }

    .allotrope-nav {
        width: 138px;
        left: 18px;
        bottom: 18px;
        padding: 10px 10px 12px;
    }

    .anav-item svg {
        width: 26px;
        height: 26px;
        flex: 0 0 26px;
    }

    .anav-name {
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    .top-nav .nav-channel {
        display: none;
    }

    .nav-brand .brand-mark {
        font-size: 18px;
    }

    .top-nav {
        padding: 14px 86px 14px 22px;
    }

    .footer-plate {
        padding: 0 24px 64px;
    }

    .panel {
        padding: 28px 22px;
    }

    .atrium-card {
        width: 200px;
        height: 240px;
    }

    .atrium-c {
        font-size: 100px;
    }

    .allotrope-svg {
        width: 200px;
        height: 200px;
    }

    .panel-meta,
    .archive-grid {
        grid-template-columns: 1fr;
    }

    .data-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .allotrope-nav {
        display: none;
    }
}
