/* =====================================================================
   taisho.day — Echoes of the Taisho Era (1912–1926)
   art-deco + japanese-minimal split-screen poster
   ===================================================================== */

:root {
    --washi:        #f5ede0;
    --washi-warm:   #efe4d1;
    --lacquer:      #1a1208;
    --umber:        #2a1f14;
    --umber-deep:   #2a2016;
    --sumi:         #2a2016;
    --vermillion:   #c73030;
    --kiku-gold:    #c4982a;
    --aizome:       #2d4a7a;
    --matcha:       #7a9a6c;

    --font-display: "Poiret One", "Josefin Sans", sans-serif;
    --font-body:    "EB Garamond", Georgia, serif;
    --font-jp:      "Noto Serif JP", "EB Garamond", serif;
    --font-meta:    "Josefin Sans", "Helvetica Neue", sans-serif;
}

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

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--lacquer);
    color: var(--sumi);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 28px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

em {
    font-style: italic;
    color: var(--vermillion);
}

/* ---------- Opening curtain ----------------------------------------- */
.poster-curtain {
    position: fixed;
    inset: 0;
    background: var(--lacquer);
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

.poster-curtain.is-active {
    opacity: 1;
}

/* ---------- Stage --------------------------------------------------- */
.stage {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* =====================================================================
   LEFT PANEL — Decorative zone (45% width, fixed)
   ===================================================================== */
.left-panel {
    position: relative;
    width: 45%;
    height: 100vh;
    background: var(--umber);
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(196, 152, 42, 0.06), transparent 60%),
        radial-gradient(ellipse at 70% 90%, rgba(199, 48, 48, 0.05), transparent 55%);
    color: var(--washi);
    overflow: hidden;
    flex-shrink: 0;
}

.left-panel-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Vertical title strip */
.vertical-title {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 64px;
    background: linear-gradient(180deg, rgba(26, 18, 8, 0.55), rgba(26, 18, 8, 0.15) 50%, rgba(26, 18, 8, 0.55));
    border-right: 1px solid rgba(196, 152, 42, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 32px 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    z-index: 6;
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 1.1s ease-out 1.6s, transform 1.1s ease-out 1.6s;
}

.vertical-title.is-revealed {
    opacity: 1;
    transform: translateX(0);
}

.vt-mark {
    font-family: var(--font-jp);
    font-size: 22px;
    letter-spacing: 0.4em;
    color: var(--kiku-gold);
}

.vt-name {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 0.42em;
    color: var(--washi);
    text-transform: uppercase;
}

.vt-year {
    font-family: var(--font-meta);
    font-size: 11px;
    letter-spacing: 0.32em;
    color: rgba(245, 237, 224, 0.5);
}

/* Mitsuwari radiating lines */
.mitsuwari {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 1.6s ease-out 0.8s;
}

.mitsuwari.is-revealed {
    opacity: 1;
}

/* Background pattern crossfade layers */
.pattern-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease-out;
    z-index: 2;
}

.pattern-layer.is-active {
    opacity: 1;
}

.pattern-layer svg {
    width: 90%;
    height: 90%;
    transform: translateY(var(--bg-shift, 0px));
    transition: transform 0.4s linear;
}

.kiku-bg circle {
    transform-origin: center;
}

/* The animated chrysanthemum centerpiece */
.chrysanthemum-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 480px;
    height: 480px;
    max-width: 80%;
    max-height: 80%;
    z-index: 3;
}

.chrysanthemum {
    width: 100%;
    height: 100%;
    transform: rotate(var(--kiku-rot, 0deg));
    transition: transform 0.2s linear;
    filter: drop-shadow(0 0 28px rgba(199, 48, 48, 0.18));
}

.kiku-rings circle {
    opacity: 0;
    animation: ringFade 1.2s ease-out 2.4s forwards;
}

.kiku-rings circle:nth-child(2) { animation-delay: 2.55s; }
.kiku-rings circle:nth-child(3) { animation-delay: 2.7s; }

@keyframes ringFade {
    to { opacity: 1; }
}

.kiku-petals path {
    stroke: var(--kiku-gold);
    stroke-width: 1.2;
    fill: rgba(199, 48, 48, 0.06);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kiku-petals path:nth-child(odd) {
    stroke: var(--vermillion);
    fill: rgba(196, 152, 42, 0.07);
}

.kiku-core {
    opacity: 0;
    animation: coreFade 0.8s ease-out 2.6s forwards;
}

@keyframes coreFade {
    to { opacity: 1; }
}

/* Gold shimmer sweep */
.gold-shimmer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        110deg,
        transparent 30%,
        rgba(245, 237, 224, 0.0) 40%,
        rgba(245, 237, 224, 0.10) 50%,
        rgba(245, 237, 224, 0.0) 60%,
        transparent 70%
    );
    background-size: 250% 100%;
    background-position: 200% 0;
    mix-blend-mode: screen;
    animation: shimmerSweep 4s ease-in-out infinite;
    border-radius: 50%;
}

