:root {
    --bg-dark: #070d15;
    --bg-mid: #162131;
    --bg-soft: #f1ece5;
    --surface: rgba(251, 248, 242, 0.9);
    --surface-soft: rgba(230, 239, 247, 0.86);
    --surface-strong: rgba(255, 252, 247, 0.96);
    --ink: #182231;
    --muted: #677482;
    --line: rgba(24, 34, 49, 0.1);
    --accent: #3f6f9b;
    --accent-strong: #17263c;
    --accent-soft: #d49a58;
    --accent-soft-strong: #8f5f28;
    --glow: #7db3ff;
    --shadow: 0 28px 64px rgba(7, 13, 21, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "IBM Plex Sans JP", sans-serif;
    background:
        radial-gradient(circle at 10% 14%, rgba(125, 179, 255, 0.16), transparent 18%),
        radial-gradient(circle at 86% 12%, rgba(212, 154, 88, 0.18), transparent 16%),
        linear-gradient(180deg, #04070d 0%, #111a28 16%, #eee7dc 16.1%, #f6f0e7 100%);
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.22) 0 1px, transparent 1.5px),
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 110px 110px, 48px 48px, 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.08));
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-bottom: 80px;
}

.site-header {
    position: sticky;
    top: 14px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 18px 0 20px;
    padding: 16px 22px;
    border-radius: 999px;
    background: rgba(7, 13, 21, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

.brand,
h1,
h2,
h3,
.signal-main,
.formula-block,
.window-label,
.support-title {
    font-family: "Shippori Mincho", serif;
}

.brand {
    color: #f7efe1;
    font-size: 1.14rem;
    letter-spacing: 0.1em;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 18px;
    color: rgba(247, 239, 225, 0.84);
    font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.footer-link:hover,
.footer-link:focus-visible {
    color: white;
}

.section,
.signal-strip,
.site-footer {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible,
.site-footer.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
    gap: 24px;
    padding: 34px 0 22px;
}

.hero-copy,
.hero-panel,
.concept-card,
.formula-card,
.inside-card,
.contrast-card,
.step-card,
.demo-panel,
.canvas-panel,
.paradox-card,
.resolution-card,
.comparison-card,
.beyond-card,
.link-card,
.callout-card,
.hero-note,
.signal-strip,
.diagram-panel,
.site-footer,
.hero-summary-card {
    border: 1px solid rgba(255, 255, 255, 0.58);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-copy {
    min-width: 0;
    padding: 40px 30px 40px 36px;
    border-radius: 38px;
    position: relative;
    overflow: hidden;
}

.hero-copy::after {
    content: "";
    position: absolute;
    inset: auto -84px -126px auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 154, 88, 0.44), rgba(212, 154, 88, 0));
}

.hero-panel {
    min-width: 0;
    padding: 26px;
    border-radius: 36px;
    display: grid;
    gap: 18px;
    background: rgba(240, 246, 252, 0.14);
}

.eyebrow,
.card-label,
.signal-kicker,
.summary-title {
    margin: 0 0 12px;
    color: var(--accent-strong);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

h1,
h2,
h3,
.brand {
    line-height: 1.14;
}

h1,
h2 {
    margin: 0;
}

h1 {
    font-size: clamp(2.65rem, 5vw, 4.7rem);
    letter-spacing: -0.04em;
}

.hero-lead,
.section-heading p,
.concept-card p,
.formula-card p,
.inside-card p,
.contrast-card li,
.canvas-caption,
.demo-note,
.paradox-card p,
.resolution-card p,
.comparison-card p,
.beyond-card p,
.link-card p,
.callout-card p,
.hero-note p,
.signal-sub,
.site-footer p,
.step-card p {
    color: var(--muted);
}

.hero-lead {
    margin: 20px 0 0;
    font-size: 1.04rem;
    line-height: 1.85;
}

.hero-actions,
.footer-links,
.link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-actions {
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible,
.link-card:hover,
.link-card:focus-visible {
    transform: translateY(-2px);
}

.button-primary {
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 14px 28px rgba(23, 38, 60, 0.28);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--line);
}

.hero-points {
    margin: 24px 0 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.horizon-window {
    position: relative;
    min-height: 320px;
    border-radius: 30px;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(125, 179, 255, 0.18), transparent 24%),
        radial-gradient(circle at center, rgba(255, 168, 85, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(4, 7, 13, 0.98), rgba(20, 28, 42, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.star,
.horizon-ring,
.horizon-glow,
.singularity-core,
.falling-body,
.infall-arrow,
.window-label,
.orbit {
    position: absolute;
}

.star {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.star-a { top: 18%; left: 18%; }
.star-b { top: 22%; right: 16%; }
.star-c { bottom: 20%; left: 24%; }
.star-d { bottom: 28%; right: 22%; }

.orbit {
    inset: 50% auto auto 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.orbit-one {
    width: 160px;
    height: 160px;
}

.orbit-two {
    width: 230px;
    height: 230px;
}

.horizon-glow {
    top: 50%;
    left: 50%;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 151, 67, 0.18), rgba(255, 151, 67, 0));
    box-shadow: 0 0 70px rgba(255, 151, 67, 0.25);
}

.horizon-ring {
    top: 50%;
    left: 50%;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 10px solid rgba(255, 183, 109, 0.6);
    box-shadow: 0 0 32px rgba(255, 183, 109, 0.3), inset 0 0 22px rgba(255, 183, 109, 0.14);
}

.singularity-core {
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(10, 16, 26, 0.2) 0%, rgba(3, 5, 9, 0.96) 68%);
}

.falling-body {
    top: 46%;
    left: 72%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8fbff, #7db3ff);
    box-shadow: 0 0 18px rgba(125, 179, 255, 0.5);
}

.infall-arrow {
    width: 56px;
    height: 2px;
    background: linear-gradient(90deg, rgba(125, 179, 255, 0.06), rgba(125, 179, 255, 0.9));
    transform-origin: right center;
}

.infall-arrow::after {
    content: "";
    position: absolute;
    right: -2px;
    top: -3px;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 8px solid rgba(125, 179, 255, 0.9);
}

.infall-one {
    top: 45%;
    left: 59%;
    transform: rotate(6deg);
}

.infall-two {
    top: 54%;
    left: 58%;
    transform: rotate(-10deg);
}

.window-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.86rem;
}

.horizon-label {
    top: 16%;
    left: 50%;
    transform: translateX(-50%);
}

.singularity-label {
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
}

.hero-note-grid,
.concept-grid,
.inside-grid,
.contrast-panel,
.penrose-grid,
.step-grid,
.demo-grid,
.paradox-grid,
.resolution-grid,
.comparison-grid,
.beyond-grid,
.link-grid,
.stat-grid,
.control-grid,
.formula-strip {
    display: grid;
    gap: 18px;
}

.hero-note-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-note,
.concept-card,
.formula-card,
.inside-card,
.contrast-card,
.step-card,
.demo-panel,
.canvas-panel,
.paradox-card,
.resolution-card,
.comparison-card,
.beyond-card,
.link-card,
.callout-card,
.diagram-panel,
.hero-summary-card {
    padding: 22px 24px;
    border-radius: 28px;
}

.strong-card {
    background: linear-gradient(145deg, rgba(235, 243, 251, 0.98), rgba(224, 235, 247, 0.88));
}

.warm-card {
    background: linear-gradient(145deg, rgba(255, 247, 233, 0.98), rgba(245, 231, 208, 0.88));
}

.night-card {
    background: linear-gradient(145deg, rgba(23, 38, 60, 0.98), rgba(47, 74, 108, 0.9));
    color: white;
}

.night-card p,
.night-card .card-label,
.night-card h3,
.night-card li,
.night-card a {
    color: rgba(255, 255, 255, 0.92);
}

.signal-strip {
    margin-top: 10px;
    padding: 24px 30px;
    border-radius: 30px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.signal-kicker {
    margin: 0;
}

.signal-main {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.signal-sub {
    margin: 0;
    line-height: 1.8;
}

.section {
    margin-top: 88px;
}

.section-heading {
    margin-bottom: 26px;
}

.section-heading h2 {
    font-size: clamp(2rem, 3.5vw, 3.1rem);
}

.section-heading p {
    margin: 12px 0 0;
    max-width: 840px;
    line-height: 1.85;
}

.concept-grid,
.paradox-grid,
.comparison-grid,
.beyond-grid,
.link-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.formula-strip,
.contrast-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.inside-grid,
.resolution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.formula-block {
    margin-top: 14px;
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(23, 38, 60, 0.08);
    font-size: clamp(1.05rem, 1.8vw, 1.4rem);
    color: var(--ink);
}

.contrast-card ul {
    margin: 14px 0 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 10px;
}

.penrose-grid,
.demo-grid {
    grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
    align-items: start;
}

.diagram-panel {
    background: linear-gradient(180deg, rgba(252, 247, 239, 0.96), rgba(233, 241, 249, 0.84));
}

.penrose-reading-figure {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 26px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(5, 9, 16, 0.98), rgba(18, 27, 39, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.penrose-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.penrose-board {
    position: relative;
    min-height: 360px;
    border-radius: 26px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(5, 9, 16, 0.98), rgba(18, 27, 39, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.penrose-board::before,
.penrose-board::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(-50%);
}

.penrose-board::before {
    top: 48px;
    bottom: 36px;
}

.penrose-board::after {
    top: 48px;
    bottom: 36px;
    transform: translateX(-50%) rotate(90deg);
}

.singularity-cap,
.horizon-line,
.future-cone,
.observer,
.board-label {
    position: absolute;
}

.singularity-cap {
    top: 22px;
    left: 50%;
    width: 180px;
    padding: 10px 14px;
    border-radius: 999px;
    transform: translateX(-50%);
    text-align: center;
    color: #fff7ec;
    background: linear-gradient(135deg, rgba(212, 154, 88, 0.88), rgba(143, 95, 40, 0.94));
}

.horizon-line {
    top: 76px;
    width: 220px;
    height: 2px;
    background: linear-gradient(90deg, rgba(125, 179, 255, 0.1), rgba(125, 179, 255, 0.9), rgba(125, 179, 255, 0.1));
}

.horizon-left {
    left: 14%;
    transform: rotate(52deg);
    transform-origin: left center;
}

.horizon-right {
    right: 14%;
    transform: rotate(-52deg);
    transform-origin: right center;
}

.future-cone {
    width: 0;
    height: 0;
    border-left: 34px solid transparent;
    border-right: 34px solid transparent;
    border-bottom: 76px solid rgba(125, 179, 255, 0.22);
}

.cone-outside {
    bottom: 120px;
    left: 22%;
}

.cone-inside {
    bottom: 120px;
    right: 23%;
    transform: rotate(20deg);
    border-bottom-color: rgba(212, 154, 88, 0.28);
}

.observer {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.observer-outside {
    bottom: 102px;
    left: 23%;
    background: #7db3ff;
    box-shadow: 0 0 18px rgba(125, 179, 255, 0.5);
}

.observer-inside {
    bottom: 100px;
    right: 24%;
    background: #f1b26a;
    box-shadow: 0 0 18px rgba(212, 154, 88, 0.5);
}

.board-label {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.84rem;
    line-height: 1.6;
}

.label-universe {
    bottom: 28px;
    left: 18px;
}

.label-horizon {
    top: 132px;
    right: 26px;
}

.label-inside {
    top: 248px;
    right: 18px;
    max-width: 170px;
    text-align: right;
}

.step-grid {
    grid-template-columns: 1fr;
}

.control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.control {
    display: grid;
    gap: 8px;
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 251, 245, 0.96), rgba(235, 242, 252, 0.84));
    border: 1px solid rgba(24, 34, 49, 0.08);
}

.control span {
    color: var(--accent-strong);
    font-weight: 600;
}

.control input {
    width: 100%;
    accent-color: var(--accent);
}

.stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
}

.stat-grid article {
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 251, 245, 0.96), rgba(235, 242, 252, 0.84));
    border: 1px solid rgba(24, 34, 49, 0.08);
}

.stat-grid span {
    color: var(--muted);
    font-size: 0.9rem;
}

.stat-grid strong {
    display: block;
    margin-top: 8px;
}

.demo-note,
.canvas-caption {
    margin: 18px 0 0;
    line-height: 1.8;
}

.canvas-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(180deg, rgba(252, 247, 239, 0.96), rgba(235, 242, 252, 0.86));
}

#blackholeCanvas {
    width: 100%;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(5, 9, 16, 0.98), rgba(18, 27, 39, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.callout-card {
    margin-top: 20px;
    background: linear-gradient(145deg, rgba(255, 247, 233, 0.98), rgba(245, 231, 208, 0.88));
}

.link-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.link-card {
    display: grid;
    gap: 8px;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.site-footer {
    margin-top: 64px;
    padding: 24px 30px;
    border-radius: 28px;
    background: rgba(7, 13, 21, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.84);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-footer p {
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-link {
    color: white;
    font-weight: 600;
}

@media (max-width: 1080px) {
    .hero,
    .signal-strip,
    .penrose-grid,
    .demo-grid,
    .formula-strip,
    .contrast-panel {
        grid-template-columns: 1fr;
    }

    .concept-grid,
    .paradox-grid,
    .comparison-grid,
    .beyond-grid,
    .link-grid,
    .inside-grid,
    .resolution-grid,
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .page-shell {
        width: min(100% - 20px, 1180px);
    }

    .site-header {
        position: static;
        flex-direction: column;
        align-items: flex-start;
        border-radius: 28px;
    }

    .site-nav {
        justify-content: flex-start;
        gap: 12px 14px;
    }

    .hero-copy,
    .hero-panel,
    .concept-card,
    .formula-card,
    .inside-card,
    .contrast-card,
    .step-card,
    .demo-panel,
    .canvas-panel,
    .paradox-card,
    .resolution-card,
    .comparison-card,
    .beyond-card,
    .link-card,
    .callout-card,
    .diagram-panel,
    .hero-note,
    .hero-summary-card,
    .signal-strip,
    .site-footer {
        padding: 22px;
        border-radius: 24px;
    }

    .hero-actions,
    .footer-links {
        flex-direction: column;
    }

    .hero-note-grid,
    .concept-grid,
    .paradox-grid,
    .comparison-grid,
    .beyond-grid,
    .link-grid,
    .inside-grid,
    .resolution-grid,
    .stat-grid,
    .control-grid {
        grid-template-columns: 1fr;
    }

    .button {
        width: 100%;
    }

    .section {
        margin-top: 68px;
    }

    .horizon-window,
    .penrose-board {
        min-height: 300px;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}