/* ═══════════════════════════════════════════════════════════
   ryvako.site — Layout 70: Infinite Scroll Story
   Style: Premium Editorial | Palette: Muted Luxury
   Typography: Mixed Editorial (Shippori Mincho + Noto Sans JP)
   ═══════════════════════════════════════════════════════════ */

:root {
    --ink: #141820;
    --ink-soft: #2a3040;
    --parchment: #f3ede3;
    --parchment-deep: #e8dfd0;
    --gold: #b8956a;
    --gold-light: #d4b896;
    --sage: #7a8b7e;
    --mist: #c5cdd4;
    --white: #faf8f5;
    --shadow: rgba(20, 24, 32, 0.12);
    --shadow-deep: rgba(20, 24, 32, 0.28);

    --font-serif: 'Shippori Mincho', 'Cormorant Garamond', serif;
    --font-sans: 'Noto Sans JP', sans-serif;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;

    --header-h: 68px;
    --header-edition: 34px;
    --safe-top: env(safe-area-inset-top, 0px);
    --header-total: calc(var(--header-h) + var(--header-edition) + var(--safe-top));
    --header-total-compact: calc(var(--header-h) + var(--safe-top));
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    --radius-sm: 4px;
    --radius-md: 12px;
    --radius-lg: 24px;
}

[data-theme="dark"] {
    --ink: #e8e4dc;
    --ink-soft: #b8b4ac;
    --parchment: #0f1218;
    --parchment-deep: #1a1f2a;
    --white: #141820;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-deep: rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    font-weight: 300;
    color: var(--ink);
    background: var(--parchment);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ─── Typography ─── */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.02em;
}

h1 { font-size: clamp(2.8rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

em, .accent { font-style: italic; color: var(--gold); }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
}

.btn--gold {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}
.btn--gold:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow);
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--ink);
}
.btn--ghost:hover {
    background: var(--ink);
    color: var(--parchment);
}

.btn--large { padding: 1.1rem 2.4rem; font-size: 0.9rem; }

/* ─── Masthead (Editorial Dual-Rail) ─── */
.masthead {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding-top: var(--safe-top);
    transition: box-shadow 0.4s var(--ease-out);
}

.masthead.is-scrolled {
    box-shadow: 0 8px 32px var(--shadow);
}

.masthead__edition {
    height: var(--header-edition);
    background: var(--ink);
    color: var(--parchment);
    overflow: hidden;
    transition: height 0.4s var(--ease-out), opacity 0.35s;
}

.masthead.is-scrolled .masthead__edition {
    height: 0;
    opacity: 0;
}

.masthead__edition-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--space-md);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.masthead__vol {
    opacity: 0.55;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.masthead__live {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    color: var(--gold-light);
    font-family: var(--font-serif);
    letter-spacing: 0.12em;
}

.masthead__live-dot {
    width: 5px; height: 5px;
    background: var(--gold);
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.masthead__frame {
    background: rgba(243, 237, 227, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(20, 24, 32, 0.08);
}

[data-theme="dark"] .masthead__frame {
    background: rgba(15, 18, 24, 0.97);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.masthead__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-md);
    max-width: 1440px;
    height: var(--header-h);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Logo */
.masthead__logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    transition: opacity 0.3s;
}

.masthead__logo:hover { opacity: 0.75; }

.masthead__logo-mark {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--gold);
    border: 1px solid var(--gold);
    transform: rotate(-4deg);
    transition: transform 0.4s var(--ease-out);
}

.masthead__logo:hover .masthead__logo-mark { transform: rotate(0deg); }

.masthead__logo-type {
    display: flex;
    align-items: baseline;
    line-height: 1;
}

.masthead__logo-name {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.masthead__logo-tld {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    color: var(--sage);
    letter-spacing: 0.04em;
}

/* Nav */
.masthead__nav {
    display: flex;
    justify-content: center;
    min-width: 0;
}

.masthead__nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.masthead__nav-link {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 100px;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    transition: background 0.3s, color 0.3s;
    white-space: nowrap;
}

.masthead__nav-index {
    font-family: var(--font-serif);
    font-size: 0.65rem;
    color: var(--gold);
    opacity: 0.7;
    transition: opacity 0.3s;
}

.masthead__nav-link:hover,
.masthead__nav-link.is-active {
    background: var(--ink);
    color: var(--parchment);
}

.masthead__nav-link:hover .masthead__nav-index,
.masthead__nav-link.is-active .masthead__nav-index {
    opacity: 1;
    color: var(--gold-light);
}

/* Tools */
.masthead__tools {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.masthead__tool-cluster {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.2rem;
    border: 1px solid var(--parchment-deep);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .masthead__tool-cluster {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.masthead__tool {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border: none;
    background: none;
    color: var(--ink);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: background 0.25s, color 0.25s;
}

.masthead__tool:hover {
    background: var(--ink);
    color: var(--parchment);
}

.masthead__cart-badge {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 15px; height: 15px;
    padding: 0 3px;
    font-size: 0.58rem;
    font-weight: 700;
    background: var(--gold);
    color: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.masthead__cta {
    padding: 0.55rem 1.15rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    background: var(--gold);
    color: var(--white);
    border-radius: 100px;
    transition: background 0.3s, transform 0.3s;
    white-space: nowrap;
}

.masthead__cta:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
}

.masthead__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    padding: 8px;
    background: var(--ink);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.masthead__burger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--parchment);
    transition: transform 0.35s var(--ease-out), opacity 0.35s;
    transform-origin: center;
}

.masthead__burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.masthead__burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.masthead__burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile drawer */
.masthead__drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
}

.masthead__drawer.is-open { pointer-events: auto; }

.masthead__drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 24, 32, 0.55);
    opacity: 0;
    transition: opacity 0.4s;
}