@keyframes shimmerSweep {
    0%   { background-position: 200% 0; }
    50%  { background-position: -100% 0; }
    100% { background-position: -100% 0; }
}

/* Mon seal at bottom-right */
.mon-seal {
    position: absolute;
    bottom: 36px;
    right: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.8s ease-out 2.8s;
}

.mon-seal.is-revealed {
    opacity: 1;
}

.mon-seal svg {
    width: 48px;
    height: 48px;
}

.mon-label {
    font-family: var(--font-meta);
    font-size: 10px;
    letter-spacing: 0.34em;
    color: var(--kiku-gold);
    text-transform: uppercase;
}

/* =====================================================================
   RIGHT PANEL — Editorial reading zone (55% width)
   ===================================================================== */
.right-panel {
    position: relative;
    flex: 1;
    height: 100vh;
    background: var(--washi);
    color: var(--sumi);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 1.9s;
    box-shadow: -2px 0 30px rgba(26, 18, 8, 0.25);
}

.right-panel.is-revealed {
    transform: translateX(0);
}

/* ---------- Top navigation ----------------------------------------- */
.top-nav {
    position: relative;
    flex-shrink: 0;
    padding: 24px 48px 20px;
    border-bottom: 1px solid rgba(42, 32, 22, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--washi);
    z-index: 5;
}

.nav-list {
    display: flex;
    gap: 36px;
    list-style: none;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-meta);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sumi);
    padding-bottom: 8px;
    cursor: pointer;
    transition: color 0.25s ease;
}

.nav-item::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    background: var(--vermillion);
    clip-path: ellipse(50% 100% at 50% 100%);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s ease;
}

.nav-item:hover { color: var(--vermillion); }
.nav-item.is-active { color: var(--vermillion); }
.nav-item.is-active::after { transform: scaleX(1); }

.mon-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1px solid currentColor;
    border-radius: 50%;
    position: relative;
}

.mon-icon::before,
.mon-icon::after {
    content: "";
    position: absolute;
    inset: 0;
}

.mon-fan::before {
    border-bottom: 1px solid currentColor;
    border-radius: 0 0 50% 50%;
    inset: 25% 15% 15%;
}

.mon-wave::before {
    background-image: radial-gradient(circle at 50% 100%, transparent 30%, currentColor 31%, currentColor 33%, transparent 34%);
    inset: 30% 0 0;
    opacity: 0.7;
}

.mon-kiku::before {
    background:
        linear-gradient(0deg,   transparent 45%, currentColor 45%, currentColor 55%, transparent 55%),
        linear-gradient(45deg,  transparent 45%, currentColor 45%, currentColor 55%, transparent 55%),
        linear-gradient(90deg,  transparent 45%, currentColor 45%, currentColor 55%, transparent 55%),
        linear-gradient(135deg, transparent 45%, currentColor 45%, currentColor 55%, transparent 55%);
    inset: 20%;
    opacity: 0.65;
}

.mon-bridge::before {
    border-top: 1px solid currentColor;
    border-radius: 50% 50% 0 0;
    inset: 35% 15% 25%;
}

.nav-meta {
    font-family: var(--font-meta);
    font-size: 11px;
    letter-spacing: 0.28em;
    color: rgba(42, 32, 22, 0.55);
    text-transform: uppercase;
}

/* ---------- Scroll body -------------------------------------------- */
.content-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 64px 48px 96px;
    scroll-behavior: smooth;
}

.content-scroll::-webkit-scrollbar {
    width: 6px;
}
.content-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.content-scroll::-webkit-scrollbar-thumb {
    background: rgba(42, 32, 22, 0.2);
    border-radius: 3px;
}
.content-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(199, 48, 48, 0.5);
}

/* ---------- Section base ------------------------------------------- */
.section {
    max-width: 640px;
    margin: 0 auto 72px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.85s ease-out, transform 0.85s ease-out;
}

.section.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.section:last-child {
    margin-bottom: 32px;
}

.section-head {
    margin-bottom: 28px;
}

.section-mon {
    width: 56px;
    height: 56px;
    margin-bottom: 18px;
    transform: scale(0);
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.section.is-revealed .section-mon {
    transform: scale(1);
}

.section-mon svg {
    width: 100%;
    height: 100%;
}

.kicker {
    font-family: var(--font-meta);
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--vermillion);
    margin-bottom: 14px;
}

