:root {
    --bg-dark: #081626;
    --bg-mid: #15304a;
    --bg-soft: #f4f7fb;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-strong: rgba(255, 255, 255, 0.96);
    --surface-soft: rgba(236, 246, 255, 0.85);
    --ink: #183047;
    --muted: #567084;
    --line: rgba(24, 48, 71, 0.12);
    --accent: #ff8c5a;
    --accent-strong: #d85a2f;
    --accent-soft: #ffd7c5;
    --cool: #2f9ad5;
    --cool-soft: #d6efff;
    --spark: #ffbf47;
    --refractory: #d1d9e3;
    --shadow: 0 28px 70px rgba(7, 23, 38, 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 14% 14%, rgba(255, 191, 71, 0.22), transparent 20%),
        radial-gradient(circle at 84% 12%, rgba(47, 154, 213, 0.2), transparent 22%),
        linear-gradient(180deg, #081626 0%, #15304a 18%, #eef4fa 18.2%, #f9fbfe 100%);
}

main {
    display: flex;
    flex-direction: column;
}

main > #demo {
    order: -1;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), 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(8, 22, 38, 0.8);
    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,
.note-title,
.canvas-caption strong {
    font-family: "Shippori Mincho", serif;
}

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

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

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

.hero,
.signal-strip,
.section,
.site-footer {
    opacity: 0;
    transform: translateY(24px);
    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.98fr) minmax(0, 1.02fr);
    gap: 24px;
    padding: 34px 0 22px;
}

.hero-copy,
.hero-panel,
.signal-strip,
.step-card,
.control-panel,
.canvas-panel,
.comparison-card,
.link-card,
.site-footer,
.hero-note {
    border: 1px solid rgba(255, 255, 255, 0.64);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

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

.hero-copy::after {
    content: "";
    position: absolute;
    inset: auto -60px -110px auto;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 140, 90, 0.28), rgba(255, 140, 90, 0));
}

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

.eyebrow {
    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 {
    line-height: 1.15;
}

h1,
h2 {
    margin: 0;
}

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

h2 {
    font-size: clamp(2rem, 3.2vw, 3rem);
    letter-spacing: -0.03em;
}

h3 {
    margin: 0 0 10px;
    font-size: 1.26rem;
}

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

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

.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;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button-primary {
    background: linear-gradient(135deg, #ff935c, #de5d32);
    color: white;
    box-shadow: 0 16px 30px rgba(216, 90, 47, 0.25);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    border-color: rgba(24, 48, 71, 0.14);
}

.action-excite {
    background: linear-gradient(135deg, #ff7b63, #e04644);
    color: white;
    box-shadow: 0 12px 24px rgba(224, 70, 68, 0.22);
}

.action-inhibit {
    background: linear-gradient(135deg, #46a8e5, #2d6ddd);
    color: white;
    box-shadow: 0 12px 24px rgba(45, 109, 221, 0.2);
}

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

.hero-points li {
    position: relative;
    padding-left: 20px;
    color: var(--muted);
}

.hero-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.75em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--cool));
}

.hero-illustration {
    position: relative;
    min-height: 340px;
    border-radius: 30px;
    overflow: hidden;
    background:
        radial-gradient(circle at 26% 36%, rgba(255, 140, 90, 0.24), transparent 18%),
        radial-gradient(circle at 76% 34%, rgba(47, 154, 213, 0.18), transparent 18%),
        linear-gradient(145deg, rgba(17, 48, 75, 0.94), rgba(9, 24, 40, 0.96));
}

.hero-illustration::before {
    content: "";
    position: absolute;
    left: 22%;
    right: 22%;
    top: 50%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 191, 71, 0.9), rgba(255, 255, 255, 0.1));
    transform: translateY(-50%);
}

.cell,
.input-dot,
.signal-wave,
.synapse-gap {
    position: absolute;
    display: block;
}

.cell {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 0 0 20px rgba(255, 255, 255, 0.05);
}

.cell-a {
    left: 14%;
    top: 34%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 211, 195, 0.95), rgba(255, 140, 90, 0.42));
}

.cell-b {
    right: 14%;
    top: 34%;
    background: radial-gradient(circle at 38% 38%, rgba(213, 241, 255, 0.94), rgba(47, 154, 213, 0.4));
}

.input-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: 0 0 18px currentColor;
}

.input-a {
    left: 6%;
    top: 42%;
    color: #ff7b63;
    background: currentColor;
}

.input-b {
    left: 9%;
    top: 58%;
    color: #52a9ff;
    background: currentColor;
}

.signal-wave {
    left: 44%;
    top: 46%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--spark);
    box-shadow: 0 0 14px rgba(255, 191, 71, 0.9);
    animation: drift 2.2s ease-in-out infinite;
}

.wave-b {
    animation-delay: 0.7s;
}

.wave-c {
    animation-delay: 1.35s;
}

.synapse-gap {
    left: 50%;
    top: 40%;
    width: 26px;
    height: 70px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.04));
}

