/* =============================================
   yome.quest — Design System
   Palette: Burnt Orange / Ink / Paper
   ============================================= */

/* CSS Custom Properties */
:root {
    --burnt-orange: #C45922;
    --ink-black: #1A1714;
    --paper-white: #F5EDE0;
    --terracotta-wash: #D4845A;
    --celadon-green: #8BA888;
    --burnt-umber-mid: #C4956A;
    --pale-amber: #E8D5B0;
    --pure-white: #FFFFFF;
    --deep-crimson: #3D0F0A;
    --charcoal: #2C2420;

    --border-thick: 4px solid var(--ink-black);
    --border-medium: 3px solid var(--ink-black);
    --border-thin: 1px solid var(--ink-black);

    --font-display: 'Bebas Neue', sans-serif;
    --font-expressive: 'Fraunces', serif;
    --font-body: 'Space Mono', monospace;
    --font-handwrite: 'Caveat', cursive;

    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --snap: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =============================================
   Reset & Base
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: auto;
}

body {
    background-color: var(--paper-white);
    color: var(--ink-black);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =============================================
   Ticker-Tape Navigation
   ============================================= */
.ticker-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 32px;
    background: var(--ink-black);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: ticker-scroll 22s linear infinite;
    gap: 0;
}

.ticker-item {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    color: var(--pure-white);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0 20px;
}

.ticker-sep {
    color: var(--burnt-orange);
    font-size: 9px;
    padding: 0 4px;
}

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

/* =============================================
   Bounce-Enter Animation State
   ============================================= */
.bounce-target {
    opacity: 0;
    transform: translateY(-40px) scale(0.96);
}

.bounce-target.is-visible {
    animation: bounce-enter 600ms var(--spring) forwards;
}

