:root {
    --bg-dark: #13201d;
    --bg-mid: #2f514b;
    --bg-soft: #f9f4ec;
    --surface: rgba(255, 252, 246, 0.95);
    --surface-strong: rgba(255, 255, 255, 0.98);
    --ink: #243632;
    --muted: #687974;
    --line: rgba(36, 54, 50, 0.12);
    --accent: #7ccbb0;
    --accent-strong: #1d8f78;
    --accent-soft: #d7f4e8;
    --warm: #efbb72;
    --warm-strong: #b5782b;
    --ember: #d86f61;
    --ember-strong: #a4463a;
    --shadow: 0 28px 68px rgba(18, 28, 25, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "IBM Plex Sans JP", sans-serif;
    background:
        radial-gradient(circle at 12% 16%, rgba(124, 203, 176, 0.16), transparent 18%),
        radial-gradient(circle at 86% 16%, rgba(239, 187, 114, 0.18), transparent 18%),
        linear-gradient(180deg, #13201d 0%, #2f514b 18%, #edf3ef 18.1%, #fffdf9 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1.6px),
        radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.12) 0 1px, transparent 1.8px),
        linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
    background-size: 320px 320px, 280px 280px, 46px 46px, 46px 46px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.16));
}

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

button,
input {
    font: inherit;
}

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

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

.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(19, 32, 29, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

.brand {
    color: #fffaf2;
    font-family: "Shippori Mincho", serif;
    font-size: 1.14rem;
    letter-spacing: 0.1em;
}

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

.site-nav a:hover,
.site-nav a:focus-visible,
.footer-links a:hover,
.footer-links a: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.95fr) minmax(0, 1.05fr);
    gap: 24px;
    padding: 34px 0 22px;
}

.hero-copy,
.hero-panel,
.concept-card,
.formula-card,
.demo-panel,
.status-card,
.link-card,
.signal-strip,
.hero-note {
    border: 1px solid rgba(255, 255, 255, 0.68);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

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

.hero-copy::after {
    content: "";
    position: absolute;
    inset: auto -84px -148px auto;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(215, 244, 232, 0.58), rgba(215, 244, 232, 0));
}

.hero-panel {
    min-width: 0;
    padding: 26px;
    border-radius: 36px;
    display: grid;
    gap: 18px;
    background: rgba(232, 239, 235, 0.28);
}

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

h1,
h2,
h3,
.brand,
.formula-block,
.signal-main,
.canvas-caption strong {
    font-family: "Shippori Mincho", serif;
}

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

h1,
h2,
h3,
p {
    margin-top: 0;
}

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

h2 {
    margin-bottom: 0;
    font-size: clamp(1.96rem, 3.7vw, 3.02rem);
    letter-spacing: -0.03em;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.34rem;
}

.hero-lead,
.section-heading p,
.concept-card p,
.formula-card p,
.hero-note p,
.demo-note,
.canvas-caption,
.status-card p,
.link-card p,
.site-footer p,
.signal-sub {
    color: var(--muted);
}

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

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    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;
    cursor: pointer;
}

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

.button-primary {
    color: #fbffff;
    background: linear-gradient(135deg, #1d8f78, #7ccbb0);
    box-shadow: 0 14px 30px rgba(29, 143, 120, 0.24);
}

.button-secondary {
    color: var(--ink);
    border-color: rgba(36, 54, 50, 0.12);
    background: rgba(255, 255, 255, 0.74);
}

.hero-points {
    list-style: none;
    padding: 0;
    margin: 26px 0 0;
    display: grid;
    gap: 12px;
}

.hero-points li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.7;
}

.hero-points li::before {
    content: "";
    width: 9px;
    height: 9px;
    margin-top: 0.55em;
    border-radius: 50%;
    flex: 0 0 auto;
    background: linear-gradient(135deg, var(--accent), var(--warm));
    box-shadow: 0 0 18px rgba(124, 203, 176, 0.42);
}

