@charset "UTF-8";

:root {
    --color-ink: #1b1d1c;
    --color-paper: #f2f0e8;
    --color-line: rgba(27, 29, 28, 0.2);
    --color-accent: #ff5c35;
    --color-night: #101820;
    --color-sage: #c6d1bc;
    --color-rose: #f3c8cf;
    --font-sans: "Helvetica Neue", Helvetica, Arial, "Hiragino Sans", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--color-ink);
    background: var(--color-paper);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

button,
a {
    color: inherit;
}

a {
    text-decoration: none;
}

.l-inner {
    width: min(90vw, 1280px);
    margin-inline: auto;
}

.l-header {
    position: fixed;
    z-index: 50;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 5vw;
    color: var(--color-paper);
    mix-blend-mode: difference;
    pointer-events: none;
}

.l-header__title {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.p-intro {
    display: grid;
    min-height: 100svh;
    padding-block: 120px 56px;
    align-items: end;
    background:
        linear-gradient(90deg, transparent 0 calc(50% - 0.5px), var(--color-line) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
        var(--color-paper);
}

.p-intro__eyebrow {
    margin: 0 0 20px;
    color: var(--color-accent);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.p-intro__title {
    margin: 0;
    font-size: clamp(3.5rem, 14vw, 11rem);
    font-weight: 500;
    letter-spacing: -0.07em;
    line-height: 0.82;
}

.p-intro__lead {
    max-width: 33rem;
    margin: 32px 0 0;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    line-height: 1.9;
}

.p-intro__nav {
    display: grid;
    margin-top: 56px;
    border-top: 1px solid var(--color-line);
}

.p-intro__link {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-line);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    transition: padding 0.3s ease, color 0.3s ease;
}

.p-intro__link::after {
    content: "↘";
}

.p-demo {
    position: relative;
    min-height: 100svh;
}

.p-demo__inner {
    display: grid;
    min-height: 100svh;
}

.p-demo__copy,
.p-demo__stage {
    display: flex;
    min-width: 0;
    padding: 56px 5vw;
}

.p-demo__copy {
    flex-direction: column;
    justify-content: flex-end;
    min-height: 42svh;
}

.p-demo__number {
    margin: 0 auto auto 0;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
}

.p-demo__title {
    margin: 0;
    font-size: clamp(2.75rem, 8vw, 7.5rem);
    font-weight: 500;
    letter-spacing: -0.06em;
    line-height: 0.9;
}

.p-demo__description {
    max-width: 28rem;
    margin: 28px 0 0;
    font-size: 0.875rem;
    line-height: 1.8;
}

.p-demo__code {
    margin: 16px 0 0;
    font-size: 0.75rem;
    opacity: 0.7;
}

.p-demo__code code {
    padding: 4px 8px;
    background: rgba(27, 29, 28, 0.08);
    border-radius: 4px;
}

.p-demo__stage {
    position: relative;
    min-height: 58svh;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 各セクションの配色 */
.p-demo--scale {
    color: var(--color-paper);
    background: var(--color-ink);
}

.p-demo--scale .p-demo__stage {
    background: var(--color-accent);
}

.p-demo--scale .p-demo__code code {
    background: rgba(242, 240, 232, 0.15);
}

.p-demo--darken {
    background: var(--color-sage);
}

.p-demo--darken .p-demo__stage {
    background: var(--color-night);
}

.p-demo--shadow {
    color: var(--color-ink);
    background: var(--color-paper);
}

.p-demo--shadow .p-demo__stage {
    background: #e4d9ff;
}

.p-demo--ripple {
    color: var(--color-paper);
    background: var(--color-night);
}

.p-demo--ripple .p-demo__stage {
    background: var(--color-paper);
}

.p-demo--ripple .p-demo__code code {
    background: rgba(242, 240, 232, 0.15);
}

.p-demo--bounce {
    background: var(--color-rose);
}

.p-demo--bounce .p-demo__stage {
    background: var(--color-ink);
}

/* =========================================
   タップフィードバック（ここが本体）
   共通の下ごしらえ：
   - -webkit-tap-highlight-color でOS標準の灰色ハイライトを消す
   - touch-action: manipulation でダブルタップズームの遅延を防ぐ
   - 押し込みのtransitionは0.1s前後。遅いと安っぽく見える
   ========================================= */
.c-tap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 240px;
    padding: 18px 40px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--color-ink);
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

/* 01: Press Scale — 押している間だけ縮む */
.c-tap--scale {
    transition: transform 0.1s ease;
}

.c-tap--scale:active,
.c-tap--scale.is-pressed {
    transform: scale(0.96);
}

/* 02: Darken — 押している間だけ暗くなる */
.c-tap--darken {
    background: var(--color-sage);
    transition: filter 0.1s ease, transform 0.1s ease;
}

.c-tap--darken:active,
.c-tap--darken.is-pressed {
    filter: brightness(0.92);
    transform: scale(0.99);
}

/* 03: Shadow Sink — 影が消えて沈む */
.c-tap--shadow {
    box-shadow: 0 6px 0 rgba(27, 29, 28, 0.85);
    transition: box-shadow 0.1s ease, translate 0.1s ease;
}

.c-tap--shadow:active,
.c-tap--shadow.is-pressed {
    box-shadow: 0 1px 0 rgba(27, 29, 28, 0.85);
    translate: 0 5px;
}

/* 04: Ripple — タップ位置から波紋。JSでspanを追加する */
.c-tap--ripple {
    position: relative;
    overflow: hidden;
    background: var(--color-night);
    color: var(--color-paper);
}

.c-tap__ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    pointer-events: none;
    transform: scale(0);
    animation: tap-ripple 0.6s ease-out forwards;
}

@keyframes tap-ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 05: Bounce Release — 押して縮み、離すと弾んで戻る */
.c-tap--bounce {
    background: var(--color-rose);
    transition: transform 0.1s ease;
}

.c-tap--bounce:active,
.c-tap--bounce.is-pressed {
    transform: scale(0.92);
}

.c-tap--bounce.is-bouncing {
    animation: tap-bounce 0.45s cubic-bezier(0.28, 1.8, 0.42, 1);
}

@keyframes tap-bounce {
    0% {
        transform: scale(0.92);
    }

    100% {
        transform: scale(1);
    }
}

.l-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 5vw;
    color: var(--color-paper);
    background: var(--color-ink);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
}

.l-footer p {
    margin: 0;
}

.l-footer__link {
    padding-block: 4px;
    border-bottom: 1px solid currentColor;
}

@media (prefers-reduced-motion: reduce) {
    .c-tap,
    .c-tap--scale,
    .c-tap--darken,
    .c-tap--shadow,
    .c-tap--bounce {
        transition: none;
        animation: none;
    }

    .c-tap__ripple {
        animation: none;
        opacity: 0;
    }

    .c-tap--bounce.is-bouncing {
        animation: none;
    }
}
