/* showa.boo — translucent-frost / bento-box / street-style */

:root {
    --midnight: #1A1A2E;
    --frost: #E8E0D0;
    --teal: #00C9A7;
    --glass: rgba(232, 224, 208, 0.08);
    --glass-strong: rgba(232, 224, 208, 0.14);
    --ghost: #4A5568;
    --amber: #D4A574;
    --purple: #2D2048;
    --gap: 3px;

    --font-kanji: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
    --font-display: "Nunito", system-ui, sans-serif;
    --font-body: "Noto Sans JP", "Nunito", sans-serif;
    --font-mono: "Ubuntu Mono", "Menlo", monospace;
}

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

html, body {
    background: var(--midnight);
    color: var(--frost);
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.1vw, 1.08rem);
    line-height: 1.74;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    position: relative;
}

/* -------- Circuit background across entire page -------- */
.circuit-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-color: var(--midnight);
    background-image:
        radial-gradient(circle at 20% 10%, rgba(45, 32, 72, 0.55), transparent 50%),
        radial-gradient(circle at 85% 80%, rgba(0, 201, 167, 0.08), transparent 55%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'><g fill='none' stroke='%2300C9A7' stroke-width='0.6' opacity='0.22'><path d='M0 40 L80 40 L80 80 L160 80 L160 20 L240 20'/><path d='M0 120 L40 120 L40 160 L140 160 L140 200 L240 200'/><path d='M0 200 L60 200 L60 240'/><path d='M40 0 L40 30'/><path d='M120 0 L120 60 L200 60 L200 120 L240 120'/></g><g fill='%2300C9A7' opacity='0.35'><circle cx='80' cy='40' r='2'/><circle cx='160' cy='80' r='2'/><circle cx='160' cy='20' r='2'/><circle cx='40' cy='120' r='2'/><circle cx='140' cy='160' r='2'/><circle cx='140' cy='200' r='2'/><circle cx='120' cy='60' r='2'/><circle cx='200' cy='60' r='2'/><circle cx='200' cy='120' r='2'/></g></svg>");
    background-size: auto, auto, 240px 240px;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* -------- Header -------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.1rem clamp(1rem, 3vw, 2.4rem);
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.92), rgba(26, 26, 46, 0.6));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 201, 167, 0.22);
}

.brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    letter-spacing: -0.02em;
}
.brand-mark { color: var(--frost); }
.brand-dot { color: var(--amber); }
.brand-boo {
    color: var(--teal);
    font-style: italic;
    position: relative;
}
.brand-boo::after {
    content: "";
    position: absolute;
    inset: -4px -6px;
    border: 1px solid rgba(0,201,167,0.25);
    border-radius: 4px;
    pointer-events: none;
}

.site-nav {
    display: flex;
    gap: clamp(0.6rem, 2vw, 1.6rem);
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ghost);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.nav-status { color: var(--teal); }

/* -------- Bento grid -------- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: var(--gap);
    padding: var(--gap);
    background: var(--midnight);
    position: relative;
    margin: 1.2rem clamp(0.5rem, 2vw, 1.8rem);
    border: 1px solid rgba(0, 201, 167, 0.18);
}

.panel {
    position: relative;
    padding: clamp(1rem, 2vw, 1.6rem);
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    transition: background 0.4s ease, transform 0.4s ease;
}
.panel:hover {
    background: var(--glass-strong);
}

.panel-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ghost);
}
.panel-meta .panel-id { color: var(--teal); }
.panel-meta .panel-title { color: var(--frost); }

/* Panel A — Neon Ghost, 2x2 */
.panel-a {
    grid-column: span 2;
    grid-row: span 2;
    justify-content: space-between;
    min-height: 420px;
}
.kanji-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.kanji-display {
    font-family: var(--font-kanji);
    font-weight: 900;
    font-size: clamp(4rem, 10vw, 9rem);
    color: var(--frost);
    line-height: 0.9;
    letter-spacing: -0.04em;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 24px rgba(0, 201, 167, 0.25), 0 0 60px rgba(0, 201, 167, 0.12);
    user-select: none;
}
.kanji-shadow {
    position: absolute;
    top: 8px;
    left: 8px;
    font-family: var(--font-kanji);
    font-weight: 900;
    font-size: clamp(4rem, 10vw, 9rem);
    color: transparent;
    -webkit-text-stroke: 1px rgba(0, 201, 167, 0.4);
    line-height: 0.9;
    letter-spacing: -0.04em;
    z-index: 1;
    pointer-events: none;
}
.kanji-subtitle {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--ghost);
    font-size: 0.98rem;
    max-width: 34ch;
    margin-top: 0.8rem;
}
.ripple-host {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}
.ripple {
    position: absolute;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    border: 2px solid var(--teal);
    background: radial-gradient(circle, rgba(0,201,167,0.25), transparent 70%);
    opacity: 0.5;
    transform: scale(0);
    animation: rippleOut 600ms ease-out forwards;
}
@keyframes rippleOut {
    0%   { transform: scale(0); opacity: 0.55; }
    100% { transform: scale(4); opacity: 0; }
}