.label {
    position: absolute;
    color: rgba(241, 247, 255, 0.82);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}

.label-a {
    left: 8%;
    top: 24%;
}

.label-b {
    left: 38%;
    top: 22%;
}

.label-c {
    right: 10%;
    top: 24%;
}

.hero-note {
    padding: 20px 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
}

.note-title,
.signal-kicker,
.card-label {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.76rem;
    font-weight: 700;
}

.note-title,
.signal-kicker,
.card-label {
    color: var(--accent-strong);
}

.signal-strip {
    margin: 12px 0 26px;
    padding: 26px 28px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(10, 31, 50, 0.9), rgba(23, 56, 84, 0.92));
    color: #f2f7fb;
}

.signal-main {
    margin: 10px 0 10px;
    font-size: clamp(1.4rem, 2.6vw, 2.2rem);
    letter-spacing: -0.02em;
}

.signal-sub {
    margin: 0;
    color: rgba(236, 244, 251, 0.78);
    max-width: 860px;
    line-height: 1.8;
}

.section {
    padding: 32px 0 12px;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 22px;
}

.section-heading p {
    margin: 12px 0 0;
    line-height: 1.8;
}

.step-grid,
.comparison-grid,
.link-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.step-card,
.comparison-card,
.link-card {
    min-width: 0;
    padding: 24px 22px;
    border-radius: 28px;
}

.strong-card {
    background: linear-gradient(180deg, rgba(255, 248, 235, 0.96), rgba(255, 240, 224, 0.92));
}

.warm-card {
    background: linear-gradient(180deg, rgba(236, 247, 255, 0.96), rgba(221, 240, 255, 0.92));
}

.demo-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.94fr) minmax(0, 1.06fr);
    gap: 20px;
}

.control-panel,
.canvas-panel {
    min-width: 0;
    padding: 24px;
    border-radius: 32px;
}

.control-panel {
    display: grid;
    gap: 18px;
    align-content: start;
}

.preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preset-chip {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(24, 48, 71, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    color: var(--ink);
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.preset-chip.is-active {
    background: linear-gradient(135deg, rgba(255, 140, 90, 0.16), rgba(47, 154, 213, 0.16));
    border-color: rgba(216, 90, 47, 0.22);
    box-shadow: inset 0 0 0 1px rgba(216, 90, 47, 0.08);
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.control-grid {
    display: grid;
    gap: 14px;
}

.control {
    display: grid;
    gap: 8px;
}

.control span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-weight: 600;
}

.control strong {
    color: var(--accent-strong);
}

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

.demo-note {
    margin: 0;
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(237, 245, 252, 0.9);
    border: 1px solid rgba(24, 48, 71, 0.08);
    line-height: 1.75;
}

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

.stat-card {
    padding: 16px 16px 14px;
    border-radius: 20px;
    background: var(--surface-soft);
    border: 1px solid rgba(24, 48, 71, 0.08);
}

.stat-card span {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.stat-card strong {
    display: block;
    font-size: 1.2rem;
    line-height: 1.35;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.92rem;
    color: var(--muted);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend-swatch {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 50%;
}

.legend-swatch.excite {
    background: #ff635f;
}

.legend-swatch.inhibit {
    background: #47a6ef;
}

.legend-swatch.spike {
    background: #ffc14a;
}

.legend-swatch.refractory {
    background: #d4dbe5;
}

.canvas-panel {
    background: rgba(255, 255, 255, 0.94);
}

.demo-canvas {
    width: 100%;
    border-radius: 24px;
    border: 1px solid rgba(24, 48, 71, 0.1);
    background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.canvas-caption {
    margin: 16px 0 0;
    line-height: 1.8;
}

.link-card {
    min-height: 100%;
}

.site-footer {
    margin-top: 30px;
    padding: 22px 24px 26px;
    border-radius: 28px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--muted);
}

@keyframes drift {
    0% {
        transform: translate(-18px, -8px) scale(0.85);
        opacity: 0.22;
    }
    35% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(150px, 0) scale(0.72);
        opacity: 0;
    }
}

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

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

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

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

    .site-nav {
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
        font-size: 0.88rem;
    }

    .hero-copy,
    .hero-panel,
    .control-panel,
    .canvas-panel,
    .signal-strip,
    .step-card,
    .comparison-card,
    .link-card,
    .site-footer {
        border-radius: 24px;
    }

    .hero-copy,
    .control-panel,
    .canvas-panel {
        padding: 22px 18px;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-actions .button {
        width: 100%;
    }

    .hero-illustration {
        min-height: 280px;
    }

    .cell {
        width: 92px;
        height: 92px;
    }

    .stat-grid,
    .step-grid,
    .comparison-grid,
    .link-grid,
    .action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .hero-illustration {
        min-height: 250px;
    }

    .label {
        font-size: 0.72rem;
        letter-spacing: 0.04em;
    }

    .legend {
        gap: 10px;
        font-size: 0.84rem;
    }
}