.entropy-window {
    position: relative;
    min-height: 320px;
    border-radius: 30px;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 22%, rgba(124, 203, 176, 0.16), transparent 18%),
        radial-gradient(circle at 78% 18%, rgba(239, 187, 114, 0.2), transparent 18%),
        linear-gradient(180deg, #14201d 0%, #223732 44%, #446962 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.grid-layer,
.state-stack,
.state-cell,
.coin-band,
.coin-chip,
.particle-field,
.particle,
.horizon-ring,
.horizon-core,
.page-curve,
.curve-dot,
.panel-tag {
    position: absolute;
}

.grid-layer {
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.44;
}

.state-stack {
    left: 8%;
    top: 18%;
    width: 18%;
    height: 58%;
}

.state-cell {
    width: 54px;
    height: 26px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(245, 247, 244, 0.94), rgba(124, 203, 176, 0.84));
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.cell-a { left: 0; top: 0; }
.cell-b { left: 18px; top: 36px; }
.cell-c { left: 0; top: 72px; }
.cell-d { left: 18px; top: 108px; }
.cell-e { left: 0; top: 144px; }
.cell-f { left: 18px; top: 180px; }

.coin-band {
    left: 30%;
    top: 16%;
    width: 24%;
    height: 28%;
}

.coin-chip {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-family: "Shippori Mincho", serif;
    font-size: 1rem;
    color: #10211d;
    background: linear-gradient(180deg, rgba(255, 246, 227, 0.96), rgba(239, 187, 114, 0.92));
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

.chip-a { left: 0; top: 18px; }
.chip-b { left: 58px; top: 0; }
.chip-c { left: 116px; top: 34px; }
.chip-d { left: 174px; top: 12px; }

.particle-field {
    left: 25%;
    bottom: 12%;
    width: 42%;
    height: 36%;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(6, 16, 19, 0.24), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.particle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 244, 220, 0.92);
    box-shadow: 0 0 16px rgba(124, 203, 176, 0.22);
}

.particle-a { left: 12%; top: 24%; }
.particle-b { left: 22%; top: 54%; }
.particle-c { left: 35%; top: 18%; }
.particle-d { left: 46%; top: 62%; }
.particle-e { left: 58%; top: 26%; }
.particle-f { left: 68%; top: 52%; }
.particle-g { left: 78%; top: 30%; }
.particle-h { left: 84%; top: 68%; }

.horizon-ring {
    right: 10%;
    top: 20%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(255, 233, 196, 0.72);
    box-shadow: 0 0 28px rgba(239, 187, 114, 0.16);
}

.horizon-core {
    right: 25px;
    top: 35%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(8, 16, 15, 0.98), rgba(8, 16, 15, 0.7), rgba(8, 16, 15, 0));
}

.page-curve {
    right: 6%;
    bottom: 12%;
    width: 28%;
    height: 24%;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.page-curve::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: 18%;
    top: 18%;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.page-curve::after {
    content: "";
    position: absolute;
    left: 18%;
    top: 58%;
    width: 66%;
    height: 28%;
    border-top: 2px solid rgba(124, 203, 176, 0.86);
    border-right: 2px solid rgba(124, 203, 176, 0.86);
    border-top-right-radius: 120px 70px;
    transform: skewX(-18deg);
}

.curve-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 246, 227, 0.92);
}

.dot-a { right: 23%; bottom: 20%; }
.dot-b { right: 16%; bottom: 17%; }
.dot-c { right: 11%; bottom: 24%; }

.panel-tag {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(19, 32, 29, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 250, 242, 0.9);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tag-info {
    left: 8%;
    top: 10%;
}

.tag-law {
    left: 35%;
    bottom: 8%;
}

.tag-hole {
    right: 8%;
    top: 10%;
}

.hero-note-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.hero-note,
.concept-card,
.formula-card,
.status-card,
.link-card {
    border-radius: 26px;
    padding: 22px 22px 20px;
}

.strong-card,
.strong-note {
    background: linear-gradient(145deg, rgba(249, 253, 251, 0.98), rgba(220, 244, 233, 0.92));
}

.warm-card,
.warm-note {
    background: linear-gradient(145deg, rgba(255, 248, 232, 0.98), rgba(250, 227, 185, 0.92));
}

.night-card,
.night-note {
    border-color: rgba(255, 255, 255, 0.12);
    background: linear-gradient(160deg, rgba(18, 29, 27, 0.97), rgba(49, 72, 67, 0.93));
}

.night-card h3,
.night-card h2,
.night-note h2,
.night-card .card-label,
.night-note .card-label,
.night-card .formula-block,
.night-note .formula-block,
.status-card.night-card h3,
.link-card.night-card h3 {
    color: rgba(255, 249, 242, 0.96);
}

.night-card p,
.night-note p,
.status-card.night-card p,
.link-card.night-card p {
    color: rgba(232, 226, 217, 0.84);
}

.signal-strip {
    position: relative;
    overflow: hidden;
    margin: 10px 0 16px;
    padding: 24px 28px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(19, 32, 29, 0.96), rgba(47, 81, 75, 0.92));
    color: #fff8f2;
    display: grid;
    gap: 8px;
}

