:root {
    --bg-dark: #120d0a;
    --bg-mid: #352219;
    --bg-soft: #f7efe8;
    --surface: rgba(254, 249, 244, 0.92);
    --surface-soft: rgba(243, 229, 216, 0.84);
    --surface-strong: rgba(255, 255, 255, 0.96);
    --ink: #241813;
    --muted: #6f625c;
    --line: rgba(36, 24, 19, 0.12);
    --accent: #c6733a;
    --accent-strong: #8f4a21;
    --accent-soft: #efb27f;
    --cool: #557f90;
    --cool-strong: #274b59;
    --shadow: 0 28px 70px rgba(18, 13, 10, 0.16);
}

* {
    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 18% 12%, rgba(239, 178, 127, 0.18), transparent 22%),
        radial-gradient(circle at 84% 12%, rgba(85, 127, 144, 0.18), transparent 20%),
        linear-gradient(180deg, #120d0a 0%, #352219 17%, #f3ece4 17.1%, #fbf7f2 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.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.84), 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(18, 13, 10, 0.82);
    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 {
    color: #fdf7f2;
    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(253, 247, 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;
}

.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,
.step-card,
.formula-card,
.demo-panel,
.canvas-panel,
.comparison-card,
.link-card,
.signal-strip,
.hero-note,
.site-footer {
    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 -72px -126px auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(239, 178, 127, 0.34), rgba(239, 178, 127, 0));
}

.hero-panel {
    min-width: 0;
    padding: 26px;
    border-radius: 36px;
    display: grid;
    gap: 18px;
    background: rgba(248, 238, 229, 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,
.signal-main,
.formula-block,
.note-title,
.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.4rem);
    letter-spacing: -0.04em;
}

.hero-lead,
.section-heading p,
.step-card p,
.formula-card p,
.demo-note,
.comparison-card p,
.link-card p,
.canvas-caption,
.hero-note p,
.signal-sub,
.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,
.preset-chip:hover,
.preset-chip:focus-visible {
    transform: translateY(-1px);
}

.button-primary {
    color: #fff8f3;
    background: linear-gradient(135deg, var(--accent), #a85929);
    box-shadow: 0 14px 28px rgba(143, 74, 33, 0.22);
}

.button-secondary {
    border-color: rgba(143, 74, 33, 0.18);
    background: rgba(255, 255, 255, 0.82);
    color: var(--accent-strong);
}

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

.hero-points li {
    position: relative;
    padding-left: 20px;
    line-height: 1.7;
}

.hero-points li::before {
    content: "";
    position: absolute;
    top: 0.68em;
    left: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--cool));
    box-shadow: 0 0 16px rgba(198, 115, 58, 0.3);
}

.force-window {
    position: relative;
    min-height: 300px;
    border-radius: 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 18%, rgba(239, 178, 127, 0.14), transparent 22%),
        linear-gradient(180deg, #15100d 0%, #0f0b09 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.press-bar {
    position: absolute;
    left: 50%;
    top: 34px;
    width: 180px;
    height: 16px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(180deg, #e9ddd0, #95806f);
}

.arrow {
    position: absolute;
    width: 2px;
    height: 46px;
    top: 56px;
    background: linear-gradient(180deg, rgba(247, 232, 215, 0), rgba(247, 232, 215, 0.92));
}

.arrow::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(247, 232, 215, 0.92);
    border-bottom: 2px solid rgba(247, 232, 215, 0.92);
    transform: translateX(-50%) rotate(45deg);
}

.arrow-a { left: calc(50% - 48px); }
.arrow-b { left: calc(50% + 48px); }

.grain,
.chain,
.window-label {
    position: absolute;
}

.grain {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255, 210, 170, 0.55);
    background: #23303a;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.grain-a { left: calc(50% - 18px); top: 112px; box-shadow: 0 0 18px rgba(255, 156, 80, 0.5); }
.grain-b { left: calc(50% - 58px); top: 150px; }
.grain-c { left: calc(50% + 20px); top: 152px; }
.grain-d { left: calc(50% - 92px); top: 188px; }
.grain-e { left: calc(50% - 18px); top: 194px; box-shadow: 0 0 18px rgba(255, 156, 80, 0.45); }
.grain-f { left: calc(50% + 58px); top: 190px; }
.grain-g { left: calc(50% - 126px); top: 226px; }
.grain-h { left: calc(50% + 92px); top: 226px; }

.chain {
    height: 5px;
    border-radius: 999px;
    transform-origin: left center;
    background: linear-gradient(90deg, rgba(255, 159, 84, 0.24), rgba(255, 214, 96, 0.92));
    box-shadow: 0 0 18px rgba(255, 176, 92, 0.3);
}

.chain-a { left: calc(50% - 4px); top: 132px; width: 52px; transform: rotate(126deg); }
.chain-b { left: calc(50% - 2px); top: 132px; width: 56px; transform: rotate(52deg); }
.chain-c { left: calc(50% - 56px); top: 172px; width: 72px; transform: rotate(134deg); }
.chain-d { left: calc(50% + 18px); top: 172px; width: 76px; transform: rotate(42deg); }

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

.label-top { right: 28px; top: 32px; }
.label-middle { right: 34px; top: 152px; }
.label-base { right: 38px; bottom: 28px; }

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

