/* ============================================
   daitoua.quest — Styles
   Deep burgundy palette, broken-grid layout
   Zen austerity + war-era gravitas
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --color-deepest: #1A0808;
    --color-deep: #2D0A0A;
    --color-dark: #4A0E0E;
    --color-accent: #B85C38;
    --color-accent-dark: #8B1A1A;
    --color-warm-gray: #8C7B6B;
    --color-parchment: #D4C4B0;
    --color-light: #F2E6D9;

    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Noto Serif JP', serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-grotesk: 'Space Grotesk', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--color-deepest);
    color: var(--color-light);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.8;
    overflow-x: hidden;
}

/* --- Ink Drop Overlay --- */
.ink-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: var(--color-deepest);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.8s ease-out;
}

.ink-overlay.hidden {
    opacity: 0;
}

.ink-circle {
    width: 20px;
    height: 20px;
    background: var(--color-accent);
    border-radius: 50%;
    animation: inkExpand 1.5s ease-out forwards;
}

@keyframes inkExpand {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    60% {
        transform: scale(80);
        opacity: 0.6;
    }
    100% {
        transform: scale(150);
        opacity: 0;
    }
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 120px;
    background: rgba(140, 123, 107, 0.2);
    z-index: 100;
}

.scroll-progress {
    width: 100%;
    height: 0%;
    background: var(--color-accent);
    transition: height 0.1s linear;
}

/* --- Side Label --- */
.side-label {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center center;
    z-index: 100;
    white-space: nowrap;
}

.side-label span {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--color-warm-gray);
    opacity: 0.5;
    text-transform: uppercase;
}

/* --- Grid Container --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
}

/* --- Typography --- */
.display-heading {
    font-family: var(--font-display);
    font-size: clamp(60px, 10vw, 140px);
    line-height: 0.92;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-light);
}

.caption-text {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-warm-gray);
}

.section-number {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    display: block;
    margin-bottom: 20px;
}

h3 {
    font-family: var(--font-display);
    font-size: 24px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-light);
    margin-bottom: 16px;
    line-height: 1.1;
}

p {
    color: var(--color-parchment);
    margin-bottom: 1.2em;
}

p:last-child {
    margin-bottom: 0;
}

/* --- Red Accent Line --- */
.red-accent-line {
    width: 2px;
    height: 200px;
    background: var(--color-accent);
    opacity: 0.6;
}

/* ==========================================
   SECTION: HERO
   ========================================== */
.section--hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background: radial-gradient(ellipse at 30% 40%, var(--color-deep) 0%, var(--color-deepest) 70%);
}

.section--hero .grid-container {
    width: 100%;
}

.hero__title {
    grid-column: 2 / 8;
    grid-row: 1;
    padding-top: 15vh;
}

.hero__title h1 {
    font-family: var(--font-display);
    font-size: clamp(80px, 14vw, 180px);
    line-height: 0.85;
    letter-spacing: 0.08em;
    color: var(--color-light);
}

.hero__accent-line {
    width: 80px;
    height: 2px;
    background: var(--color-accent);
    margin: 20px 0;
}

.hero__title h2 {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 90px);
    line-height: 0.92;
    letter-spacing: 0.2em;
    color: var(--color-accent);
}

.hero__subtitle {
    grid-column: 2 / 7;
    grid-row: 2;
    margin-top: 40px;
}

.hero__icon {
    grid-column: 9 / 12;
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon--compass {
    width: 120px;
    height: 120px;
    animation: compassSpin 30s linear infinite;
}

@keyframes compassSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero__scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.scroll-arrow {
    width: 1px;
    height: 40px;
    background: var(--color-warm-gray);
    margin: 10px auto 0;
    position: relative;
    opacity: 0.5;
    animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -4px;
    width: 9px;
    height: 9px;
    border-right: 1px solid var(--color-warm-gray);
    border-bottom: 1px solid var(--color-warm-gray);
    transform: rotate(45deg);
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 0.7; transform: translateY(8px); }
}

/* ==========================================
   SECTION: PROLOGUE
   ========================================== */
.section--prologue {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0;
    background: var(--color-deepest);
    position: relative;
}

.prologue__heading {
    grid-column: 2 / 6;
    grid-row: 1;
}

.prologue__body {
    grid-column: 7 / 12;
    grid-row: 1;
    padding-top: 80px;
}

.prologue__body p {
    font-size: 18px;
    line-height: 1.8;
}

.prologue__icon {
    grid-column: 1 / 3;
    grid-row: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0.4;
}

.icon--torii {
    width: 100px;
    height: 100px;
}

.prologue__accent {
    grid-column: 6 / 7;
    grid-row: 1;
    justify-self: center;
    align-self: center;
}

/* ==========================================
   SECTION: ARCHIVE
   ========================================== */
.section--archive {
    min-height: 100vh;
    padding: 120px 0;
    background: linear-gradient(180deg, var(--color-deepest) 0%, var(--color-deep) 50%, var(--color-deepest) 100%);
    position: relative;
}