.masthead__drawer.is-open .masthead__drawer-backdrop { opacity: 1; }

.masthead__drawer-panel {
    position: absolute;
    top: 0; right: 0;
    width: min(360px, 88vw);
    height: 100%;
    background: var(--parchment);
    padding: calc(var(--header-total-compact) + var(--space-md)) var(--space-md) var(--space-md);
    transform: translateX(105%);
    transition: transform 0.45s var(--ease-out);
    overflow-y: auto;
    box-shadow: -12px 0 48px var(--shadow-deep);
}

[data-theme="dark"] .masthead__drawer-panel {
    background: var(--parchment-deep);
}

.masthead__drawer.is-open .masthead__drawer-panel {
    transform: translateX(0);
}

.masthead__drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--parchment-deep);
}

.masthead__drawer-label {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--sage);
}

.masthead__drawer-close {
    width: 36px; height: 36px;
    border: 1px solid var(--parchment-deep);
    background: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
    border-radius: 50%;
}

.masthead__drawer-list { display: flex; flex-direction: column; gap: 0.25rem; }

.masthead__drawer-list a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--parchment-deep);
    transition: padding-left 0.3s var(--ease-out);
}

.masthead__drawer-list a:hover { padding-left: 1rem; }

.masthead__drawer-num {
    font-family: var(--font-serif);
    font-size: 0.75rem;
    color: var(--gold);
    min-width: 1.5rem;
}

.masthead__drawer-text {
    font-family: var(--font-serif);
    font-size: 1.15rem;
}

.masthead__drawer-cta {
    display: block;
    margin-top: var(--space-md);
    padding: 1rem;
    text-align: center;
    background: var(--ink);
    color: var(--parchment);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    border-radius: var(--radius-sm);
    transition: background 0.3s;
}

.masthead__drawer-cta:hover { background: var(--gold); }

body.is-menu-open { overflow: hidden; }

/* Compact header offset when scrolled */
.masthead.is-scrolled ~ .site-main,
.masthead.is-scrolled + .site-main {
    /* offset handled via --header-total in sections */
}

@media (max-width: 1100px) {
    .masthead__nav { display: none; }
    .masthead__cta { display: none; }
    .masthead__burger { display: flex; }
}

@media (max-width: 480px) {
    .masthead__logo-tld { display: none; }
    .masthead__edition-inner { font-size: 0.55rem; }
    .masthead__vol { max-width: 55%; }
}

/* ─── Search Overlay ─── */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 24, 32, 0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.search-overlay.is-open { opacity: 1; visibility: visible; }

.search-overlay__inner { width: min(560px, 90vw); position: relative; }

.search-overlay__close {
    position: absolute;
    top: -3rem; right: 0;
    background: none; border: none;
    color: var(--parchment);
    font-size: 2rem;
    cursor: pointer;
}

