:root {
    --bg-dark: #140904;
    --bg-mid: #2f1710;
    --bg-soft: #faf4ef;
    --surface: rgba(255, 248, 242, 0.95);
    --surface-soft: rgba(247, 230, 218, 0.9);
    --surface-strong: rgba(255, 255, 255, 0.98);
    --ink: #2f180f;
    --muted: #72584b;
    --line: rgba(47, 24, 15, 0.12);
    --accent: #cb6a31;
    --accent-strong: #6e2f18;
    --accent-soft: #f1b58a;
    --accent-soft-strong: #9a4a25;
    --warm: #f2a340;
    --cold: #71c7e6;
    --shadow: 0 28px 68px rgba(32, 15, 8, 0.18);
}

* {
    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 16% 14%, rgba(242, 163, 64, 0.24), transparent 18%),
        radial-gradient(circle at 84% 18%, rgba(113, 199, 230, 0.16), transparent 20%),
        linear-gradient(180deg, #140904 0%, #2f1710 16%, #f3e5d9 16.1%, #fffaf6 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.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.14));
}

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(20, 9, 4, 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.22);
}

.brand {
    color: #fff6f0;
    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(255, 246, 240, 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.92fr) minmax(0, 1.08fr);
    gap: 24px;
    padding: 34px 0 22px;
}

.hero-copy,
.hero-panel,
.mechanism-card,
.formula-card,
.model-card,
.comparison-card,
.growth-card,
.demo-panel,
.canvas-panel,
.environment-card,
.link-card,
.signal-strip,
.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 32px 42px 38px;
    border-radius: 38px;
    position: relative;
    overflow: hidden;
}

.hero-copy::after {
    content: "";
    position: absolute;
    inset: auto -52px -108px auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(241, 181, 138, 0.5), rgba(241, 181, 138, 0));
}

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

.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,
.formula-block,
.signal-main,
.footer-link,
.canvas-caption strong {
    font-family: "Shippori Mincho", serif;
}

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

h1,
h2 {
    margin: 0;
}

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

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

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

.hero-actions,
.demo-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,
.link-card:hover,
.link-card:focus-visible,
.preset-chip:hover,
.preset-chip:focus-visible {
    transform: translateY(-2px);
}

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

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

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

.friction-window,
.control,
.stat-grid article,
.preset-chip,
.link-card,
.comparison-card,
.growth-card,
.hero-note {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 230, 218, 0.86));
    border: 1px solid rgba(47, 24, 15, 0.08);
}

.friction-window {
    position: relative;
    min-height: 360px;
    border-radius: 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at 76% 20%, rgba(113, 199, 230, 0.2), transparent 20%),
        linear-gradient(180deg, #352018 0%, #5a3426 44%, #e3c7b3 44.2%, #f7ede4 100%);
}

.mini-track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 72px;
    height: 14px;
    background: linear-gradient(180deg, #8d6a59, #5f4336);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

.mini-block {
    position: absolute;
    left: 32%;
    bottom: 86px;
    width: 132px;
    height: 82px;
    border-radius: 20px;
    background: linear-gradient(145deg, #ffe7d3, #d5966f);
    border: 1px solid rgba(255, 255, 255, 0.52);
    box-shadow: 0 14px 24px rgba(32, 15, 8, 0.22);
}

.mini-block::after {
    content: "μ";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(47, 24, 15, 0.72);
    font-family: "Shippori Mincho", serif;
    font-size: 2rem;
}

.mini-arrow {
    position: absolute;
    height: 6px;
    border-radius: 999px;
}

.mini-arrow::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
}

.arrow-force {
    left: 56%;
    bottom: 168px;
    width: 90px;
    background: linear-gradient(90deg, rgba(242, 163, 64, 0.2), rgba(242, 163, 64, 0.95));
}

.arrow-force::after {
    right: -14px;
    border-left: 18px solid var(--warm);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.arrow-friction {
    left: 18%;
    bottom: 140px;
    width: 88px;
    background: linear-gradient(90deg, rgba(113, 199, 230, 0.95), rgba(113, 199, 230, 0.12));
}

.arrow-friction::after {
    left: -14px;
    border-right: 18px solid var(--cold);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.contact-strip {
    position: absolute;
    left: 32%;
    bottom: 74px;
    width: 132px;
    height: 18px;
}

.contact-node {
    position: absolute;
    bottom: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffd5b3;
    box-shadow: 0 0 10px rgba(255, 213, 179, 0.45);
}

.contact-node::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    width: 2px;
    height: 10px;
    transform: translateX(-50%);
    background: rgba(255, 213, 179, 0.7);
}

.node-a { left: 6px; }
.node-b { left: 26px; }
.node-c { left: 46px; }
.node-d { left: 62px; }
.node-e { left: 80px; }
.node-f { left: 100px; }
.node-g { left: 118px; }

.heat-wave {
    position: absolute;
    border-radius: 999px;
    filter: blur(12px);
    opacity: 0.7;
    animation: pulse 1.8s ease-in-out infinite;
}

.wave-a {
    left: 22%;
    bottom: 126px;
    width: 76px;
    height: 28px;
    background: rgba(242, 163, 64, 0.42);
}

.wave-b {
    left: 24%;
    bottom: 98px;
    width: 62px;
    height: 22px;
    background: rgba(203, 106, 49, 0.34);
    animation-delay: 0.4s;
}

.window-label {
    position: absolute;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(20, 9, 4, 0.45);
    color: rgba(255, 246, 240, 0.94);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.label-adhesion { left: 18px; bottom: 18px; }
.label-heat { right: 20px; top: 18px; }

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.08); opacity: 0.8; }
}