.archive__label {
    grid-column: 1 / 4;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.archive__heading {
    grid-column: 4 / 11;
    grid-row: 1;
}

.archive__text-block {
    grid-column: 3 / 9;
    grid-row: 2;
    margin-top: 60px;
}

.archive__icon-grid {
    grid-column: 2 / 12;
    grid-row: 3;
    display: flex;
    justify-content: space-around;
    gap: 40px;
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid rgba(140, 123, 107, 0.15);
}

.icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.icon-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.icon-card .icon {
    width: 60px;
    height: 60px;
}

/* ==========================================
   SECTION: INQUIRY
   ========================================== */
.section--inquiry {
    min-height: 100vh;
    padding: 120px 0;
    background: var(--color-deep);
    position: relative;
}

.inquiry__accent-bar {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    width: 3px;
    background: linear-gradient(180deg, transparent, var(--color-accent), transparent);
    justify-self: center;
    min-height: 300px;
}

.inquiry__heading {
    grid-column: 2 / 8;
    grid-row: 1;
    padding-left: 40px;
}

.inquiry__columns {
    grid-column: 2 / 12;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    margin-top: 80px;
    padding-left: 40px;
}

.inquiry__col {
    border-top: 1px solid rgba(140, 123, 107, 0.2);
    padding-top: 30px;
}

.inquiry__col-number {
    font-family: var(--font-grotesk);
    font-size: 48px;
    color: var(--color-accent);
    opacity: 0.4;
    line-height: 1;
    margin-bottom: 20px;
}

.inquiry__col p {
    font-size: 16px;
    line-height: 1.8;
}

.inquiry__lotus {
    grid-column: 10 / 13;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.3;
}

.icon--lotus {
    width: 140px;
    height: 100px;
}

/* ==========================================
   SECTION: TESTIMONY
   ========================================== */
.section--testimony {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 120px 0;
    background: var(--color-deepest);
    position: relative;
    overflow: hidden;
}

.testimony__quote {
    grid-column: 3 / 11;
    grid-row: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.testimony__quote blockquote p {
    font-family: var(--font-body);
    font-size: clamp(22px, 3vw, 36px);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-light);
    font-style: italic;
}

.quote-mark {
    font-family: var(--font-display);
    font-size: 120px;
    color: var(--color-accent);
    opacity: 0.3;
    line-height: 0.5;
    display: block;
}

.quote-mark--close {
    text-align: right;
}

.testimony__quote cite {
    display: block;
    margin-top: 40px;
    font-style: normal;
}

.testimony__decoration {
    grid-column: 1 / 13;
    grid-row: 1;
    position: relative;
    z-index: 1;
}

.ink-wash-bg {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(184, 92, 56, 0.08) 0%, transparent 70%);
    filter: blur(60px);
}

/* ==========================================
   SECTION: METHODOLOGY
   ========================================== */
.section--methodology {
    min-height: 100vh;
    padding: 120px 0;
    background: linear-gradient(180deg, var(--color-deepest) 0%, var(--color-dark) 100%);
    position: relative;
}

.methodology__label {
    grid-column: 1 / 3;
    grid-row: 1;
}

.methodology__heading {
    grid-column: 3 / 10;
    grid-row: 1;
}

.methodology__steps {
    grid-column: 2 / 12;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 80px;
}

.method-step {
    padding: 40px 24px;
    border-left: 1px solid rgba(140, 123, 107, 0.2);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.method-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.method-step__number {
    font-family: var(--font-body);
    font-size: 48px;
    font-weight: 700;
    color: var(--color-accent);
    opacity: 0.5;
    margin-bottom: 20px;
    line-height: 1;
}

.method-step p {
    font-size: 15px;
    line-height: 1.8;
}

/* ==========================================
   SECTION: COLOPHON
   ========================================== */
.section--colophon {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0;
    background: var(--color-deepest);
    position: relative;
}

.colophon__icon {
    grid-column: 1 / 13;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.icon--compass-large {
    width: 280px;
    height: 280px;
    animation: compassSpin 60s linear infinite reverse;
}

.colophon__text {
    grid-column: 3 / 11;
    grid-row: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.colophon__divider {
    width: 60px;
    height: 2px;
    background: var(--color-accent);
    margin: 30px auto;
}

.colophon__year {
    margin-top: 20px;
    opacity: 0.4;
}

/* ==========================================
   REVEAL ANIMATIONS
   ========================================== */
.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section--hero {
    opacity: 1;
    transform: none;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .inquiry__columns {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .hero__icon {
        grid-column: 10 / 13;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .grid-container {
        padding: 0 20px;
        display: flex;
        flex-direction: column;
    }

    .side-label {
        display: none;
    }

    .scroll-indicator {
        right: 15px;
    }

    .hero__title h1 {
        font-size: 60px;
    }

    .hero__title h2 {
        font-size: 36px;
    }

    .display-heading {
        font-size: 48px;
    }

    .prologue__body {
        padding-top: 30px;
    }

    .archive__icon-grid {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

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

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

    .testimony__quote blockquote p {
        font-size: 20px;
    }
}

/* ==========================================
   GRAIN TEXTURE OVERLAY
   ========================================== */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}