.search-overlay__form {
    display: flex;
    border-bottom: 1px solid var(--gold);
}

.search-overlay__form input {
    flex: 1;
    background: none;
    border: none;
    color: var(--parchment);
    font-size: 1.4rem;
    font-family: var(--font-serif);
    padding: 1rem 0;
    outline: none;
}

.search-overlay__form input::placeholder { color: var(--mist); }

.search-overlay__form button {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    padding: 0 1rem;
}

/* ─── Infinite Scroll Story — Home ─── */
.page-home .site-main {
    scroll-snap-type: y proximity;
}

.story-segment {
    position: relative;
    scroll-snap-align: start;
}

.story-segment__progress {
    position: fixed;
    top: var(--header-total);
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--parchment-deep);
    z-index: 900;
}

.story-segment__progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--sage));
    transition: width 0.15s linear;
}

/* §1 Prologue */
.story-segment--prologue {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-total) + var(--space-lg)) var(--space-md) var(--space-lg);
}

.prologue__canvas {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    align-items: center;
}

.prologue__vertical-text {
    writing-mode: vertical-rl;
    display: flex;
    gap: 1.5rem;
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--gold);
    opacity: 0.4;
    letter-spacing: 0.3em;
}

.prologue__chapter {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--sage);
    margin-bottom: var(--space-sm);
}

.prologue__lead {
    max-width: 420px;
    margin: var(--space-md) 0;
    font-size: 0.95rem;
    color: var(--ink-soft);
}

.prologue__scroll-hint {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--gold);
    margin-top: var(--space-md);
    animation: floatHint 2.5s ease-in-out infinite;
}

@keyframes floatHint {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

.prologue__figure {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: 0 32px 64px var(--shadow-deep);
}

.prologue__figure::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(184, 149, 106, 0.15));
    z-index: 1;
}

.prologue__img {
    width: 100%;
    height: 70vh;
    max-height: 640px;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 8s linear;
}

.prologue__figure:hover .prologue__img { transform: scale(1.08); }

.prologue__caption {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--white);
    z-index: 2;
}

/* §2 Manifesto Ribbon */
.story-segment--ribbon {
    padding: var(--space-xl) 0;
    background: var(--ink);
    color: var(--parchment);
    overflow: hidden;
}

.manifesto-ribbon__track {
    overflow: hidden;
    margin-bottom: var(--space-lg);
}

.manifesto-ribbon__track p {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 3rem);
    white-space: nowrap;
    animation: marquee 40s linear infinite;
    opacity: 0.25;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.manifesto-ribbon__statement {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    text-align: center;
}

.manifesto-ribbon__statement h2 {
    margin-bottom: var(--space-md);
    color: var(--gold-light);
}

/* §3 Pinned Explorer */
.story-segment--pinned {
    position: relative;
}

.pinned-explorer__sticky {
    position: sticky;
    top: var(--header-total);
    min-height: calc(100vh - var(--header-total));
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    padding: var(--space-lg) var(--space-md);
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

.pinned-explorer__scroll-spacer { height: 50vh; }

.japan-map {
    width: 100%;
    max-width: 400px;
    color: var(--sage);
}

.map-pin {
    fill: var(--gold);
    cursor: pointer;
    transition: r 0.3s var(--ease-spring), fill 0.3s;
    opacity: 0.6;
}

.map-pin:hover,
.map-pin.is-active {
    r: 10;
    opacity: 1;
    fill: var(--gold-light);
}

.pinned-explorer__eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--sage);
    margin-bottom: var(--space-sm);
}

.pinned-explorer__title {
    margin-bottom: var(--space-sm);
}

.pinned-explorer__highlights {
    margin: var(--space-md) 0;
}

.pinned-explorer__highlights li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--parchment-deep);
    font-size: 0.9rem;
}

.pinned-explorer__highlights li::before {
    content: '—';
    color: var(--gold);
    margin-right: 0.5rem;
}

/* §4 Diagonal Portal */
.story-segment--diagonal {
    padding: var(--space-xl) var(--space-md);
    position: relative;
    overflow: hidden;
}

.diagonal-portal__cut {
    position: absolute;
    top: 0; left: -10%;
    width: 120%;
    height: 120px;
    background: var(--parchment);
    transform: skewY(-3deg);
    transform-origin: top left;
    z-index: 1;
}

.diagonal-portal__inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.diagonal-portal__label {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--gold);
}