.signal-strip::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 203, 176, 0.18), rgba(124, 203, 176, 0));
}

.signal-kicker {
    margin-bottom: 2px;
    color: rgba(215, 244, 232, 0.82);
}

.signal-main {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.34rem);
    line-height: 1.2;
}

.signal-sub {
    margin: 0;
    color: rgba(255, 244, 236, 0.82);
    line-height: 1.8;
}

.section {
    padding: 38px 0 4px;
}

.section-heading {
    max-width: 860px;
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.section-heading p {
    margin-bottom: 0;
    line-height: 1.85;
}

.concept-grid,
.formula-strip,
.link-grid,
.status-panel {
    display: grid;
    gap: 16px;
}

.concept-grid,
.link-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.formula-strip {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 18px;
}

.formula-block {
    margin-bottom: 12px;
    font-size: clamp(1.02rem, 1.9vw, 1.34rem);
    color: var(--ink);
    line-height: 1.6;
}

.concept-card,
.link-card {
    min-height: 198px;
}

.demo-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.78fr);
    gap: 18px;
    align-items: start;
}

.demo-panel {
    border-radius: 32px;
    padding: 24px;
}

.mode-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.mode-chip {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(36, 54, 50, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.mode-chip.is-active {
    color: #fbffff;
    border-color: transparent;
    background: linear-gradient(135deg, #1d8f78, #7ccbb0);
    box-shadow: 0 14px 30px rgba(29, 143, 120, 0.24);
}

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

.control {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.68);
}

.control span {
    color: var(--muted);
}

.control strong {
    color: var(--ink);
    font-size: 1.08rem;
}

.control input[type="range"] {
    width: 100%;
    accent-color: var(--accent-strong);
}

.canvas-frame {
    margin-top: 18px;
    padding: 14px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(19, 32, 29, 0.98), rgba(38, 55, 50, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#entropyCanvas {
    border-radius: 22px;
    background: #111a18;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.canvas-caption,
.demo-note {
    margin-bottom: 0;
    line-height: 1.75;
}

.canvas-caption {
    margin-top: 14px;
}

.demo-note {
    margin-top: 12px;
}

.status-panel {
    grid-template-columns: 1fr;
}

.status-card {
    min-height: 120px;
}

.status-card h3,
.link-card h3 {
    font-size: 1.14rem;
}

.link-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-card .button {
    margin-top: auto;
}

.site-footer {
    margin-top: 38px;
    padding: 30px 32px;
    border-radius: 34px;
    background: rgba(19, 32, 29, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.site-footer p {
    color: rgba(255, 241, 232, 0.84);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    color: rgba(255, 241, 232, 0.84);
}

.footer-links a {
    transition: color 180ms ease;
}

@media (max-width: 1024px) {
    .hero,
    .demo-grid {
        grid-template-columns: 1fr;
    }

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

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

    .site-header {
        border-radius: 28px;
        padding: 16px 18px;
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-copy,
    .hero-panel,
    .demo-panel,
    .site-footer {
        border-radius: 28px;
    }

    .hero-copy {
        padding: 34px 24px 34px 26px;
    }

    .hero-panel,
    .demo-panel {
        padding: 20px;
    }

    .control-grid,
    .status-panel {
        grid-template-columns: 1fr;
    }

    .mode-chip,
    .button {
        width: 100%;
    }

    .entropy-window {
        min-height: 286px;
    }

    .state-stack {
        left: 6%;
        width: 22%;
    }

    .coin-band {
        left: 28%;
        width: 34%;
    }

    .page-curve {
        width: 34%;
        right: 4%;
    }
}