/* ---------- Hero --------------------------------------------------- */
.hero-title {
    font-family: var(--font-display);
    font-size: 56px;
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--lacquer);
    margin-bottom: 22px;
    font-weight: 400;
}

.hero-title em {
    font-family: var(--font-body);
    font-style: italic;
    font-weight: 500;
    color: var(--vermillion);
    letter-spacing: 0;
}

.hero-sub {
    font-size: 18px;
    line-height: 30px;
    color: var(--sumi);
    margin-bottom: 36px;
    max-width: 520px;
    font-style: italic;
    color: rgba(42, 32, 22, 0.78);
}

.lead-para {
    font-size: 17px;
    line-height: 30px;
    color: var(--sumi);
    margin: 28px 0;
}

.lead-para a,
.signoff a {
    color: var(--vermillion);
    background-image: linear-gradient(var(--vermillion), var(--vermillion));
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.32s ease;
    padding-bottom: 2px;
}

.lead-para a:hover,
.signoff a:hover {
    background-size: 100% 1px;
}

/* ---------- Fan-shape feature -------------------------------------- */
.fan-feature {
    --fan-angle: 90deg;
    position: relative;
    margin: 32px 0 36px;
    padding: 0;
    background: linear-gradient(135deg, var(--umber-deep), var(--lacquer));
    color: var(--washi);
    overflow: hidden;
    clip-path: polygon(0 100%, 100% 100%, 100% 30%, 70% 0, 0 0);
    transition: clip-path 0.45s ease;
    min-height: 220px;
}

.fan-feature:hover {
    /* Fan opens slightly: 90 -> 110 deg => clip extends further */
    clip-path: polygon(0 100%, 100% 100%, 100% 22%, 62% 0, 0 0);
}

.fan-feature::before {
    content: "";
    position: absolute;
    left: -40px;
    bottom: -40px;
    width: 220px;
    height: 220px;
    border: 1.5px solid var(--kiku-gold);
    border-radius: 50%;
    opacity: 0.18;
}

.fan-feature::after {
    content: "";
    position: absolute;
    right: -50px;
    top: -50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle at center, var(--vermillion), transparent 70%);
    opacity: 0.35;
}

.fan-feature-inner {
    position: relative;
    padding: 36px 40px 36px 40px;
    z-index: 2;
}

.fan-eyebrow {
    display: inline-block;
    font-family: var(--font-meta);
    font-size: 11px;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: var(--kiku-gold);
    margin-bottom: 12px;
}

.fan-title {
    font-family: var(--font-display);
    font-size: 32px;
    color: var(--washi);
    letter-spacing: 0.04em;
    margin-bottom: 12px;
    font-weight: 400;
}

.fan-body {
    font-size: 15px;
    line-height: 24px;
    color: rgba(245, 237, 224, 0.82);
    max-width: 380px;
    margin-bottom: 18px;
    font-style: italic;
}

.fan-cta {
    display: inline-block;
    font-family: var(--font-meta);
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--vermillion);
    border-bottom: 1px solid var(--vermillion);
    padding-bottom: 3px;
    transition: color 0.25s, border-color 0.25s;
}

.fan-feature:hover .fan-cta {
    color: var(--kiku-gold);
    border-color: var(--kiku-gold);
}

/* ---------- Seigaiha divider --------------------------------------- */
.seigaiha-divider {
    width: 100%;
    height: 18px;
    margin: 40px 0;
    opacity: 0.85;
}

.seigaiha-divider svg {
    width: 100%;
    height: 100%;
}

/* ---------- Section title (non-hero) ------------------------------- */
.section-title {
    font-family: var(--font-display);
    font-size: 40px;
    line-height: 48px;
    letter-spacing: 0.06em;
    color: var(--lacquer);
    font-weight: 400;
    margin-bottom: 8px;
}

.section-title em {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--vermillion);
    letter-spacing: 0;
    font-weight: 500;
}

.section p {
    margin-bottom: 18px;
}

/* ---------- Kiku list ---------------------------------------------- */
.kiku-list {
    list-style: none;
    margin: 24px 0 8px;
    padding: 24px 28px;
    background: rgba(196, 152, 42, 0.07);
    border-left: 2px solid var(--kiku-gold);
}

.kiku-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 8px 0;
    font-size: 16px;
    line-height: 26px;
    color: var(--sumi);
}

.kiku-list li + li {
    border-top: 1px dotted rgba(42, 32, 22, 0.18);
}

.kiku-list strong {
    font-family: var(--font-display);
    color: var(--vermillion);
    letter-spacing: 0.05em;
    font-weight: 400;
    margin-right: 4px;
}