.season-switcher {
    display: flex;
    gap: 0.5rem;
    margin: var(--space-md) 0 var(--space-lg);
}

.season-switcher__btn {
    padding: 0.6rem 1.4rem;
    background: transparent;
    border: 1px solid var(--parchment-deep);
    font-family: var(--font-serif);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.35s var(--ease-out);
    color: var(--ink);
}

.season-switcher__btn.is-active,
.season-switcher__btn:hover {
    background: var(--ink);
    color: var(--parchment);
    border-color: var(--ink);
}

.season-panels { position: relative; min-height: 420px; }

.season-panel {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-md);
    align-items: center;
    opacity: 0;
    position: absolute;
    inset: 0;
    transform: translateX(30px);
    transition: opacity 0.5s, transform 0.5s var(--ease-out);
    pointer-events: none;
}

.season-panel.is-active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    pointer-events: auto;
}

.season-panel__img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: var(--radius-md);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.season-panel__text h3 {
    margin-bottom: var(--space-sm);
    color: var(--gold);
}

/* §5 Overlap Chapter */
.story-segment--overlap {
    padding: var(--space-xl) var(--space-md);
    min-height: 90vh;
}

.overlap-chapter {
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
    min-height: 600px;
}

.overlap-chapter__layer--back {
    position: absolute;
    top: 10%; right: 0;
    width: 55%;
    z-index: 1;
}

.overlap-chapter__bg {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    filter: brightness(0.85);
}

.overlap-chapter__layer--float {
    position: absolute;
    top: 30%; left: 5%;
    z-index: 3;
    max-width: 380px;
}

.overlap-chapter__quote {
    background: rgba(243, 237, 227, 0.95);
    padding: var(--space-md);
    border-left: 3px solid var(--gold);
    backdrop-filter: blur(8px);
    box-shadow: 0 16px 48px var(--shadow);
}

.overlap-chapter__quote p {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: var(--space-sm);
}

.overlap-chapter__quote cite {
    font-size: 0.75rem;
    color: var(--sage);
    font-style: normal;
}

.overlap-chapter__layer--front {
    position: relative;
    z-index: 2;
    display: flex;
    gap: var(--space-md);
    align-items: flex-end;
    padding-top: 120px;
}

.overlap-chapter__card {
    background: var(--ink);
    color: var(--parchment);
    padding: var(--space-lg);
    max-width: 360px;
    border-radius: var(--radius-md);
    box-shadow: 0 24px 56px var(--shadow-deep);
}

.overlap-chapter__num {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--gold);
}

.overlap-chapter__card h2 { margin: var(--space-sm) 0; }

.overlap-chapter__card p {
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
    opacity: 0.85;
}

.overlap-chapter__thumb {
    width: 220px;
    flex-shrink: 0;
}

.overlap-chapter__thumb-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: 0 16px 40px var(--shadow);
    transform: rotate(3deg);
    transition: transform 0.5s var(--ease-out);
}

.overlap-chapter__thumb:hover .overlap-chapter__thumb-img {
    transform: rotate(0deg) scale(1.03);
}

/* §6 Horizontal Zone */
.story-segment--horizontal {
    padding: var(--space-xl) 0 var(--space-lg);
    background: var(--parchment-deep);
}

.horizontal-zone__header {
    padding: 0 var(--space-md) var(--space-md);
    max-width: 1400px;
    margin: 0 auto;
}

.horizontal-zone__header span {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--sage);
}

.horizontal-zone {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: var(--space-md) var(--space-md) var(--space-lg);
    scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
}

.horizontal-zone::-webkit-scrollbar { height: 4px; }
.horizontal-zone::-webkit-scrollbar-thumb { background: var(--gold); }

.gem-card {
    flex: 0 0 min(340px, 80vw);
    scroll-snap-align: start;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}

.gem-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px var(--shadow);
}

.gem-card__img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.gem-card__body { padding: var(--space-md); }
.gem-card__body h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.gem-card__body p { font-size: 0.85rem; color: var(--ink-soft); }

/* §7 Fragments */
.story-segment--fragments {
    padding: var(--space-xl) var(--space-md);
}

.fragments-rail__title {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.fragments-rail__title span { color: var(--gold); }

.fragments-rail__list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
}

