/* ===================================================
   CLAY — 購入フロー ページ (css/flow.css)
   Mobile-first, immersive scroll experience
   =================================================== */

::selection {
    background: rgba(184, 151, 63, 0.18);
    color: #241f19;
}

.flow-page {
    background: #f3e9dc;
    color: #241f19;
    overflow-x: hidden;
}

/* ── Progress Bar ── */
.flow-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 999;
    background: rgba(26, 23, 20, 0.08);
}

.flow-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #241f19, #7a6f5f);
    transition: width 0.1s linear;
}

/* ═══════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════ */
.flow-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 24px 60px;
    overflow: hidden;
}

.flow-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.flow-hero-orb,
.flow-hero-orb--1,
.flow-hero-orb--2,
.flow-hero-orb--3,
.flow-hero-grid {
    display: none;
}

.flow-hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.flow-hero-title {
    font-family: 'Fraunces', 'Shippori Mincho', Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
    font-size: clamp(32px, 7vw, 64px);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: 0.02em;
    margin-bottom: 20px;
}

.flow-hero-title em {
    font-style: normal;
    color: var(--accent, #b08a4e);
}

.flow-hero-lead {
    font-size: 14px;
    line-height: 2.0;
    letter-spacing: 0.02em;
    color: rgba(26, 23, 20, 0.62);
}

.flow-hero-scroll {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.flow-hero-scroll span {
    font-size: 10px;
    letter-spacing: 0.2em;
    color: rgba(26, 23, 20, 0.35);
}

.flow-hero-scroll-line,
.flow-hero-scroll-dot {
    display: none;
}

/* ═══════════════════════════════════════════════════
   STEP SECTIONS
   ═══════════════════════════════════════════════════ */
.flow-step {
    position: relative;
    padding: 80px 24px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;

    /* Reveal animation */
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.flow-step.in-view {
    opacity: 1;
    transform: translateY(0);
}

.flow-step-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.flow-step-glow {
    display: none;
}

.flow-step-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ── Step Number ── */
.flow-step-num-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.flow-step-num {
    font-family: 'Fraunces', 'Shippori Mincho', Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
    font-size: 38px;
    font-weight: 300;
    color: var(--accent, #b08a4e);
    line-height: 1;
}

.flow-step-num-line {
    display: none;   /* 番号の横の飾り罫はやめた（2026-09-24） */
    flex: 1;
    height: 1px;
    background: rgba(26, 23, 20, 0.18);
    max-width: 120px;
}

/* ── Step Title ── */
.flow-step-title {
    font-family: 'Fraunces', 'Shippori Mincho', Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
    font-size: clamp(24px, 6.5vw, 48px);
    font-weight: 300;
    line-height: 1.25;
    margin-bottom: 20px;
}

.flow-step-title em {
    font-style: normal;
    color: var(--accent, #b08a4e);
}

.flow-step-desc {
    font-size: 14px;
    line-height: 2.0;
    color: rgba(26, 23, 20, 0.6);
    letter-spacing: 0.02em;
    margin-bottom: 28px;
}

/* ── Feature list ── */
.flow-step-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.flow-step-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(26, 23, 20, 0.7);
    letter-spacing: 0.02em;
}

/* ── CTA Button ── */
.flow-step-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #241f19;
    color: #f3e9dc;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
}

.flow-step-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(26, 23, 20, 0.18);
}

.flow-step-btn--outline {
    background: transparent;
    color: #241f19;
    border: 1px solid rgba(26, 23, 20, 0.28);
}

.flow-step-btn--outline:hover {
    border-color: rgba(26, 23, 20, 0.6);
    background: rgba(26, 23, 20, 0.04);
    box-shadow: none;
}

.flow-btn-arrow {
    transition: transform 0.3s;
}

.flow-step-btn:hover .flow-btn-arrow {
    transform: translateX(4px);
}

/* ═══════════════════════════════════════════════════
   STEP 01 — Product photo
   ═══════════════════════════════════════════════════ */
.flow-step-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.flow-step-photo {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg, 22px);
    overflow: hidden;
    transform: rotateY(-4deg) rotateX(2deg);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.flow-step.in-view .flow-step-photo {
    transform: rotateY(0) rotateX(0);
}

.flow-step-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ═══════════════════════════════════════════════════
   STEP 02 — Sheet preview & download anim
   ═══════════════════════════════════════════════════ */
.flow-step-sheet-preview {
    margin-top: 24px;
}

.flow-sheet {
    background: #fffdf9;
    border: 1px solid rgba(26, 23, 20, 0.1);
    border-radius: 8px;
    padding: 20px;
    max-width: 300px;
    box-shadow: 0 20px 50px rgba(26, 23, 20, 0.07);
}

.flow-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(26, 23, 20, 0.08);
}

.flow-sheet-logo {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(26, 23, 20, 0.7);
}

.flow-sheet-badge {
    /* 9px は実機でほぼ判読できなかった。キャプションの下限として
       tokens.css に置いた 11px に合わせる。 */
    font-size: var(--text-2xs);
    letter-spacing: 0.1em;
    padding: 3px 8px;
    border: 1px solid var(--accent, #b08a4e);
    border-radius: 4px;
    color: var(--accent, #b08a4e);
    text-transform: uppercase;
}

.flow-sheet-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.flow-sheet-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(26, 23, 20, 0.5);
    padding: 4px 0;
}

.flow-sheet-row span:last-child {
    color: rgba(26, 23, 20, 0.8);
    font-weight: 500;
}

.flow-sheet-row--total {
    border-top: 1px solid rgba(26, 23, 20, 0.1);
    padding-top: 10px;
    margin-top: 4px;
}

.flow-sheet-row--total span:last-child {
    color: var(--accent, #b08a4e);
    font-weight: 600;
    font-size: 14px;
}

.flow-sheet-code {
    font-size: 10px;
    font-family: monospace;
    color: rgba(26, 23, 20, 0.3);
    letter-spacing: 0.08em;
    text-align: center;
}

/* Download animation */
.flow-download-anim {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.flow-dl-doc {
    opacity: 0.6;
    transform: translateY(0);
    animation: docFloat 3s ease-in-out infinite;
}

@keyframes docFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.flow-dl-arrow {
    animation: arrowBounce 2s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(6px); opacity: 1; }
}

/* ═══════════════════════════════════════════════════
   STEP 03 — Order visual & timeline
   ═══════════════════════════════════════════════════ */
.flow-order-visual {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.flow-order-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(26, 23, 20, 0.1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.flow-order-ring--outer {
    width: 200px;
    height: 200px;
    animation: ringPulse 3s ease-in-out infinite;
}

.flow-order-ring--mid {
    width: 140px;
    height: 140px;
    border-color: rgba(26, 23, 20, 0.18);
    animation: ringPulse 3s ease-in-out infinite 0.3s;
}

.flow-order-ring--inner {
    width: 80px;
    height: 80px;
    border-color: var(--accent, #b08a4e);
    background: rgba(184, 151, 63, 0.06);
    animation: ringPulse 3s ease-in-out infinite 0.6s;
}

.flow-order-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes ringPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
}

/* Timeline */
.flow-order-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 28px 0 32px;
    padding-left: 16px;
    border-left: 1px solid rgba(26, 23, 20, 0.12);
}

.flow-tl-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    position: relative;
}

.flow-tl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(26, 23, 20, 0.18);
    border: 1px solid rgba(26, 23, 20, 0.25);
    flex-shrink: 0;
    margin-top: 4px;
    margin-left: -20px;
}

.flow-tl-dot--gold {
    background: var(--accent, #b08a4e);
    border-color: var(--accent, #b08a4e);
    box-shadow: 0 0 8px rgba(184, 151, 63, 0.4);
}

.flow-tl-content strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(26, 23, 20, 0.88);
    margin-bottom: 2px;
}

.flow-tl-content span {
    font-size: 12px;
    color: rgba(26, 23, 20, 0.45);
}

/* ═══════════════════════════════════════════════════
   FINAL CTA
   ═══════════════════════════════════════════════════ */
.flow-final {
    position: relative;
    text-align: center;
    padding: 100px 24px;
    overflow: hidden;

    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.flow-final.in-view {
    opacity: 1;
    transform: translateY(0);
}

.flow-final-content {
    position: relative;
    z-index: 2;
}

.flow-final-title {
    font-family: 'Fraunces', 'Shippori Mincho', Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
    font-size: clamp(28px, 6vw, 52px);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 40px;
}

.flow-final-title em {
    font-style: normal;
    color: var(--accent, #b08a4e);
}

.flow-final-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.flow-final-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 17px 34px;
    background: #241f19;
    color: #f3e9dc;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
    width: 100%;
    max-width: 320px;
    justify-content: center;
}

.flow-final-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(26, 23, 20, 0.18);
}

.flow-final-btn--ghost {
    background: transparent;
    color: rgba(26, 23, 20, 0.72);
    border: 1px solid rgba(26, 23, 20, 0.22);
}

.flow-final-btn--ghost:hover {
    border-color: rgba(26, 23, 20, 0.5);
    color: #241f19;
    background: rgba(26, 23, 20, 0.04);
    box-shadow: none;
}

/* ═══════════════════════════════════════════════════
   DESKTOP (min-width: 768px)
   ═══════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .flow-hero {
        padding: 120px 60px;
    }

    .flow-hero-lead {
        font-size: 16px;
    }

    .flow-step {
        padding: 100px 60px;
    }

    .flow-step-inner {
        flex-direction: row;
        align-items: center;
        gap: 80px;
    }

    .flow-step-num {
        font-size: 56px;
    }

    .flow-step-inner--reverse {
        flex-direction: row-reverse;
    }

    .flow-step-visual,
    .flow-step-text {
        flex: 1;
    }

    .flow-step-visual {
        min-height: 400px;
    }

    .flow-step-device {
        max-width: 440px;
    }

    .flow-order-visual {
        width: 280px;
        height: 280px;
    }

    .flow-order-ring--outer { width: 280px; height: 280px; }
    .flow-order-ring--mid { width: 200px; height: 200px; }
    .flow-order-ring--inner { width: 120px; height: 120px; }

    .flow-final {
        padding: 140px var(--gutter);
    }

    .flow-final-actions {
        flex-direction: row;
        justify-content: center;
    }

    .flow-final-btn {
        width: auto;
    }
}

@media (min-width: 1024px) {
    .flow-step {
        padding: 120px var(--gutter);
    }

    .flow-step-inner {
        gap: 100px;
    }

    .flow-hero-orb--1 { width: 500px; height: 500px; }
    .flow-hero-orb--2 { width: 350px; height: 350px; }
}
