/* genpatsu.io v2
   seapunk · timeline-vertical · eclectic-hybrid · high-contrast
   typewriter-effect · botanical-illustration · grid-lines · calm-serene
*/

:root {
    --void-black: #000000;
    --paper-white: #FFFFFF;
    --seafoam-cyan: #00FFFF;
    --abyss-navy: #001F3F;
    --iodine-red: #FF0033;
    --kelp-green: #004D33;
    --alert-yellow: #FFEE00;

    --grid-wide: 40px;
    --grid-tight: 20px;
    --spine-width: 2px;

    --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
    --font-display: "Bodoni Moda", "Didot", "Times New Roman", serif;
    --font-body: "Noto Serif JP", "Georgia", serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--void-black);
    background: var(--paper-white);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- grid overlay (chart recorder strip) ---------- */
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(0,0,0,0.04) 0,
        rgba(0,0,0,0.04) 1px,
        transparent 1px,
        transparent var(--grid-wide)
    );
    transition: background-image 0.6s ease;
}

.grid-overlay.tight {
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(0,0,0,0.07) 0,
        rgba(0,0,0,0.07) 1px,
        transparent 1px,
        transparent var(--grid-tight)
    );
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    color: var(--paper-white);
    display: grid;
    place-items: center;
    isolation: isolate;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(to bottom, var(--seafoam-cyan) 0%, #007A99 40%, var(--abyss-navy) 100%);
    animation: heroFade 1.2s ease both;
}

@keyframes heroFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.045) 0,
        rgba(255,255,255,0.045) 1px,
        transparent 1px,
        transparent 24px
    );
    pointer-events: none;
}

.kelp {
    position: absolute;
    top: 0;
    height: 100%;
    width: 80px;
    z-index: 0;
    opacity: 0.55;
    transform-origin: 50% 0;
    animation: kelpDrift 12s ease-in-out infinite;
}

.kelp-left { left: 3%; }
.kelp-right { right: 3%; animation-delay: -6s; }

@keyframes kelpDrift {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

.hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4rem 2rem;
    max-width: 920px;
}

.cooling-tower {
    width: clamp(160px, 18vw, 240px);
    height: auto;
    margin: 0 auto 2.4rem;
    display: block;
}

.ct-stroke {
    stroke-dasharray: 700;
    stroke-dashoffset: 700;
    animation: drawCT 900ms 400ms ease forwards;
}

.ct-stroke:nth-child(2) { animation-delay: 450ms; }
.ct-stroke:nth-child(3) { animation-delay: 500ms; }
.ct-stroke:nth-child(4) { animation-delay: 550ms; }
.ct-stroke:nth-child(5) { animation-delay: 600ms; }
.ct-stroke:nth-child(6) { animation-delay: 650ms; }
.ct-stroke:nth-child(7) { animation-delay: 700ms; }
.ct-stroke:nth-child(8) { animation-delay: 750ms; }
.ct-stroke:nth-child(9) { animation-delay: 800ms; }

@keyframes drawCT {
    to { stroke-dashoffset: 0; }
}

.hero-title {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: clamp(40px, 7.6vw, 108px);
    letter-spacing: 0.01em;
    color: var(--paper-white);
    margin-bottom: 1.1rem;
    line-height: 1.05;
}

.hero-sub {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(18px, 2.4vw, 30px);
    letter-spacing: 0.02em;
    color: var(--seafoam-cyan);
    margin-bottom: 1.6rem;
}

.hero-meta {
    font-family: var(--font-mono);
    font-size: clamp(11px, 1.1vw, 14px);
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.12em;
    text-transform: lowercase;
}

.tw {
    display: inline-block;
    white-space: pre;
}

.caret {
    display: inline-block;
    width: 0.6ch;
    height: 1em;
    background: var(--paper-white);
    vertical-align: -0.1em;
    margin-left: 2px;
    animation: blink 530ms steps(2, end) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.scroll-indicator {
    position: absolute;
    bottom: 2.4rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--paper-white);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: scrollFade 2s 3200ms ease both;
}

@keyframes scrollFade {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 0.8; transform: translate(-50%, 0); }
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, transparent, var(--paper-white));
}

/* ---------- timeline ---------- */
.timeline {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.timeline-spine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--spine-width);
    background: linear-gradient(to bottom,
        var(--void-black) 0,
        var(--void-black) 50%,
        var(--paper-white) 50%,
        var(--paper-white) 100%);
    z-index: 2;
    pointer-events: none;
}

/* alternating bands: light / dark */
.event {
    position: relative;
    min-height: 100vh;
    padding: 8vh 6vw;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.event--light {
    background: var(--paper-white);
    color: var(--void-black);
}

.event--dark {
    background: var(--void-black);
    color: var(--paper-white);
}

/* per-event grid line color */
.event--light::before,
.event--dark::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.event--light::before {
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(0,0,0,0.055) 0,
        rgba(0,0,0,0.055) 1px,
        transparent 1px,
        transparent 40px
    );
}

.event--dark::before {
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.06) 0,
        rgba(255,255,255,0.06) 1px,
        transparent 1px,
        transparent 40px
    );
}