.fragment-item {
    padding: var(--space-md);
    border-top: 2px solid var(--gold);
    transition: background 0.3s;
}

.fragment-item:hover { background: var(--parchment-deep); }

.fragment-item time {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--sage);
}

.fragment-item h3 {
    margin: var(--space-sm) 0;
    font-size: 1rem;
}

.fragment-item p { font-size: 0.85rem; color: var(--ink-soft); }

/* §8 Path Selector */
.story-segment--paths {
    padding: var(--space-xl) var(--space-md);
    background: var(--ink);
    color: var(--parchment);
}

.path-selector__header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.path-selector__header span {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--gold);
}

.path-landscape {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    max-width: 1100px;
    margin: 0 auto var(--space-lg);
}

.path-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    padding: var(--space-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
    color: inherit;
    font-family: inherit;
}

.path-card:hover,
.path-card.is-featured,
.path-card[aria-pressed="true"] {
    background: var(--gold);
    color: var(--ink);
    border-color: var(--gold);
    transform: translateY(-4px);
}

.path-card__icon {
    display: block;
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    opacity: 0.6;
}

.path-card__detail {
    display: block;
    font-size: 0.7rem;
    margin-top: var(--space-sm);
    opacity: 0;
    transition: opacity 0.3s;
}

.path-card:hover .path-card__detail { opacity: 1; }

.path-detail-panel {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.15);
}

.path-detail-panel h3 { color: var(--gold-light); margin-bottom: var(--space-sm); }

/* §9 Voices */
.story-segment--voices {
    padding: var(--space-xl) var(--space-md);
    overflow: hidden;
}

.voices-strip { max-width: 900px; margin: 0 auto; position: relative; }

.voices-strip__track {
    display: flex;
    transition: transform 0.6s var(--ease-out);
}

.voice-whisper {
    flex: 0 0 100%;
    text-align: center;
    padding: var(--space-lg);
}

.voice-whisper p {
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-style: italic;
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.voice-whisper cite {
    font-size: 0.8rem;
    color: var(--sage);
    font-style: normal;
}

.voices-strip__controls {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.voices-strip__controls button {
    width: 44px; height: 44px;
    border: 1px solid var(--parchment-deep);
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    color: var(--ink);
}

.voices-strip__controls button:hover {
    background: var(--ink);
    color: var(--parchment);
    border-color: var(--ink);
}

/* §10 Departure Gate */
.story-segment--departure {
    padding: var(--space-xl) var(--space-md);
    background: var(--parchment-deep);
}

.departure-gate {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.departure-gate__img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
}

.departure-gate__eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--gold);
}

.departure-gate__content h2 { margin: var(--space-sm) 0 var(--space-md); }

.departure-gate__actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin: var(--space-md) 0;
}

.departure-gate__trust {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.departure-gate__trust li {
    font-size: 0.75rem;
    color: var(--sage);
}

.departure-gate__trust li::before {
    content: '✓ ';
    color: var(--gold);
}

/* ─── Reveal Animations ─── */
.reveal-up,
.reveal-fade {
    opacity: 0;
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-up { transform: translateY(40px); }
.reveal-fade { transform: scale(0.98); }

.reveal-up.is-visible,
.reveal-fade.is-visible {
    opacity: 1;
    transform: none;
}

.fragment-item.reveal-up { transition-delay: calc(var(--delay, 0) * 0.12s); }

/* ─── Inner Pages ─── */
.page-hero {
    padding: calc(var(--header-total) + var(--space-xl)) var(--space-md) var(--space-lg);
    text-align: center;
    position: relative;
}

.page-hero--compact { padding-bottom: var(--space-md); }

.page-hero__eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: var(--space-sm);
}

.page-hero__lead {
    max-width: 560px;
    margin: var(--space-md) auto 0;
    color: var(--ink-soft);
}

.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md) var(--space-xl);
}

.page-content--wide { max-width: 1200px; }

/* About */
.about-story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: var(--space-xl);
}

.about-story__img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.about-timeline {
    position: relative;
    padding-left: var(--space-lg);
    margin: var(--space-xl) 0;
}

.about-timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(var(--gold), var(--sage));
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-lg);
    padding-left: var(--space-md);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--space-lg) - 4px);
    top: 6px;
    width: 9px; height: 9px;
    background: var(--gold);
    border-radius: 50%;
}

.timeline-item time {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--gold);
}