.kiku-bullet {
    flex-shrink: 0;
    margin-top: 9px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background:
        radial-gradient(circle, var(--vermillion) 30%, transparent 31%),
        conic-gradient(from 0deg, var(--kiku-gold) 0 12.5%, transparent 12.5% 25%,
                                  var(--kiku-gold) 25% 37.5%, transparent 37.5% 50%,
                                  var(--kiku-gold) 50% 62.5%, transparent 62.5% 75%,
                                  var(--kiku-gold) 75% 87.5%, transparent 87.5% 100%);
}

/* ---------- Palette strip ------------------------------------------ */
.palette-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 28px 0;
}

.palette-chip {
    position: relative;
    padding: 18px 16px 14px;
    background: var(--washi-warm);
    border: 1px solid rgba(42, 32, 22, 0.12);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.palette-chip::before {
    content: "";
    display: block;
    width: 100%;
    height: 38px;
    background: var(--swatch);
    margin-bottom: 12px;
    border: 0.5px solid rgba(0, 0, 0, 0.1);
}

.palette-chip:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(26, 18, 8, 0.12);
}

.chip-name {
    display: block;
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: 0.05em;
    color: var(--lacquer);
    margin-bottom: 2px;
}

.chip-meta {
    display: block;
    font-family: var(--font-meta);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: rgba(42, 32, 22, 0.55);
    text-transform: uppercase;
}

/* ---------- Quote -------------------------------------------------- */
.taisho-quote {
    position: relative;
    margin: 36px 0;
    padding: 28px 32px 28px 64px;
    background: linear-gradient(180deg, var(--washi-warm), transparent);
    border-left: 3px solid var(--vermillion);
    color: var(--sumi);
    font-style: italic;
}

.taisho-quote .quote-mark {
    position: absolute;
    left: 18px;
    top: 16px;
    font-family: var(--font-jp);
    font-size: 38px;
    color: var(--vermillion);
    line-height: 1;
}

.taisho-quote p {
    font-size: 19px;
    line-height: 30px;
    color: var(--sumi);
    margin-bottom: 12px;
}

.taisho-quote footer {
    font-family: var(--font-meta);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(42, 32, 22, 0.6);
    font-style: normal;
}

.taisho-quote cite {
    font-style: italic;
    color: var(--vermillion);
}

/* ---------- Connection grid ---------------------------------------- */
.connection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 28px 0 24px;
}

.conn-card {
    position: relative;
    padding: 22px 22px 20px;
    background: var(--washi-warm);
    border: 1px solid rgba(42, 32, 22, 0.14);
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.conn-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 80px;
    height: 80px;
    border: 1px solid var(--kiku-gold);
    border-radius: 50%;
    opacity: 0.3;
    transition: transform 0.4s ease;
}

.conn-card:hover {
    transform: translateY(-2px);
    border-color: var(--vermillion);
}

.conn-card:hover::after {
    transform: scale(1.3) rotate(45deg);
}

.conn-num {
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 0.18em;
    color: var(--vermillion);
}

.conn-title {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--lacquer);
    letter-spacing: 0.04em;
}

.conn-meta {
    font-family: var(--font-meta);
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(42, 32, 22, 0.55);
}

/* ---------- Signoff & colophon ------------------------------------- */
.signoff {
    margin-top: 24px;
    font-style: italic;
    color: rgba(42, 32, 22, 0.78);
    font-size: 16px;
    line-height: 26px;
}

.colophon {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid rgba(42, 32, 22, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-family: var(--font-meta);
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(42, 32, 22, 0.5);
}

.colo-block { white-space: nowrap; }
.colo-dot   { color: var(--vermillion); }

/* ---------- Responsive --------------------------------------------- */
@media (max-width: 900px) {
    html, body { overflow: auto; }
    .stage { flex-direction: column; height: auto; min-height: 100vh; }
    .left-panel {
        width: 100%;
        height: 360px;
        position: relative;
    }
    .right-panel {
        width: 100%;
        height: auto;
        transform: translateX(0);
        transition: none;
    }
    .content-scroll {
        overflow: visible;
        padding: 40px 24px 60px;
    }
    .vertical-title {
        writing-mode: horizontal-tb;
        flex-direction: row;
        width: 100%;
        height: 48px;
        bottom: auto;
        padding: 0 24px;
    }
    .chrysanthemum-stage { width: 280px; height: 280px; }
    .top-nav { padding: 18px 24px 14px; flex-wrap: wrap; gap: 12px; }
    .nav-list { gap: 18px; flex-wrap: wrap; }
    .hero-title { font-size: 38px; }
    .section-title { font-size: 28px; line-height: 34px; }
    .palette-strip { grid-template-columns: repeat(2, 1fr); }
    .connection-grid { grid-template-columns: 1fr; }
}