/* event node attached to spine */
.event-node {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    background: currentColor;
    z-index: 3;
    transition: transform 360ms ease, background 360ms ease;
}

.event.revealed .event-node {
    transform: translate(-50%, -50%) scale(1.3);
}

.event--light .event-node { color: var(--void-black); }
.event--dark .event-node { color: var(--paper-white); }

.event-plaque {
    position: relative;
    z-index: 2;
    width: 46%;
    max-width: 560px;
    padding: 2.4rem 2.6rem;
    border: 1.5px solid currentColor;
    background: transparent;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.event.revealed .event-plaque {
    opacity: 1;
    transform: translateY(0);
}

/* horizontal tick from spine to plaque */
.event-plaque::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 0;
    height: 1.5px;
    background: currentColor;
    transition: width 800ms ease 120ms;
}

.event.revealed .event-plaque::before {
    width: calc(50vw - 50% - 9px);
}

.event--left .event-plaque {
    margin-right: auto;
}

.event--left .event-plaque::before {
    left: 100%;
}

.event--right .event-plaque {
    margin-left: auto;
}

.event--right .event-plaque::before {
    right: 100%;
}

.plaque-year {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: clamp(48px, 7.6vw, 104px);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 0.8rem;
    position: relative;
}

.plaque-year::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background: currentColor;
    margin-top: 0.6rem;
}

.plaque-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(22px, 2.8vw, 38px);
    line-height: 1.15;
    letter-spacing: 0.005em;
    margin-bottom: 1.2rem;
}

.plaque-body {
    font-family: var(--font-body);
    font-size: clamp(14px, 1.15vw, 16px);
    line-height: 1.8;
    margin-bottom: 1.6rem;
    max-width: 56ch;
}

.plaque-figure {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.2rem;
    align-items: center;
    padding: 1.1rem 0 0;
    border-top: 1px solid currentColor;
}

.plaque-figure svg {
    width: 100%;
    height: auto;
    display: block;
}

.bot-stroke path,
.bot-stroke circle,
.bot-stroke ellipse {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
}

.event.revealed .bot-stroke path,
.event.revealed .bot-stroke circle,
.event.revealed .bot-stroke ellipse {
    animation: drawBot 1200ms 280ms ease forwards;
}

@keyframes drawBot {
    to { stroke-dashoffset: 0; }
}

.event--dark .bot-stroke path,
.event--dark .bot-stroke circle,
.event--dark .bot-stroke ellipse {
    stroke: var(--paper-white);
}

.plaque-caption {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.01em;
    font-style: italic;
    opacity: 0.82;
}

.plaque-isotope {
    margin-top: 1.3rem;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    color: currentColor;
    opacity: 0.6;
    min-height: 1.4em;
    transition: color 260ms ease, opacity 260ms ease;
}

.plaque-isotope::before {
    content: attr(data-isotope);
}

.event-plaque:hover .plaque-isotope {
    color: var(--iodine-red);
    opacity: 1;
}

/* special emphasis on spent-fuel closing */
.event[data-event="spent"] .plaque-title {
    color: currentColor;
}

.event[data-event="spent"] .plaque-year {
    color: var(--alert-yellow);
    background-color: var(--void-black);
    display: inline-block;
    padding: 0 0.2em;
}

.event[data-event="spent"] {
    background: var(--paper-white);
}

/* ---------- outro ---------- */
.outro {
    position: relative;
    min-height: 80vh;
    background: var(--void-black);
    color: var(--paper-white);
    display: grid;
    place-items: center;
    padding: 12vh 6vw;
    overflow: hidden;
}

.outro::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.05) 0,
        rgba(255,255,255,0.05) 1px,
        transparent 1px,
        transparent 40px
    );
}

.outro-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 960px;
    width: 100%;
}

.outro-epigraph {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 5vw, 68px);
    letter-spacing: 0.005em;
    color: var(--paper-white);
    margin-bottom: 3rem;
    line-height: 1.2;
}

.outro-epigraph .caret {
    background: var(--seafoam-cyan);
}

.outro-rule {
    width: 100%;
    height: 2px;
    background: var(--paper-white);
    margin: 0 auto 2rem;
    position: relative;
}

.outro-rule::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: var(--paper-white);
}

.outro-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--paper-white);
    opacity: 0.75;
    letter-spacing: 0.12em;
    text-transform: lowercase;
}

.outro-meta span {
    white-space: nowrap;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .timeline-spine { left: 32px; transform: none; }
    .event {
        padding: 6vh 6vw 6vh 64px;
    }
    .event-node {
        left: 32px;
    }
    .event-plaque {
        width: 100%;
        max-width: none;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .event-plaque::before {
        left: auto !important;
        right: auto !important;
        width: 0 !important;
    }
    .event.revealed .event-plaque::before {
        width: 24px !important;
        left: -36px !important;
        right: auto !important;
    }
    .plaque-figure {
        grid-template-columns: 90px 1fr;
        gap: 0.8rem;
    }
    .outro-meta {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .hero-inner {
        padding: 3rem 1.2rem;
    }
    .plaque-year { font-size: clamp(40px, 14vw, 72px); }
    .event-plaque { padding: 1.6rem 1.4rem; }
}
