/* taisho.day — Sepia Toned History */
/* Palette:
   #3B2F1E — Aged Mahogany (primary text)
   #6B5744 — Taisho Brown (secondary text, borders)
   #C4A87C — Antique Gold (decorative accents, ornamental borders)
   #F4ECE1 — Aged Linen (page background)
   #FFFDF8 — Ivory Leaf (content card background)
   #8B1A1A — Kimono Crimson (links, active highlights)
   #2C4A3E — Jade Pine (secondary accent)
   #D4C5B0 — Sepia Mist (filmstrip, dividers)
*/

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #F4ECE1;
    color: #3B2F1E;
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    /* Aged paper grain texture */
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(107, 87, 68, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(107, 87, 68, 0.03) 0%, transparent 50%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(107, 87, 68, 0.008) 2px,
            rgba(107, 87, 68, 0.008) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 3px,
            rgba(107, 87, 68, 0.006) 3px,
            rgba(107, 87, 68, 0.006) 6px
        );
}

/* ============================
   Art Nouveau Top Border
   ============================ */
.nouveau-top-border {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-top: 1rem;
}

.nouveau-top-border svg {
    width: 100%;
    height: 60px;
    display: block;
}

/* ============================
   PORTAL: Hero Section
   ============================ */
.hero {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
    text-align: center;
    position: relative;
}

.hero-frame {
    position: relative;
    padding: 2rem 1.5rem;
}

/* Corner Flourishes */
.corner-flourish {
    position: absolute;
    width: 80px;
    height: 80px;
    pointer-events: none;
}

.corner-flourish.top-left {
    top: 0;
    left: 0;
}

.corner-flourish.top-right {
    top: 0;
    right: 0;
}

.corner-flourish.bottom-left {
    bottom: 0;
    left: 0;
}

.corner-flourish.bottom-right {
    bottom: 0;
    right: 0;
}

/* Hero Photo Area */
.hero-photo-area {
    position: relative;
    max-width: 600px;
    margin: 0 auto 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 3px 3px 15px rgba(59, 47, 30, 0.2), 0 0 30px rgba(59, 47, 30, 0.05) inset;
}

.hero-photo-inner {
    filter: sepia(0.6) contrast(1.1);
    border-radius: 8px;
}

.hero-photo-inner svg {
    display: block;
    width: 100%;
    height: auto;
}

.sepia-vignette {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(59, 47, 30, 0.25) 100%);
    border-radius: 8px;
    mix-blend-mode: multiply;
}

.hero-scene {
    display: block;
    width: 100%;
    height: auto;
}

/* Hero Text */
.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: #3B2F1E;
    letter-spacing: 0.04em;
    margin-bottom: 0.6rem;
    line-height: 1.2;
}

.title-jp {
    display: block;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    letter-spacing: 0.15em;
    color: #8B1A1A;
    margin-bottom: 0.3rem;
}

.title-en {
    display: block;
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    letter-spacing: 0.06em;
}

.hero-sub {
    font-family: 'Cormorant', Georgia, serif;
    font-weight: 500;
    font-style: italic;
    font-size: 1.25rem;
    color: #8B1A1A;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

.hero-desc {
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    font-weight: 400;
    color: #6B5744;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.7;
}

.hero-ornament {
    margin-top: 1.5rem;
}

.hero-ornament svg {
    width: 180px;
    height: 20px;
    display: inline-block;
}

/* ============================
   Section Dividers
   ============================ */
.section-divider {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 3rem;
}

.double-rule-divider {
    border-top: double 3px #6B5744;
    opacity: 0.5;
}

/* Section Headings */
.section-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 2rem;
    color: #3B2F1E;
    text-align: center;
    letter-spacing: 0.01em;
    margin-bottom: 0.75rem;
}

.section-intro {
    font-family: 'Cormorant', Georgia, serif;
    font-weight: 500;
    font-style: italic;
    font-size: 1.15rem;
    color: #6B5744;
    text-align: center;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================
   CHRONICLE: Timeline Filmstrip
   ============================ */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.filmstrip-wrapper {
    position: relative;
    background: #D4C5B0;
    border-radius: 4px;
    padding: 0;
    overflow: hidden;
}

/* Filmstrip perforations */
.filmstrip-perforation {
    height: 18px;
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 12px,
            #D4C5B0 12px,
            #D4C5B0 14px,
            transparent 14px,
            transparent 26px
        );
    position: relative;
}

