/* ============================================================
   TOBIKAGE.MONSTER — Styles
   Art-Deco Ornate Luxury | Muted Vintage Palette
   ============================================================ */

/* Custom Properties */
:root {
    --vault-black:      #1C1814;
    --aged-walnut:      #2E2620;
    --tarnished-gold:   #C9A96E;
    --tarnished-gold60: rgba(201, 169, 110, 0.6);
    --antique-parchment:#F0E6C8;
    --burnished-bronze: #8C6A3F;
    --library-shadow:   #4A3728;
    --faded-cream:      #D4C5A4;
    --abyss:            #1A0F0A;
    /* Bright gold deliberately NOT used — see DESIGN.md Uniqueness Note 4 */
    --bright-gold-ref:  #FFD700;

    /* Layout */
    --gutter:     20px;
    --base-unit:  4px;
    --max-width:  1280px;

    /* Typography */
    --font-display:   'Cormorant SC', serif;
    --font-heading:   'Cinzel Decorative', serif;
    --font-body:      'EB Garamond', serif;

    /* Transitions */
    --trans-fast:     250ms ease-out;
    --trans-med:      400ms ease-out;
    --trans-slow:     600ms ease-out;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--vault-black);
    color: var(--faded-cream);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ── Vignette (fixed viewport overlay) ─────────────────── */
#vignette {
    position: fixed;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 40%,
        rgba(26, 15, 10, 0.35) 100%
    );
    pointer-events: none;
    z-index: 900;
}

/* ── Diamond Lattice Background ─────────────────────────── */
/* SVG data URI tiling pattern — 40px diamonds at 4% opacity */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect width='40' height='40' fill='none'/%3E%3Cpath d='M20 0 L40 20 L20 40 L0 20 Z' fill='none' stroke='%23C9A96E' stroke-width='0.8'/%3E%3C/svg%3E");
    background-size: 40px 40px;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
    animation: latticeReveal 800ms ease-out both;
}

@keyframes latticeReveal {
    from { opacity: 0; }
    to   { opacity: 0.04; }
}

/* ── Hero Section ────────────────────────────────────────── */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background-color: var(--vault-black);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

/* Sunburst SVG container */
#sunburst-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

#sunburst {
    width: min(600px, 90vw);
    height: min(600px, 90vw);
    overflow: visible;
}

#sunburst line {
    stroke: var(--tarnished-gold);
    stroke-width: 1;
    stroke-linecap: square;
    opacity: 0; /* animated via JS */
}

/* Hero content */
#hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--base-unit) * 5);
}

/* Hero title: Cormorant SC, 96px, letter-animated */
#hero-title {
    font-family: var(--font-display);
    font-size: clamp(52px, 8vw, 96px);
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--antique-parchment);
    line-height: 1;
    display: flex;
    gap: 0.02em;
    position: relative;
}

/* Gold shimmer sweep on hero title */
#hero-title {
    background: linear-gradient(
        90deg,
        var(--antique-parchment) 0%,
        var(--antique-parchment) 35%,
        var(--tarnished-gold) 50%,
        var(--antique-parchment) 65%,
        var(--antique-parchment) 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
    animation-delay: 2.5s; /* after reveal */
}

@keyframes shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.hero-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    /* JS triggers transition */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.hero-letter.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Hero subtitle wrapper */
#hero-subtitle-wrapper {
    display: flex;
    align-items: center;
    gap: calc(var(--base-unit) * 4);
}

.chevron-accent {
    color: var(--tarnished-gold);
    font-size: 14px;
    letter-spacing: 2px;
}

#hero-subtitle {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.4em;
    color: var(--tarnished-gold);
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    opacity: 0;
    transition: opacity 0.6s ease-out 1.8s;
}

#hero-subtitle.revealed {
    opacity: 1;
}

/* Gold-line-draw border around subtitle */
#hero-subtitle::before {
    content: '';
    position: absolute;
    inset: -8px -16px;
    border: 1px solid transparent;
    pointer-events: none;
    transition: border-color 0.3s;
}

#hero-subtitle:hover::before {
    border-color: var(--tarnished-gold);
    animation: borderDraw 400ms linear forwards;
}