/* Panel B — Frequency, 1x1 */
.panel-b {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 200px;
}
.frequency-stage {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.frequency-wave {
    position: absolute;
    inset: 10% 0;
    width: 100%;
    height: 80%;
    opacity: 0.9;
}
.freq-readout {
    position: relative;
    z-index: 2;
    font-family: var(--font-mono);
    color: var(--frost);
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}
.freq-num {
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--teal);
    letter-spacing: 0.04em;
}
.freq-unit {
    font-size: 0.85rem;
    color: var(--ghost);
    letter-spacing: 0.1em;
}
.freq-bars {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 40px;
}
.freq-bars span {
    display: block;
    width: 4px;
    background: var(--teal);
    border-radius: 1px;
    animation: barPulse 1.2s ease-in-out infinite;
    height: 20%;
}
.freq-bars span:nth-child(1) { animation-delay: 0.0s; }
.freq-bars span:nth-child(2) { animation-delay: 0.1s; }
.freq-bars span:nth-child(3) { animation-delay: 0.2s; }
.freq-bars span:nth-child(4) { animation-delay: 0.3s; }
.freq-bars span:nth-child(5) { animation-delay: 0.4s; }
.freq-bars span:nth-child(6) { animation-delay: 0.5s; }
.freq-bars span:nth-child(7) { animation-delay: 0.6s; }
.freq-bars span:nth-child(8) { animation-delay: 0.7s; }
@keyframes barPulse {
    0%, 100% { height: 18%; opacity: 0.6; }
    50%      { height: 92%; opacity: 1; }
}

/* Panel C — Archive ticker, 2x1 */
.panel-c {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 170px;
    background: linear-gradient(90deg, rgba(26,26,46,0.94), rgba(45,32,72,0.72));
    border: 1px solid rgba(0, 201, 167, 0.2);
}
.ticker-container {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    border-top: 1px solid rgba(0, 201, 167, 0.2);
    border-bottom: 1px solid rgba(0, 201, 167, 0.2);
    padding: 0.9rem 0;
    margin-top: 0.4rem;
}
.ticker-track {
    display: inline-flex;
    gap: 2rem;
    white-space: nowrap;
    animation: ticker 42s linear infinite;
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--frost);
}
.ticker-item { color: var(--frost); }
.ticker-sep { color: var(--amber); }
@keyframes ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Panel D — Circuit, 1x2 */
.panel-d {
    grid-column: span 1;
    grid-row: span 2;
    background: #131324;
    padding-bottom: 1rem;
    min-height: 420px;
}
.circuit-svg {
    flex: 1;
    width: 100%;
    height: auto;
    min-height: 320px;
}
.pulse-dot {
    animation: pulse 2.4s ease-in-out infinite;
}
.pulse-dot:nth-of-type(2) { animation-delay: 1.1s; }
@keyframes pulse {
    0%, 100% { opacity: 0.2; r: 2; }
    50%      { opacity: 1;   r: 4; }
}
.circuit-label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px dashed rgba(0,201,167,0.25);
}