.timeline-item h3 { margin: 0.5rem 0; }

.mission-block {
    background: var(--ink);
    color: var(--parchment);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    text-align: center;
    margin: var(--space-xl) 0;
}

.mission-block h2 { color: var(--gold-light); margin-bottom: var(--space-md); }

/* Services / Shop */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding: var(--space-md);
    max-width: 1200px;
    margin: 0 auto var(--space-md);
    border-bottom: 1px solid var(--parchment-deep);
}

.filter-tabs {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.filter-tabs button {
    padding: 0.5rem 1.2rem;
    background: none;
    border: 1px solid transparent;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--ink);
    font-family: var(--font-sans);
}

.filter-tabs button.is-active,
.filter-tabs button:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
    padding: var(--space-md);
    max-width: 1200px;
    margin: 0 auto var(--space-xl);
}

.tour-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
    position: relative;
}

.tour-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px var(--shadow);
}

.tour-card__img-wrap { position: relative; overflow: hidden; }

.tour-card__img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.tour-card:hover .tour-card__img { transform: scale(1.06); }

.tour-card__wishlist {
    position: absolute;
    top: 12px; right: 12px;
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.tour-card__wishlist.is-active { color: var(--gold); }
.tour-card__wishlist:hover { background: var(--white); }

.tour-card__body { padding: var(--space-md); }

.tour-card__meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--sage);
    margin-bottom: 0.5rem;
}

.tour-card__title { margin-bottom: 0.5rem; font-size: 1.1rem; }
.tour-card__desc { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: var(--space-md); }

.tour-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-card__price {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--gold);
}

.tour-card__add {
    padding: 0.5rem 1rem;
    background: var(--ink);
    color: var(--parchment);
    border: none;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.3s;
}

.tour-card__add:hover { background: var(--gold); }

.tour-card.is-hidden { display: none; }

/* FAQ */
.faq-layout {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-md) var(--space-xl);
}

.faq-item {
    border-bottom: 1px solid var(--parchment-deep);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: var(--ink);
    transition: color 0.3s;
}

.faq-question:hover { color: var(--gold); }

.faq-question__icon {
    font-size: 1.4rem;
    transition: transform 0.35s var(--ease-out);
    flex-shrink: 0;
    margin-left: var(--space-sm);
}

.faq-item.is-open .faq-question__icon { transform: rotate(45deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s var(--ease-out), padding 0.45s;
}

.faq-item.is-open .faq-answer {
    max-height: 400px;
    padding-bottom: var(--space-md);
}

.faq-answer p { font-size: 0.9rem; color: var(--ink-soft); }

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-lg);
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-md) var(--space-xl);
}

.contact-info__block {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--parchment-deep);
}

.contact-info__block h3 {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.contact-form label {
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    padding: 0.85rem 1rem;
    border: 1px solid var(--parchment-deep);
    background: var(--white);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--ink);
    border-radius: var(--radius-sm);
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--gold);
}

.contact-form textarea { min-height: 140px; resize: vertical; }

.contact-map {
    max-width: 1100px;
    margin: 0 auto var(--space-xl);
    padding: 0 var(--space-md);
}

.contact-map__frame {
    width: 100%;
    height: 360px;
    border: none;
    border-radius: var(--radius-md);
    filter: grayscale(30%);
}

/* Cart */
.cart-layout {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-md) var(--space-xl);
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-lg);
}

.cart-items { display: flex; flex-direction: column; gap: var(--space-md); }

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--white);
    border-radius: var(--radius-md);
    align-items: center;
}

.cart-item__img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.cart-item__title { font-family: var(--font-serif); margin-bottom: 0.25rem; }
.cart-item__meta { font-size: 0.8rem; color: var(--sage); }