@keyframes borderDraw {
    0%   { clip-path: inset(0 100% 100% 0); }
    25%  { clip-path: inset(0 0% 100% 0); }
    50%  { clip-path: inset(0 0% 0% 100%); }
    75%  { clip-path: inset(100% 0% 0% 0); }
    100% { clip-path: inset(0% 0% 0% 0); }
}

/* Hero tagline */
#hero-tagline {
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.3em;
    color: var(--burnished-bronze);
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.6s ease-out 2.2s;
}

#hero-tagline.revealed {
    opacity: 1;
}

/* Scroll hint */
#scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--tarnished-gold), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
    animation-delay: 3s;
    opacity: 0;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0; transform: scaleY(0.3) translateY(-30px); }
    50%       { opacity: 0.8; transform: scaleY(1) translateY(0); }
}

/* ── Main Content Layout ─────────────────────────────────── */
#collection {
    position: relative;
    z-index: 2;
    padding: 0 var(--gutter);
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Grid Container — 8-column system */
.grid-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: var(--gutter);
    margin-bottom: 60px;
}

/* Column spans */
.col-5 { grid-column: span 5; }
.col-3 { grid-column: span 3; }

/* ── Architectural Block (arch-block) ───────────────────── */
.arch-block {
    position: relative;
    background-color: var(--aged-walnut);
    border: 1px solid var(--tarnished-gold60);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
    padding: 36px 32px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--trans-med), transform var(--trans-med),
                box-shadow var(--trans-fast);
}

.arch-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.arch-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

/* Corner brackets */
.corner-bracket {
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 5;
}

.corner-bracket::before,
.corner-bracket::after {
    content: '';
    position: absolute;
    background-color: var(--tarnished-gold);
    transition: transform var(--trans-slow), opacity var(--trans-slow);
}

/* TL bracket */
.corner-tl { top: -1px; left: -1px; }
.corner-tl::before { top: 0; left: 0; width: 20px; height: 1px; }
.corner-tl::after  { top: 0; left: 0; width: 1px; height: 20px; }

/* TR bracket */
.corner-tr { top: -1px; right: -1px; }
.corner-tr::before { top: 0; right: 0; width: 20px; height: 1px; }
.corner-tr::after  { top: 0; right: 0; width: 1px; height: 20px; }

/* BL bracket */
.corner-bl { bottom: -1px; left: -1px; }
.corner-bl::before { bottom: 0; left: 0; width: 20px; height: 1px; }
.corner-bl::after  { bottom: 0; left: 0; width: 1px; height: 20px; }

/* BR bracket */
.corner-br { bottom: -1px; right: -1px; }
.corner-br::before { bottom: 0; right: 0; width: 20px; height: 1px; }
.corner-br::after  { bottom: 0; right: 0; width: 1px; height: 20px; }

/* Bracket sweep-in animation (triggered by .brackets-visible on parent) */
.arch-block:not(.visible) .corner-bracket::before,
.arch-block:not(.visible) .corner-bracket::after {
    transform: scale(0);
    opacity: 0;
}

.arch-block.visible .corner-bracket::before,
.arch-block.visible .corner-bracket::after {
    transform: scale(1);
    opacity: 1;
}

/* Block inner padding container */
.block-inner {
    position: relative;
    z-index: 2;
}

/* ── Typography within blocks ───────────────────────────── */
.section-label {
    font-family: var(--font-heading);
    font-size: 12px;
    letter-spacing: 0.25em;
    color: var(--tarnished-gold);
    text-transform: uppercase;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tarnished-gold60);
}

.body-copy {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--faded-cream);
    margin-bottom: 20px;
}

.body-copy em {
    font-style: italic;
    color: var(--antique-parchment);
}

.pull-quote-rule {
    width: 60px;
    height: 1px;
    background: var(--tarnished-gold60);
    margin: 28px 0 20px;
}

.pull-quote {
    font-family: var(--font-display);
    font-size: 20px;
    font-style: italic;
    color: var(--antique-parchment);
    letter-spacing: 0.04em;
    padding-left: 16px;
    border-left: 2px solid var(--tarnished-gold);
    line-height: 1.5;
}

/* ── Detail Cards (right 3-col stack) ───────────────────── */
#detail-cards {
    display: flex;
    flex-direction: column;
    gap: var(--gutter);
}

.detail-card {
    background-color: var(--abyss) !important;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.4), 0 4px 24px rgba(0, 0, 0, 0.6);
}