.hero-note-grid,
.mechanism-grid,
.model-grid,
.comparison-grid,
.growth-grid,
.environment-grid,
.link-grid,
.formula-strip,
.demo-grid,
.control-grid,
.stat-grid {
    display: grid;
    gap: 18px;
}

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

.hero-note,
.mechanism-card,
.formula-card,
.model-card,
.comparison-card,
.growth-card,
.demo-panel,
.canvas-panel,
.environment-card,
.link-card {
    padding: 24px 26px;
    border-radius: 28px;
}

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

.strong-card {
    background: linear-gradient(145deg, rgba(255, 238, 225, 0.98), rgba(250, 212, 183, 0.9));
}

.warm-card {
    background: linear-gradient(145deg, rgba(255, 235, 207, 0.98), rgba(245, 191, 121, 0.9));
}

.night-card {
    background: linear-gradient(145deg, rgba(36, 22, 17, 0.98), rgba(77, 45, 34, 0.94));
    color: white;
}

.night-card p,
.night-card .card-label,
.night-card h2,
.night-card h3,
.night-card li {
    color: white;
}

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

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

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

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

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

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

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

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

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

.formula-block {
    font-size: clamp(1.08rem, 2vw, 1.5rem);
    color: var(--ink);
}

.model-card ul {
    margin: 18px 0 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 8px;
}

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

.preset-chip {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(47, 24, 15, 0.08);
    color: var(--accent-strong);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
    cursor: pointer;
}

.preset-chip.is-active {
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 14px 24px rgba(110, 47, 24, 0.22);
}

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

.control-grid {
    margin-top: 20px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.control {
    display: grid;
    gap: 8px;
    padding: 18px 20px;
    border-radius: 22px;
}

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

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

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

.stat-grid article {
    padding: 18px 20px;
    border-radius: 22px;
}

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

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

.demo-panel,
.canvas-panel {
    background: linear-gradient(180deg, rgba(255, 252, 249, 0.98), rgba(247, 230, 218, 0.88));
}

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

.demo-canvas {
    width: 100%;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(18, 10, 6, 0.98), rgba(46, 24, 15, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.link-card {
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.site-footer {
    margin-top: 64px;
    padding: 24px 30px;
    border-radius: 28px;
    background: rgba(20, 9, 4, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 246, 240, 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: 1120px) {
    .hero,
    .signal-strip,
    .demo-grid,
    .formula-strip,
    .comparison-grid,
    .growth-grid,
    .link-grid {
        grid-template-columns: 1fr;
    }

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

@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,
    .hero-note,
    .mechanism-card,
    .formula-card,
    .model-card,
    .comparison-card,
    .growth-card,
    .demo-panel,
    .canvas-panel,
    .environment-card,
    .link-card,
    .signal-strip,
    .site-footer {
        padding: 22px;
        border-radius: 24px;
    }

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

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

    .hero-note-grid,
    .mechanism-grid,
    .model-grid,
    .comparison-grid,
    .growth-grid,
    .control-grid,
    .stat-grid,
    .environment-grid,
    .link-grid {
        grid-template-columns: 1fr;
    }

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

    .friction-window {
        min-height: 320px;
    }

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