@keyframes bounce-enter {
    0%   { opacity: 0; transform: translateY(-40px) scale(0.96); }
    60%  { opacity: 1; transform: translateY(4px) scale(1.02); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* =============================================
   Scene 1: Hero Section
   ============================================= */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: var(--paper-white);
    overflow: hidden;
    padding-top: 32px; /* ticker height */
}

/* Procedural watercolor background */
.hero-watercolor {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 75% 35%, rgba(212, 132, 90, 0.28) 0%, transparent 65%),
        radial-gradient(ellipse 50% 45% at 85% 55%, rgba(196, 89, 34, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 40% 35% at 60% 20%, rgba(196, 149, 106, 0.22) 0%, transparent 50%),
        radial-gradient(ellipse 30% 40% at 90% 80%, rgba(139, 168, 136, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 80% 70% at 50% 50%, rgba(232, 213, 176, 0.15) 0%, transparent 70%);
    filter: blur(18px);
    z-index: 0;
}

/* Ink splash SVG */
.ink-splash-container {
    position: absolute;
    top: -5%;
    right: -5%;
    width: 55%;
    max-width: 600px;
    z-index: 1;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 800ms ease-out 200ms, transform 800ms ease-out 200ms;
}

.ink-splash-container.is-loaded {
    opacity: 1;
    transform: scale(1);
}

.ink-splash {
    width: 100%;
    height: auto;
    filter: blur(2px);
}

/* Kamon background texture */
.kamon-bg-texture {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.kamon-bg-svg {
    position: absolute;
    width: 160px;
    height: 160px;
    bottom: 15%;
    left: 8%;
    transform: rotate(-15deg);
}

/* Hero lockup — tilted 5 degrees counter-clockwise */
.hero-lockup {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%) rotate(-5deg);
    transform-origin: left center;
    z-index: 2;
    padding-left: 6vw;
}

.hero-lockup.is-visible {
    animation: hero-bounce-in 600ms var(--spring) forwards;
}

@keyframes hero-bounce-in {
    0%   { opacity: 0; transform: translateY(calc(-50% - 40px)) rotate(-5deg) scale(0.96); }
    60%  { opacity: 1; transform: translateY(calc(-50% + 4px)) rotate(-5deg) scale(1.02); }
    100% { opacity: 1; transform: translateY(-50%) rotate(-5deg) scale(1); }
}

.hero-word {
    font-family: var(--font-display);
    font-size: clamp(100px, 16vw, 180px);
    line-height: 0.85;
    letter-spacing: -0.02em;
    color: var(--pure-white);
    -webkit-text-stroke: 4px var(--ink-black);
    text-stroke: 4px var(--ink-black);
    text-shadow:
        6px 6px 0 var(--ink-black),
        -2px -2px 0 var(--charcoal);
    user-select: none;
}

.hero-sub {
    display: flex;
    align-items: baseline;
    gap: 24px;
    margin-top: 12px;
    padding-left: 4px;
}

.hero-kanji {
    font-family: var(--font-expressive);
    font-size: clamp(32px, 4vw, 52px);
    font-style: italic;
    font-variation-settings: "opsz" 72, "wght" 300, "SOFT" 0, "WONK" 1;
    color: var(--burnt-orange);
    letter-spacing: 0.02em;
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(11px, 1.2vw, 15px);
    color: var(--ink-black);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-left: 3px solid var(--burnt-orange);
    padding-left: 12px;
}

/* =============================================
   Stage Curtain Divider
   ============================================= */
.stage-divider {
    width: 100%;
    height: 6px;
    background: var(--ink-black);
    position: relative;
    z-index: 10;
}

/* =============================================
   Scene 2: Cultural Interrogation (60vh)
   ============================================= */
.interrogation-section {
    position: relative;
    min-height: 60vh;
    background: var(--paper-white);
    overflow: hidden;
}

.interrogation-wash {
    background:
        radial-gradient(ellipse 60% 70% at 20% 50%, rgba(139, 168, 136, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse 40% 50% at 5% 70%, rgba(196, 149, 106, 0.18) 0%, transparent 55%);
    filter: blur(22px);
}

.interrogation-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 40% 60%;
    min-height: 60vh;
}

.interrogation-col-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    border-right: var(--border-medium);
}

.kamon-main {
    width: min(280px, 80%);
    height: auto;
    filter: contrast(1.4) saturate(0.6) sepia(0.2);
}

.interrogation-col-right {
    padding: 48px 40px;
    display: flex;
    align-items: center;
}

.interrogation-border-box {
    border: var(--border-medium);
    padding: 36px 32px;
    position: relative;
    /* Deliberate bleed offset */
    margin-right: -20px;
    background: var(--paper-white);
}

.interrogation-header {
    font-family: var(--font-expressive);
    font-size: clamp(32px, 4.5vw, 56px);
    font-style: italic;
    font-variation-settings: "opsz" 144, "wght" 300, "SOFT" 0, "WONK" 1;
    color: var(--burnt-orange);
    line-height: 1.1;
    margin-bottom: 16px;
}

.strike-word {
    font-style: inherit;
    text-decoration: line-through;
    text-decoration-color: var(--burnt-orange);
    text-decoration-thickness: 3px;
}

.caveat-aside {
    font-family: var(--font-handwrite);
    font-size: clamp(18px, 2vw, 26px);
    color: var(--charcoal);
    font-weight: 400;
    margin-bottom: 20px;
    display: block;
}

.interrogation-body {
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: 0.02em;
    color: var(--ink-black);
    line-height: 1.7;
}

/* =============================================
   Torn Paper Separators
   ============================================= */
.torn-separator {
    width: 100%;
    height: 40px;
    background: var(--paper-white);
    position: relative;
    z-index: 5;
}

.torn-separator-1 {
    clip-path: polygon(0 0, 100% 0, 100% 60%, 96% 72%, 91% 58%, 86% 78%, 80% 62%, 74% 80%, 67% 65%, 61% 78%, 54% 60%, 47% 75%, 41% 58%, 35% 72%, 28% 55%, 22% 68%, 16% 52%, 10% 66%, 4% 50%, 0 60%);
    background: var(--ink-black);
}

.torn-separator-2 {
    clip-path: polygon(0 0, 100% 0, 100% 65%, 95% 80%, 89% 64%, 83% 78%, 77% 62%, 71% 76%, 65% 60%, 59% 74%, 53% 58%, 47% 72%, 41% 56%, 35% 70%, 28% 54%, 22% 68%, 16% 52%, 9% 66%, 3% 50%, 0 62%);
    background: var(--ink-black);
}

/* =============================================
   Scene 3: Claim Section (140vh)
   ============================================= */
.claim-section {
    position: relative;
    min-height: 140vh;
    background: var(--paper-white);
    overflow: hidden;
    padding: 60px 32px 80px;
}

.claim-wash {
    background:
        radial-gradient(ellipse 80% 60% at 50% 30%, rgba(212, 132, 90, 0.20) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 70%, rgba(196, 89, 34, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 40% 50% at 10% 60%, rgba(232, 213, 176, 0.18) 0%, transparent 50%);
    filter: blur(24px);
}

.claim-header {
    position: relative;
    z-index: 2;
    margin-bottom: 48px;
}

.claim-title {
    font-family: var(--font-display);
    font-size: clamp(64px, 10vw, 120px);
    color: var(--ink-black);
    letter-spacing: -0.02em;
    line-height: 0.9;
    transform: rotate(-3deg);
    display: inline-block;
    border-bottom: var(--border-thick);
    padding-bottom: 8px;
}

.claim-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto auto;
    gap: 0;
    max-width: 1200px;
}

.claim-panel {
    position: relative;
    border: var(--border-medium);
    padding: 36px 28px;
    margin: -1px; /* overlap borders */
    background: var(--paper-white);
    overflow: hidden;
    transition-delay: var(--delay, 0ms);
}

.claim-panel.is-visible {
    animation: bounce-enter 600ms var(--spring) forwards;
    animation-delay: var(--delay, 0ms);
}

.claim-panel-wide {
    grid-column: 1 / -1;
}

/* Panel watercolor backgrounds */
.panel-watercolor {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.panel-wash-1 {
    background: radial-gradient(ellipse 80% 80% at 30% 40%, rgba(212, 132, 90, 0.25) 0%, transparent 70%);
    filter: blur(16px);
}

.panel-wash-2 {
    background: radial-gradient(ellipse 70% 70% at 70% 60%, rgba(139, 168, 136, 0.22) 0%, transparent 65%);
    filter: blur(14px);
}

.panel-wash-3 {
    background: radial-gradient(ellipse 80% 70% at 50% 30%, rgba(196, 149, 106, 0.20) 0%, transparent 60%);
    filter: blur(18px);
}

.panel-wash-4 {
    background: radial-gradient(ellipse 65% 75% at 40% 60%, rgba(196, 89, 34, 0.18) 0%, transparent 60%);
    filter: blur(16px);
}

.panel-wash-5 {
    background: radial-gradient(ellipse 60% 80% at 80% 40%, rgba(232, 213, 176, 0.25) 0%, transparent 65%);
    filter: blur(20px);
}

.panel-content {
    position: relative;
    z-index: 1;
}

.panel-stamp {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 72px;
    height: 72px;
    opacity: 0.85;
    transform: rotate(12deg);
}

.panel-stamp-real {
    top: auto;
    bottom: 12px;
    right: 12px;
    transform: rotate(-8deg);
}

.panel-header {
    font-family: var(--font-display);
    font-size: clamp(28px, 3vw, 42px);
    color: var(--ink-black);
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    line-height: 1;
}

.panel-text {
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.02em;
    color: var(--ink-black);
    line-height: 1.75;
}

.panel-aside {
    font-family: var(--font-handwrite);
    font-size: 20px;
    color: var(--charcoal);
    margin-top: 16px;
    display: block;
}

/* =============================================
   Scene 4: Confrontation Zone (100vh)
   ============================================= */
.confrontation-section {
    position: relative;
    min-height: 100vh;
    background: var(--ink-black);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
}

.confrontation-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 6vw;
    padding-top: 60px;
    padding-bottom: 60px;
}

.confrontation-stamp {
    position: absolute;
    top: 40px;
    right: 8vw;
    width: 120px;
    height: 120px;
    transform: rotate(-15deg);
    opacity: 0.75;
}

.confrontation-text-block {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.confrontation-word {
    line-height: 0.85;
}

.confront-big {
    font-family: var(--font-display);
    font-size: clamp(72px, 14vw, 120px);
    color: var(--pure-white);
    letter-spacing: -0.02em;
    display: inline-block;
}

.strike-confront {
    text-decoration: line-through;
    text-decoration-color: var(--burnt-orange);
    text-decoration-thickness: 5px;
    color: var(--burnt-orange);
}

.confrontation-sub {
    margin-top: 40px;
    max-width: 560px;
    border-left: 4px solid var(--burnt-orange);
    padding-left: 24px;
}

.confront-body {
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: 0.04em;
    color: rgba(245, 237, 224, 0.75);
    line-height: 1.8;
}

/* =============================================
   Scene 5: Resolution / Footer (60vh)
   ============================================= */
.resolution-section {
    position: relative;
    min-height: 60vh;
    background: var(--paper-white);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 48px;
    border-top: var(--border-thick);
}

.resolution-watercolor {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 90% 60% at 50% 40%, rgba(196, 149, 106, 0.20) 0%, transparent 65%),
        radial-gradient(ellipse 50% 50% at 20% 80%, rgba(139, 168, 136, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 40% 40% at 80% 30%, rgba(212, 132, 90, 0.16) 0%, transparent 50%);
    filter: blur(20px);
}

.kamon-band {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 1;
    overflow: hidden;
}

.kamon-band-svg {
    width: 100%;
    height: 80px;
}

.resolution-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.resolution-closing {
    font-family: var(--font-expressive);
    font-size: clamp(24px, 3vw, 40px);
    font-style: italic;
    font-variation-settings: "opsz" 72, "wght" 300, "SOFT" 0, "WONK" 1;
    color: var(--burnt-orange);
    letter-spacing: 0.01em;
    max-width: 700px;
    line-height: 1.2;
}

.resolution-links {
    display: flex;
    align-items: center;
    gap: 16px;
    border: var(--border-medium);
    padding: 10px 24px;
}

.resolution-link {
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: 0.08em;
    color: var(--ink-black);
    transition: color 200ms ease;
}

.resolution-link:hover {
    color: var(--burnt-orange);
}

.resolution-sep {
    color: var(--burnt-orange);
    font-size: 9px;
}

.resolution-meta {
    display: flex;
    gap: 40px;
}

.resolution-mono {
    font-family: var(--font-body);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--charcoal);
    text-transform: uppercase;
}

/* =============================================
   Shared Utilities
   ============================================= */
.section-watercolor {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
    .interrogation-grid {
        grid-template-columns: 1fr;
    }

    .interrogation-col-left {
        border-right: none;
        border-bottom: var(--border-medium);
        padding: 32px 24px;
        min-height: 240px;
    }

    .interrogation-col-right {
        padding: 32px 24px;
    }

    .interrogation-border-box {
        margin-right: 0;
    }

    .claim-grid {
        grid-template-columns: 1fr;
    }

    .claim-panel-wide {
        grid-column: 1;
    }

    .hero-lockup {
        padding-left: 4vw;
        transform: translateY(-50%) rotate(-4deg);
    }

    .hero-word {
        font-size: clamp(72px, 20vw, 120px);
    }

    .confrontation-inner {
        padding-left: 4vw;
    }

    .confront-big {
        font-size: clamp(52px, 16vw, 90px);
    }

    .resolution-meta {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
}