.detail-card:hover {
    transform: translateY(-3px);
    box-shadow: inset 0 0 12px rgba(0,0,0,0.4), 0 8px 32px rgba(0,0,0,0.8);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 13px;
    letter-spacing: 0.2em;
    color: var(--tarnished-gold);
    text-transform: uppercase;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

/* Gold-line-draw on card-title hover */
.card-title::after {
    content: '';
    position: absolute;
    inset: -4px -8px;
    border: 1px solid transparent;
    pointer-events: none;
    transition: border-color 0.3s;
}

.detail-card:hover .card-title::after,
.feature-block:hover .card-title::after {
    border-color: var(--tarnished-gold60);
}

.card-body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    color: var(--faded-cream);
    opacity: 0.9;
}

/* ── Section Dividers ────────────────────────────────────── */
.section-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
    opacity: 0;
    transition: opacity var(--trans-slow);
}

.section-divider.visible {
    opacity: 1;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--tarnished-gold60), transparent);
    transform-origin: center;
    transform: scaleX(0);
    transition: transform 700ms ease-out;
}

.section-divider.visible .divider-line {
    transform: scaleX(1);
}

/* Fleur-de-lis */
.fleur-de-lis {
    width: 40px;
    height: 60px;
    flex-shrink: 0;
}

/* Chevron cascade divider */
.chevron-divider {
    justify-content: center;
}

.chevron-cascade {
    width: 200px;
    height: 60px;
}

.chev {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 500ms ease-out;
}

.section-divider.visible .chev-1 {
    stroke-dashoffset: 0;
    transition-delay: 0ms;
}
.section-divider.visible .chev-2 {
    stroke-dashoffset: 0;
    transition-delay: 120ms;
}
.section-divider.visible .chev-3 {
    stroke-dashoffset: 0;
    transition-delay: 240ms;
}

/* ── Feature Grid ────────────────────────────────────────── */
#feature-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 80px;
}

.feature-block {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 40px 28px;
}

.feature-icon-wrap {
    margin-bottom: 28px;
    display: flex;
    justify-content: center;
}

.feature-icon {
    width: 64px;
    height: 64px;
    overflow: visible;
}

/* SVG stroke-draw animation for feature icons */
.feature-icon line,
.feature-icon polyline,
.feature-icon polygon,
.feature-icon circle,
.feature-icon path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 600ms ease-out;
}

.feature-block.visible .feature-icon line,
.feature-block.visible .feature-icon polyline,
.feature-block.visible .feature-icon polygon,
.feature-block.visible .feature-icon circle,
.feature-block.visible .feature-icon path {
    stroke-dashoffset: 0;
}

.feature-block.visible:nth-child(1) .feature-icon line,
.feature-block.visible:nth-child(1) .feature-icon polyline,
.feature-block.visible:nth-child(1) .feature-icon polygon,
.feature-block.visible:nth-child(1) .feature-icon circle {
    transition-delay: 0ms;
}
.feature-block.visible:nth-child(2) .feature-icon line,
.feature-block.visible:nth-child(2) .feature-icon polyline,
.feature-block.visible:nth-child(2) .feature-icon polygon,
.feature-block.visible:nth-child(2) .feature-icon circle {
    transition-delay: 200ms;
}
.feature-block.visible:nth-child(3) .feature-icon line,
.feature-block.visible:nth-child(3) .feature-icon polyline,
.feature-block.visible:nth-child(3) .feature-icon polygon,
.feature-block.visible:nth-child(3) .feature-icon circle {
    transition-delay: 400ms;
}

/* ── Statement Section ───────────────────────────────────── */
#statement-section {
    position: relative;
    z-index: 2;
    min-height: 50vh;
    background-color: var(--vault-black);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 80px var(--gutter);
    border-top: 1px solid var(--tarnished-gold60);
    border-bottom: 1px solid var(--tarnished-gold60);
    overflow: hidden;
}

.statement-ornament-left,
.statement-ornament-right {
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 700ms ease-out;
}

#statement-section.visible .statement-ornament-left,
#statement-section.visible .statement-ornament-right {
    opacity: 1;
}

.rule-ornament {
    width: 300px;
    height: 20px;
    overflow: visible;
}