/* Panel E — 3D Object, 1x1 */
.panel-e {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 200px;
    justify-content: space-between;
    background: rgba(45, 32, 72, 0.35);
}
.cube-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 600px;
    perspective-origin: 50% 50%;
    margin: 0.5rem 0;
}
.cube {
    width: 110px;
    height: 110px;
    position: relative;
    transform-style: preserve-3d;
    animation: spin 25s linear infinite;
}
.cube-face {
    position: absolute;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-kanji);
    font-weight: 900;
    font-size: 2.4rem;
    color: var(--frost);
    background: rgba(0, 201, 167, 0.10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 201, 167, 0.45);
    box-shadow: inset 0 0 30px rgba(0,201,167,0.08);
}
.cube-face-front  { transform: translateZ(55px); }
.cube-face-back   { transform: rotateY(180deg) translateZ(55px); }
.cube-face-right  { transform: rotateY( 90deg) translateZ(55px); }
.cube-face-left   { transform: rotateY(-90deg) translateZ(55px); }
.cube-face-top    { transform: rotateX( 90deg) translateZ(55px); color: var(--teal); }
.cube-face-bottom { transform: rotateX(-90deg) translateZ(55px); color: var(--amber); }
@keyframes spin {
    from { transform: rotateX(-18deg) rotateY(0deg); }
    to   { transform: rotateX(-18deg) rotateY(360deg); }
}
.object-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    border-top: 1px dashed rgba(0,201,167,0.22);
    padding-top: 0.5rem;
}

/* Panel F — Wave, 2x1 */
.panel-f {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 200px;
    background: rgba(26, 26, 46, 0.7);
    justify-content: flex-end;
}
.wave-stage {
    flex: 1;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-top: 0.4rem;
}
.wave-svg {
    width: 200%;
    height: 100%;
    min-height: 150px;
    animation: waveDrift 12s linear infinite;
}
.wave-path { will-change: transform; }
.wave-1 { animation: waveWiggle 6s ease-in-out infinite; transform-origin: center; }
.wave-2 { animation: waveWiggle 8s ease-in-out infinite reverse; }
.wave-3 { animation: waveWiggle 10s ease-in-out infinite; }
.wave-4 { animation: waveWiggle 14s ease-in-out infinite reverse; }
@keyframes waveDrift {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@keyframes waveWiggle {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}
.wave-caption {
    position: absolute;
    top: 0.4rem;
    right: 0.6rem;
    color: var(--ghost);
}

/* -------- Archive strip -------- */
.archive-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--gap);
    padding: var(--gap);
    margin: 1.2rem clamp(0.5rem, 2vw, 1.8rem) 0;
    background: var(--midnight);
    border: 1px solid rgba(0, 201, 167, 0.18);
}
.strip-col {
    padding: 1.1rem 1.2rem;
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.strip-key {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ghost);
}
.strip-val {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--frost);
    font-size: 1.05rem;
}
.strip-col-amber .strip-val { color: var(--amber); }

/* -------- Manifesto -------- */
.manifesto {
    margin: 2rem clamp(0.5rem, 2vw, 1.8rem);
    padding: clamp(1.6rem, 3vw, 2.8rem);
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 201, 167, 0.22);
    position: relative;
    overflow: hidden;
}
.manifesto::before {
    content: "";
    position: absolute;
    top: -30%;
    right: -20%;
    width: 60%;
    height: 160%;
    background: radial-gradient(circle, rgba(0,201,167,0.12), transparent 60%);
    pointer-events: none;
}
.manifesto-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    color: var(--frost);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    position: relative;
}
.manifesto-title::before {
    content: "";
    display: inline-block;
    width: 32px;
    height: 2px;
    background: var(--teal);
    vertical-align: middle;
    margin-right: 0.8rem;
}
.manifesto-body {
    max-width: 72ch;
    color: var(--frost);
    position: relative;
}
.manifesto-footer {
    margin-top: 1.4rem;
    padding-top: 0.8rem;
    border-top: 1px dashed rgba(0,201,167,0.3);
}
.label-mono {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ghost);
    letter-spacing: 0.06em;
}

/* -------- Footer -------- */
.site-footer {
    margin-top: 2rem;
    padding: 1.2rem clamp(1rem, 3vw, 2.4rem);
    background: rgba(26, 26, 46, 0.9);
    border-top: 1px solid rgba(0,201,167,0.22);
}
.footer-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* -------- Responsive -------- */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .panel-a { grid-column: span 2; grid-row: span 2; min-height: 360px; }
    .panel-b { grid-column: span 2; grid-row: span 1; }
    .panel-c { grid-column: span 2; grid-row: span 1; }
    .panel-d { grid-column: span 1; grid-row: span 2; min-height: 380px; }
    .panel-e { grid-column: span 1; grid-row: span 1; }
    .panel-f { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 560px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .panel-a, .panel-b, .panel-c, .panel-d, .panel-e, .panel-f {
        grid-column: span 1;
        grid-row: auto;
    }
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-nav {
        justify-content: flex-start;
    }
}