.filmstrip-perforation::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 4px;
    height: 10px;
    background:
        repeating-radial-gradient(
            circle at 20px 5px,
            #F4ECE1 0px,
            #F4ECE1 3px,
            transparent 3px,
            transparent 20px
        );
    background-size: 40px 10px;
}

.filmstrip {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 1.2rem 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: #6B5744 #D4C5B0;
}

.filmstrip::-webkit-scrollbar {
    height: 6px;
}

.filmstrip::-webkit-scrollbar-track {
    background: #D4C5B0;
}

.filmstrip::-webkit-scrollbar-thumb {
    background: #6B5744;
    border-radius: 3px;
}

.film-item {
    flex-shrink: 0;
    width: 160px;
    scroll-snap-align: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.film-item:hover {
    transform: translateY(-4px);
}

.film-photo {
    width: 140px;
    height: 100px;
    margin: 0 auto 0.5rem;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 2px 2px 8px rgba(59, 47, 30, 0.25);
    background: #D4C5B0;
    filter: sepia(0.6) contrast(1.1);
    transition: filter 0.3s ease, box-shadow 0.3s ease;
}

.film-item:hover .film-photo {
    filter: sepia(0.3) contrast(1.15);
    box-shadow: 3px 3px 12px rgba(59, 47, 30, 0.35);
}

.film-photo svg {
    display: block;
    width: 100%;
    height: 100%;
}

.chrysanthemum-marker {
    display: block;
    font-size: 14px;
    color: #C4A87C;
    margin-bottom: 0.2rem;
    line-height: 1;
}

.film-year {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #3B2F1E;
    display: block;
    margin-bottom: 0.25rem;
}

.film-caption {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.78rem;
    color: #6B5744;
    line-height: 1.4;
    display: block;
}

/* ============================
   GALLERY: Archival Collections
   ============================ */
.gallery {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.gallery-card {
    background: #FFFDF8;
    border: double 3px #6B5744;
    border-radius: 4px;
    padding: 1.8rem;
    position: relative;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    /* Aged paper look */
    background-image:
        radial-gradient(ellipse at center, transparent 60%, rgba(196, 168, 124, 0.08) 100%);
}

.gallery-card:hover {
    box-shadow: 0 4px 20px rgba(59, 47, 30, 0.15);
    transform: translateY(-2px);
}

/* Card corner flourishes */
.card-flourish {
    pointer-events: none;
}

.corner-flourish-sm {
    position: absolute;
    width: 40px;
    height: 40px;
}

.corner-flourish-sm.tl {
    top: 4px;
    left: 4px;
}

.corner-flourish-sm.tr {
    top: 4px;
    right: 4px;
}

.gallery-image-area {
    margin-bottom: 1.2rem;
    border-radius: 4px;
    overflow: hidden;
    filter: sepia(0.6) contrast(1.1);
    box-shadow: 1px 1px 6px rgba(59, 47, 30, 0.15);
}

.gallery-image-area svg {
    display: block;
    width: 100%;
    height: auto;
}

.gallery-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: #3B2F1E;
    margin-bottom: 0.75rem;
    letter-spacing: 0.01em;
}

.gallery-text {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #6B5744;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.gallery-context {
    font-family: 'Cormorant', Georgia, serif;
    font-weight: 500;
    font-style: italic;
    font-size: 0.85rem;
    color: #8B1A1A;
    display: block;
    letter-spacing: 0.02em;
}

/* ============================
   Lightbox
   ============================ */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(59, 47, 30, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    background: #FFFDF8;
    max-width: 600px;
    width: 90%;
    border-radius: 6px;
    padding: 2.5rem;
    position: relative;
    border: double 3px #C4A87C;
    background-image:
        radial-gradient(ellipse at center, transparent 50%, rgba(196, 168, 124, 0.1) 100%);
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.lightbox-overlay.active .lightbox-content {
    transform: translateY(0);
}

.lightbox-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #6B5744;
    cursor: pointer;
    font-family: 'Lora', Georgia, serif;
    transition: color 0.2s ease;
    line-height: 1;
}

.lightbox-close:hover {
    color: #8B1A1A;
}

.lightbox-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #3B2F1E;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

.lightbox-text {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
    color: #6B5744;
    line-height: 1.7;
}

/* ============================
   Pull Quote
   ============================ */
.pullquote {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem 2rem;
}

.quote-ornament-top,
.quote-ornament-bottom {
    text-align: center;
    line-height: 0;
}

.quote-ornament-top svg,
.quote-ornament-bottom svg {
    width: 200px;
    height: 20px;
    display: inline-block;
}

.quote-box {
    border: double 3px #C4A87C;
    border-radius: 4px;
    padding: 2.5rem 2rem;
    text-align: center;
    background: #FFFDF8;
    background-image:
        radial-gradient(ellipse at center, transparent 60%, rgba(196, 168, 124, 0.06) 100%);
    margin: 0.5rem 0;
}

.quote-text {
    font-family: 'Cormorant', Georgia, serif;
    font-weight: 500;
    font-style: italic;
    font-size: 1.35rem;
    color: #3B2F1E;
    line-height: 1.6;
}

.quote-attribution {
    display: block;
    margin-top: 1rem;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.85rem;
    color: #6B5744;
    letter-spacing: 0.03em;
}

/* ============================
   LEGACY: Closing Reflection
   ============================ */
.legacy {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.legacy-content {
    max-width: 640px;
    margin: 0 auto;
}

.legacy-text {
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    font-weight: 400;
    color: #6B5744;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.legacy-era-marks {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.era-mark {
    text-align: center;
}

.era-kanji {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    color: #8B1A1A;
    letter-spacing: 0.1em;
    margin-bottom: 0.3rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.era-mark:hover .era-kanji {
    opacity: 1;
}

.era-label {
    font-family: 'Cormorant', Georgia, serif;
    font-weight: 500;
    font-style: italic;
    font-size: 0.85rem;
    color: #6B5744;
    letter-spacing: 0.05em;
}

/* ============================
   COLOPHON: Footer
   ============================ */
.footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
}

.colophon {
    text-align: center;
}

.nouveau-closing-border {
    margin-bottom: 1.5rem;
}

.nouveau-closing-border svg {
    width: 100%;
    height: 30px;
    display: block;
}

.double-rule {
    border-top: double 3px #6B5744;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.footer-tagline {
    font-family: 'Cormorant', Georgia, serif;
    font-weight: 500;
    font-style: italic;
    font-size: 1.15rem;
    color: #3B2F1E;
    margin-bottom: 1rem;
}

.footer-chrysanthemum {
    margin: 1rem auto;
    width: 60px;
    height: 60px;
    opacity: 0.8;
}

.footer-chrysanthemum svg {
    width: 100%;
    height: 100%;
}

.footer-era {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #8B1A1A;
    display: block;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.footer-timeline-summary {
    font-family: 'Cormorant', Georgia, serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: #6B5744;
    margin-bottom: 1rem;
    letter-spacing: 0.04em;
}

.footer-timeline-summary span {
    margin: 0 0.3rem;
}

.footer-current-era {
    color: #8B1A1A;
    font-weight: 500;
    font-style: italic;
}

.footer-copy {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.7rem;
    color: #6B5744;
    letter-spacing: 0.03em;
    opacity: 0.7;
}

/* Bottom Border */
.nouveau-bottom-border {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 1rem;
}

.nouveau-bottom-border svg {
    width: 100%;
    height: 30px;
    display: block;
}

/* ============================
   Fade-In Animation
   ============================ */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    .hero {
        padding: 1.5rem 1rem 2rem;
    }

    .hero-frame {
        padding: 1rem 0.5rem;
    }

    .corner-flourish {
        width: 50px;
        height: 50px;
    }

    .section-heading {
        font-size: 1.6rem;
    }

    .timeline {
        padding: 2rem 1rem;
    }

    .filmstrip {
        gap: 1rem;
        padding: 1rem;
    }

    .film-item {
        width: 140px;
    }

    .gallery {
        padding: 2rem 1rem;
    }

    .gallery-card {
        padding: 1.2rem;
    }

    .pullquote {
        padding: 1rem;
    }

    .quote-box {
        padding: 1.5rem 1rem;
    }

    .quote-text {
        font-size: 1.1rem;
    }

    .legacy {
        padding: 2rem 1rem;
    }

    .legacy-era-marks {
        gap: 1.5rem;
    }

    .footer {
        padding: 1.5rem 1rem 2rem;
    }

    .section-divider {
        padding: 0 1.5rem;
    }
}