/* Rule-unfold animation */
.rule-ornament line,
.rule-ornament polygon {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 700ms ease-out;
}

#statement-section.visible .statement-ornament-left .rule-ornament line,
#statement-section.visible .statement-ornament-left .rule-ornament polygon,
#statement-section.visible .statement-ornament-right .rule-ornament line,
#statement-section.visible .statement-ornament-right .rule-ornament polygon {
    stroke-dashoffset: 0;
}

#statement-quote {
    text-align: center;
    max-width: 600px;
    flex: 0 1 600px;
}

.statement-text {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.5vw, 48px);
    font-style: italic;
    font-weight: 400;
    color: var(--antique-parchment);
    letter-spacing: 0.03em;
    line-height: 1.4;
    opacity: 0;
    transition: opacity 800ms ease-out 300ms;
}

#statement-section.visible .statement-text {
    opacity: 1;
}

/* ── Footer ──────────────────────────────────────────────── */
#footer {
    position: relative;
    z-index: 2;
    background-color: var(--vault-black);
    border-top: 1px solid var(--tarnished-gold60);
    padding: 60px var(--gutter) 40px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.footer-col {
    flex: 1;
    max-width: 360px;
    padding: 0 40px;
}

.footer-left {
    text-align: right;
}

.footer-right {
    text-align: left;
}

.footer-divider {
    width: 1px;
    height: 160px;
    background: var(--tarnished-gold);
    flex-shrink: 0;
    align-self: center;
}

.footer-heading {
    font-family: var(--font-heading);
    font-size: 16px;
    letter-spacing: 0.25em;
    color: var(--tarnished-gold);
    text-transform: uppercase;
    margin-bottom: 24px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--faded-cream);
    text-decoration: none;
    text-transform: uppercase;
    display: inline-block;
    position: relative;
    transition: color var(--trans-fast);
}

.footer-link:hover {
    color: var(--antique-parchment);
}

/* Gold-line-draw on footer links */
.footer-link::after {
    content: '';
    position: absolute;
    inset: -3px -6px;
    border: 1px solid transparent;
    pointer-events: none;
    transition: border-color 0.3s;
}

.footer-link:hover::after {
    border-color: var(--tarnished-gold60);
}

/* Footer base line */
.footer-base {
    max-width: var(--max-width);
    margin: 40px auto 0;
    border-top: 1px solid var(--tarnished-gold60);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-family: var(--font-heading);
    font-size: 10px;
    letter-spacing: 0.25em;
    color: var(--burnished-bronze);
    text-transform: uppercase;
}

.footer-mark {
    font-size: 10px;
    color: var(--tarnished-gold);
}

/* ── Stagger delays for content tier blocks ─────────────── */
#narrative-block { transition-delay: 0ms; }
#detail-cards .detail-card:nth-child(1) { transition-delay: 80ms; }
#detail-cards .detail-card:nth-child(2) { transition-delay: 160ms; }
#detail-cards .detail-card:nth-child(3) { transition-delay: 240ms; }

#feature-grid .feature-block:nth-child(1) { transition-delay: 0ms; }
#feature-grid .feature-block:nth-child(2) { transition-delay: 80ms; }
#feature-grid .feature-block:nth-child(3) { transition-delay: 160ms; }

/* ── Reduced Motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #hero-title {
        animation: none;
        background: none;
        -webkit-text-fill-color: var(--antique-parchment);
    }

    .hero-letter,
    #hero-subtitle,
    #hero-tagline,
    .arch-block,
    .section-divider,
    .statement-ornament-left,
    .statement-ornament-right,
    .statement-text {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    .col-5, .col-3 { grid-column: span 1; }

    #feature-grid {
        grid-template-columns: 1fr;
    }

    #detail-cards {
        flex-direction: column;
    }

    #statement-section {
        flex-direction: column;
        text-align: center;
    }

    .statement-ornament-left,
    .statement-ornament-right {
        display: none;
    }

    .rule-ornament {
        width: 200px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 40px;
    }

    .footer-col {
        text-align: center;
    }

    .footer-divider {
        width: 160px;
        height: 1px;
        align-self: center;
    }
}

@media (max-width: 600px) {
    #hero-title {
        font-size: 52px;
    }

    #collection {
        padding: 0 16px;
    }

    .arch-block {
        padding: 24px 20px;
    }
}
