:root {
    --bg-dark: #081922;
    --bg-mid: #0f3344;
    --surface: rgba(255, 251, 245, 0.9);
    --surface-soft: rgba(245, 249, 250, 0.82);
    --surface-strong: rgba(255, 247, 235, 0.92);
    --ink: #10252d;
    --muted: #5a7179;
    --line: rgba(16, 37, 45, 0.12);
    --accent: #16526a;
    --accent-strong: #0d3a4a;
    --accent-soft: #1d708a;
    --warm: #e7a44b;
    --warm-strong: #b67722;
    --shadow: 0 28px 60px rgba(8, 25, 34, 0.18);
    --radius: 30px;
}

* {
    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 13% 17%, rgba(29, 112, 138, 0.32), transparent 22%),
        radial-gradient(circle at 85% 12%, rgba(231, 164, 75, 0.24), transparent 20%),
        linear-gradient(180deg, #07151c 0%, #0d2a37 18%, #eef3ef 18.1%, #f5efe5 100%);
    min-height: 100vh;
}

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.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.08));
}

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

button,
input {
    font: inherit;
}

.page-shell {
    width: min(1200px, 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, 24, 32, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.brand {
    color: #f7f0e4;
    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(247, 240, 228, 0.82);
    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 {
    opacity: 1;
    transform: translateY(0);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.98fr);
    gap: 28px;
    padding: 34px 0 22px;
}

.hero-copy,
.hero-panel,
.concept-card,
.flow-card,
.pattern-card,
.history-card,
.demo-panel,
.chart-panel,
.mechanism-card,
.closing-card,
.next-card,
.signal-strip {
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

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

.hero-copy::after {
    content: "";
    position: absolute;
    inset: auto -54px -84px auto;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(231, 164, 75, 0.52), rgba(231, 164, 75, 0));
}

.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;
    font-family: "Shippori Mincho", serif;
}

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

.hero-lead,
.section-heading p,
.hero-note p,
.concept-card p,
.flow-card p,
.pattern-card p,
.history-card p,
.demo-caption,
.demo-note,
.chart-caption,
.mechanism-card p,
.closing-copy,
.next-card p,
.site-footer p {
    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;
}

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

.button-primary {
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 14px 28px rgba(13, 58, 74, 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;
}

.hero-panel {
    padding: 26px;
    border-radius: 36px;
    display: grid;
    gap: 18px;
    background: rgba(247, 252, 252, 0.18);
}

.hero-visual {
    margin: 0;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(6, 25, 29, 0.54);
}

.hero-visual img {
    display: block;
    width: 100%;
    height: auto;
}

.hero-note {
    padding: 22px 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 250, 243, 0.88), rgba(237, 247, 249, 0.78));
    border: 1px solid rgba(16, 37, 45, 0.08);
}

.note-label,
.signal-kicker,
.pattern-label,
.closing-title,
.card-index {
    display: inline-block;
    font-weight: 700;
    color: var(--accent-strong);
    letter-spacing: 0.08em;
}

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

.signal-kicker {
    margin: 0;
    font-size: 0.86rem;
    text-transform: uppercase;
}

.signal-main {
    margin: 0;
    font-family: "Shippori Mincho", serif;
    font-size: clamp(1.6rem, 3vw, 2.45rem);
}

.signal-sub {
    margin: 0;
    line-height: 1.75;
    color: var(--muted);
}

.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: 760px;
    line-height: 1.85;
}

.concept-grid,
.pattern-grid,
.history-grid,
.demo-grid,
.mechanism-grid,
.next-grid {
    display: grid;
    gap: 20px;
}

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

.concept-card,
.flow-card,
.pattern-card,
.history-card,
.demo-panel,
.chart-panel,
.mechanism-card,
.closing-card,
.next-card {
    padding: 28px;
    border-radius: var(--radius);
}

.concept-card h3,
.pattern-card h3,
.history-card h3,
.mechanism-card h3,
.next-card h3,
.closing-title {
    margin: 8px 0 14px;
    font-size: 1.24rem;
}

.concept-card-soft {
    background: linear-gradient(180deg, rgba(245, 251, 252, 0.96), rgba(241, 247, 248, 0.84));
}

.concept-card-highlight {
    background: linear-gradient(180deg, rgba(255, 248, 237, 0.96), rgba(250, 241, 229, 0.84));
}

.concept-card-strong {
    background: linear-gradient(180deg, rgba(255, 251, 244, 0.96), rgba(246, 249, 250, 0.84));
}

.mini-stage {
    margin-top: 18px;
    overflow: hidden;
    border-radius: 22px;
}

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

.flow-card {
    display: grid;
    gap: 10px;
    margin-top: 22px;
    background: linear-gradient(135deg, rgba(23, 82, 106, 0.96), rgba(29, 112, 138, 0.92));
    color: white;
    border-color: rgba(255, 255, 255, 0.14);
}