.qty-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.qty-control button {
    width: 28px; height: 28px;
    border: 1px solid var(--parchment-deep);
    background: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.qty-control button:hover { background: var(--ink); color: var(--parchment); }

.cart-item__price {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    text-align: right;
}

.cart-item__remove {
    background: none;
    border: none;
    color: var(--sage);
    cursor: pointer;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    display: block;
    margin-left: auto;
}

.cart-item__remove:hover { color: #c44; }

.cart-summary {
    background: var(--ink);
    color: var(--parchment);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    height: fit-content;
    position: sticky;
    top: calc(var(--header-total) + var(--space-md));
}

.cart-summary h2 {
    font-size: 1.2rem;
    margin-bottom: var(--space-md);
    color: var(--gold-light);
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.cart-summary__row--total {
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    font-family: var(--font-serif);
    font-size: 1.2rem;
}

.coupon-form {
    display: flex;
    gap: 0.5rem;
    margin: var(--space-md) 0;
}

.coupon-form input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: var(--parchment);
    font-size: 0.85rem;
}

.coupon-form button {
    padding: 0.6rem 1rem;
    background: var(--gold);
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 0.8rem;
}

.cart-empty {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
}

.cart-empty.is-hidden { display: none; }

.cart-empty p { margin-bottom: var(--space-md); color: var(--ink-soft); }

/* Policy Pages */
.policy-content {
    max-width: 780px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-md) var(--space-xl);
}

.policy-content h2 {
    font-size: 1.4rem;
    margin: var(--space-lg) 0 var(--space-sm);
    color: var(--ink);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--parchment-deep);
}

.policy-content h3 {
    font-size: 1.05rem;
    margin: var(--space-md) 0 var(--space-xs);
    color: var(--gold);
}

.policy-content p {
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.policy-content ul {
    margin: var(--space-sm) 0 var(--space-md) 1.5rem;
    list-style: disc;
}

.policy-content ul li {
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin-bottom: 0.4rem;
}

.policy-content .policy-updated {
    font-size: 0.8rem;
    color: var(--sage);
    margin-bottom: var(--space-lg);
}

/* Footer */
.site-footer {
    position: relative;
    background: var(--ink);
    color: var(--parchment);
    padding: var(--space-xl) var(--space-md) var(--space-md);
}

.site-footer__wave {
    position: absolute;
    top: -60px; left: 0; right: 0;
    height: 60px;
    background: var(--ink);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto var(--space-lg);
}

.site-footer__logo {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    display: block;
    margin-bottom: var(--space-sm);
}

.site-footer__tagline { font-size: 0.85rem; opacity: 0.7; margin-bottom: var(--space-md); }
.site-footer__address, .site-footer__phone { font-size: 0.8rem; opacity: 0.6; display: block; margin-bottom: 0.25rem; }

.site-footer__heading {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--gold);
    margin-bottom: var(--space-md);
    font-family: var(--font-sans);
    font-weight: 500;
}

.site-footer__list li { margin-bottom: 0.6rem; }
.site-footer__list a { font-size: 0.85rem; opacity: 0.75; transition: opacity 0.3s; }
.site-footer__list a:hover { opacity: 1; color: var(--gold-light); }

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: var(--space-sm);
}

.newsletter-form input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: var(--parchment);
    font-size: 0.85rem;
}

.newsletter-form button {
    padding: 0.6rem 1rem;
    background: var(--gold);
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 0.75rem;
    white-space: nowrap;
}

.site-footer__bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.site-footer__bottom p { font-size: 0.75rem; opacity: 0.5; }

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 44px; height: 44px;
    background: var(--gold);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.35s var(--ease-out);
    z-index: 800;
    box-shadow: 0 4px 16px var(--shadow);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.back-to-top:hover { background: var(--gold-light); transform: translateY(-3px); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .prologue__canvas { grid-template-columns: 1fr; }
    .prologue__vertical-text { display: none; }
    .pinned-explorer__sticky { grid-template-columns: 1fr; }
    .season-panel { grid-template-columns: 1fr; }
    .overlap-chapter__layer--back { position: relative; width: 100%; top: 0; }
    .overlap-chapter__layer--float { position: relative; top: 0; left: 0; max-width: 100%; margin: var(--space-md) 0; }
    .overlap-chapter__layer--front { flex-direction: column; padding-top: 0; }
    .fragments-rail__list { grid-template-columns: repeat(2, 1fr); }
    .path-landscape { grid-template-columns: repeat(2, 1fr); }
    .departure-gate { grid-template-columns: 1fr; }
    .about-story { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .cart-layout { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .masthead__inner { padding: 0 var(--space-sm); }
    .fragments-rail__list { grid-template-columns: 1fr; }
    .path-landscape { grid-template-columns: 1fr; }
    .cart-item { grid-template-columns: 80px 1fr; }
    .cart-item__price { grid-column: 2; text-align: left; }
    .site-footer__grid { grid-template-columns: 1fr; }
}