.hero-note {
    padding: 18px 18px 20px;
    border-radius: 24px;
}

.hero-note h2 {
    margin: 10px 0 8px;
    font-size: 1.12rem;
}

.hero-note p {
    margin: 0;
    line-height: 1.72;
}

.strong-card {
    background: linear-gradient(180deg, rgba(255, 250, 246, 0.98), rgba(248, 230, 214, 0.9));
}

.warm-card {
    background: linear-gradient(180deg, rgba(255, 246, 236, 0.98), rgba(255, 226, 196, 0.9));
}

.night-card {
    background: linear-gradient(180deg, rgba(238, 245, 248, 0.98), rgba(220, 233, 239, 0.9));
}

.signal-strip {
    margin-top: 12px;
    padding: 26px 30px;
    border-radius: 30px;
}

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

.signal-main {
    margin: 12px 0 8px;
    font-size: clamp(1.35rem, 3vw, 2.3rem);
    line-height: 1.3;
}

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

.section {
    margin-top: 84px;
}

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

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

.section-heading p {
    margin: 14px 0 0;
    line-height: 1.82;
}

.principle-grid,
.comparison-grid,
.link-grid {
    display: grid;
    gap: 18px;
}

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

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

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

.step-card h3,
.comparison-card h3,
.link-card h3 {
    margin: 10px 0 12px;
    font-size: 1.34rem;
}

.step-card p,
.comparison-card p,
.link-card p {
    margin: 0;
    line-height: 1.8;
}

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

.formula-card {
    min-width: 0;
    padding: 24px 26px;
    border-radius: 28px;
}

.formula-block {
    margin: 12px 0 10px;
    font-size: clamp(1.18rem, 2.4vw, 1.72rem);
    line-height: 1.45;
    color: var(--accent-strong);
}

.demo-grid {
    display: grid;
    grid-template-columns: minmax(300px, 368px) minmax(0, 1fr);
    gap: 20px;
}

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

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

.preset-chip {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(143, 74, 33, 0.16);
    background: rgba(255, 255, 255, 0.86);
    color: var(--accent-strong);
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.preset-chip.is-active {
    color: #fff8f3;
    background: linear-gradient(135deg, var(--accent), #a85929);
    box-shadow: 0 14px 28px rgba(143, 74, 33, 0.18);
}

.control-grid {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

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

.control span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

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

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

.demo-note {
    margin: 18px 0 0;
    line-height: 1.78;
}

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

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

.stat-grid article {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(143, 74, 33, 0.08);
}

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

.stat-grid strong {
    display: block;
    margin-top: 8px;
    font-size: 1.18rem;
    color: var(--ink);
    line-height: 1.45;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.93rem;
}

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

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

.legend-swatch.chain-strong {
    background: #ffd46a;
    box-shadow: 0 0 12px rgba(255, 212, 106, 0.45);
}

.legend-swatch.chain-weak {
    background: #ef8857;
    box-shadow: 0 0 12px rgba(239, 136, 87, 0.3);
}

.legend-swatch.force-pressure {
    background: #ff9448;
    box-shadow: 0 0 12px rgba(255, 148, 72, 0.42);
}

.legend-swatch.force-weight {
    background: #56c4ff;
    box-shadow: 0 0 12px rgba(86, 196, 255, 0.38);
}

.legend-swatch.force-mixed {
    background: linear-gradient(135deg, #ff9448, #56c4ff);
    box-shadow: 0 0 12px rgba(153, 180, 228, 0.35);
}

.legend-swatch.plate {
    background: #d0c5b7;
}

.legend-swatch.base {
    background: #6e665f;
}

.canvas-panel {
    background: linear-gradient(180deg, rgba(252, 247, 242, 0.84), rgba(244, 238, 231, 0.94));
}

.demo-canvas {
    width: 100%;
    border-radius: 24px;
    background: linear-gradient(180deg, #17110d 0%, #0e0a08 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.site-footer {
    margin-top: 84px;
    padding: 26px 30px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-footer p {
    margin: 0;
}

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

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

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

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

    .site-header {
        position: static;
        margin-top: 12px;
        padding: 14px 16px;
        border-radius: 28px;
    }

    .site-nav {
        gap: 12px;
        font-size: 0.9rem;
    }

    .hero-copy,
    .hero-panel,
    .demo-panel,
    .canvas-panel,
    .signal-strip,
    .site-footer,
    .step-card,
    .comparison-card,
    .link-card,
    .formula-card {
        padding: 22px;
        border-radius: 26px;
    }

    .hero-note-grid,
    .principle-grid,
    .formula-strip,
    .comparison-grid,
    .link-grid,
    .stat-grid,
    .force-stat-grid {
        grid-template-columns: 1fr;
    }

    .signal-main {
        font-size: 1.65rem;
    }

    .force-window {
        min-height: 260px;
    }

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

@media (max-width: 540px) {
    h1 {
        font-size: 2.4rem;
    }

    .hero-actions,
    .preset-row,
    .footer-links {
        width: 100%;
    }

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

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

    .force-window {
        min-height: 232px;
    }

    .window-label {
        font-size: 0.74rem;
    }

    .press-bar {
        width: 140px;
    }
}