.flow-expression {
    margin: 0;
    color: white;
    font-family: "Shippori Mincho", serif;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.flow-card p:last-child {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

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

.pattern-card {
    background: linear-gradient(180deg, rgba(248, 252, 253, 0.96), rgba(243, 248, 250, 0.84));
}

.pattern-card-middle {
    background: linear-gradient(180deg, rgba(255, 249, 241, 0.96), rgba(252, 243, 231, 0.84));
}

.pattern-card-strong {
    background: linear-gradient(135deg, rgba(13, 58, 74, 0.96), rgba(22, 82, 106, 0.92));
    color: white;
    border-color: rgba(255, 255, 255, 0.16);
}

.pattern-card-strong p,
.pattern-card-strong .pattern-label {
    color: rgba(255, 255, 255, 0.82);
}

.pattern-figure {
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 22px;
}

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

.history-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.history-card {
    background: linear-gradient(180deg, rgba(255, 251, 244, 0.96), rgba(243, 248, 250, 0.84));
}

.analogy-card {
    background: linear-gradient(135deg, rgba(244, 249, 250, 0.96), rgba(255, 247, 236, 0.88));
}

.analogy-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.analogy-strip div {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(16, 37, 45, 0.08);
}

.analogy-strip span {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-strong);
    font-weight: 700;
}

.analogy-strip p {
    margin: 0;
}

.demo-grid {
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
}

.demo-panel {
    background: linear-gradient(180deg, rgba(255, 250, 243, 0.97), rgba(246, 247, 245, 0.85));
}

.equation-stack {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.equation-block {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    padding: 16px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(16, 37, 45, 0.08);
    font-family: "Shippori Mincho", serif;
    font-size: 1.35rem;
}

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

.control {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.control span {
    font-weight: 600;
}

.control strong {
    color: var(--accent-strong);
    font-size: 1.06rem;
}

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

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

.preset-button {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(16, 37, 45, 0.12);
    background: rgba(255, 255, 255, 0.76);
    color: var(--ink);
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.preset-button:hover,
.preset-button:focus-visible,
.preset-button.is-active {
    transform: translateY(-1px);
    background: rgba(22, 82, 106, 0.1);
    border-color: rgba(22, 82, 106, 0.28);
}

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

.stat-grid article {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(16, 37, 45, 0.08);
}

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

.stat-grid strong {
    display: block;
    color: var(--ink);
    font-size: 1.04rem;
    line-height: 1.5;
}

.demo-note {
    margin: 0;
    line-height: 1.8;
}

.chart-panel {
    background: linear-gradient(180deg, rgba(7, 24, 32, 0.96), rgba(16, 51, 68, 0.92));
    color: rgba(255, 255, 255, 0.86);
}

.chart-frame {
    overflow: hidden;
    border-radius: 24px;
    background: #fdf9f2;
    aspect-ratio: 1 / 1;
}

.chart-frame canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.chart-caption {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
}

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

.mechanism-card {
    background: linear-gradient(180deg, rgba(248, 252, 253, 0.96), rgba(243, 248, 250, 0.84));
}

.mechanism-card-accent {
    background: linear-gradient(180deg, rgba(255, 249, 241, 0.96), rgba(252, 243, 231, 0.84));
}

.mechanism-card-strong {
    background: linear-gradient(135deg, rgba(13, 58, 74, 0.96), rgba(22, 82, 106, 0.92));
    color: white;
    border-color: rgba(255, 255, 255, 0.16);
}

.mechanism-card-strong p {
    color: rgba(255, 255, 255, 0.82);
}

.closing-card {
    margin-top: 22px;
    background: linear-gradient(135deg, rgba(22, 82, 106, 0.96), rgba(29, 112, 138, 0.9));
    color: white;
    border-color: rgba(255, 255, 255, 0.16);
}

.closing-title,
.closing-copy {
    margin: 0;
}

.closing-title {
    color: rgba(255, 255, 255, 0.78);
}

.closing-copy {
    margin-top: 10px;
    color: white;
    font-family: "Shippori Mincho", serif;
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    line-height: 1.7;
}

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

.next-card {
    background: linear-gradient(180deg, rgba(248, 252, 253, 0.96), rgba(243, 248, 250, 0.84));
}

.site-footer {
    margin-top: 64px;
    padding: 24px 30px;
    border-radius: 28px;
    background: rgba(7, 24, 32, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
    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,
    .history-grid,
    .demo-grid {
        grid-template-columns: 1fr;
    }

    .concept-grid,
    .pattern-grid,
    .mechanism-grid,
    .next-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .signal-strip {
        gap: 10px;
    }
}

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

    .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,
    .flow-card,
    .pattern-card,
    .history-card,
    .demo-panel,
    .chart-panel,
    .mechanism-card,
    .closing-card,
    .next-card,
    .signal-strip,
    .site-footer {
        padding: 22px;
        border-radius: 24px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .hero,
    .section {
        margin-top: 68px;
    }

    .hero {
        padding-top: 8px;
    }

    .concept-grid,
    .pattern-grid,
    .mechanism-grid,
    .next-grid,
    .stat-grid,
    .analogy-strip {
        grid-template-columns: 1fr;
    }

    .preset-row,
    .footer-links {
        flex-direction: column;
        align-items: stretch;
    }

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