/* taisho.day — flat-design parallax time journey */

:root {
    --crimson: #C43A3A;
    --gold: #C4A04A;
    --indigo: #2B3A5C;
    --sakura: #E8B4B8;
    --cream: #F0E8D8;
    --ink: #2A2A2E;
    --matcha: #7A8A6A;

    --font-display: "Shippori Mincho", "Lora", serif;
    --font-body: "Zen Kaku Gothic New", "Inter", sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--cream);
    overflow-x: hidden;
    line-height: 1.75;
}

/* ============================================
   SECTIONS — parallax canvas
   ============================================ */
.section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, var(--from), var(--to));
    display: flex;
    align-items: center;
    justify-content: center;
}

.section + .section {
    border-top: 2px solid var(--cream);
}

.parallax-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
    pointer-events: none;
}

.bg-layer { z-index: 1; }
.mid-layer { z-index: 2; }
.fg-layer {
    z-index: 3;
    position: relative;
    pointer-events: auto;
}

/* ============================================
   SHAPES — flat geometric compositions
   ============================================ */
.shape {
    position: absolute;
    left: var(--x);
    top: var(--y);
    pointer-events: auto;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.circle-lg {
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: var(--color);
    transform: translate(-50%, -50%);
}

.circle-3d {
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.35), transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.15), transparent 55%),
        var(--color);
    box-shadow: 0 30px 60px rgba(42, 42, 46, 0.25);
    transform: translate(-50%, -50%);
}

.circle-3d.glow {
    box-shadow:
        0 0 80px rgba(196, 160, 74, 0.5),
        0 30px 60px rgba(42, 42, 46, 0.35);
}

.rect-lg {
    width: var(--w);
    height: var(--h);
    background: var(--color);
    transform: translate(-50%, -50%);
}

.rect-3d {
    width: var(--w);
    height: var(--h);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 50%),
        var(--color);
    box-shadow: 0 20px 50px rgba(42, 42, 46, 0.28);
    transform: translate(-50%, -50%);
}

.diamond {
    width: var(--size);
    height: var(--size);
    background: var(--color);
    transform: translate(-50%, -50%) rotate(45deg);
}

.half-circle {
    width: var(--size);
    height: calc(var(--size) / 2);
    background: var(--color);
    border-radius: var(--size) var(--size) 0 0;
    transform: translate(-50%, -50%);
}

.stripe {
    width: 60%;
    height: 12px;
    background: var(--color);
    transform: translate(-50%, -50%);
}

/* Fan (sensu) — triangle fan shape */
.fan {
    width: var(--size);
    height: calc(var(--size) / 1.6);
    background: var(--color);
    clip-path: polygon(50% 100%, 0% 0%, 20% 0%, 50% 70%, 80% 0%, 100% 0%);
    transform: translate(-50%, -50%);
}

.fan-3d {
    width: var(--size);
    height: calc(var(--size) / 1.6);
    background:
        linear-gradient(170deg, rgba(255, 255, 255, 0.25), transparent 55%),
        var(--color);
    clip-path: polygon(50% 100%, 0% 10%, 12% 0%, 50% 70%, 88% 0%, 100% 10%);
    filter: drop-shadow(0 20px 40px rgba(42, 42, 46, 0.28));
    transform: translate(-50%, -50%);
}

/* Torii gate silhouette */
.shape.torii {
    width: 280px;
    height: 320px;
    transform: translate(-50%, -50%);
    background:
        linear-gradient(var(--crimson), var(--crimson)) 0 0 / 100% 28px no-repeat,
        linear-gradient(var(--crimson), var(--crimson)) 0 36px / 100% 14px no-repeat,
        linear-gradient(var(--crimson), var(--crimson)) 18% 50px / 10px calc(100% - 50px) no-repeat,
        linear-gradient(var(--crimson), var(--crimson)) 78% 50px / 10px calc(100% - 50px) no-repeat;
}

/* ============================================
   TAISHO PATTERN MOTIFS (SVG)
   ============================================ */
.kiku-pattern {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 260px;
    height: 260px;
    opacity: 0.12;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><g fill='none' stroke='%232A2A2E' stroke-width='1.2'><circle cx='60' cy='60' r='8'/><circle cx='60' cy='60' r='20'/><circle cx='60' cy='60' r='32'/><circle cx='60' cy='60' r='44'/><circle cx='60' cy='60' r='56'/><g><line x1='60' y1='8' x2='60' y2='112'/><line x1='8' y1='60' x2='112' y2='60'/><line x1='23' y1='23' x2='97' y2='97'/><line x1='97' y1='23' x2='23' y2='97'/></g></g></svg>");
    background-size: contain;
    background-repeat: no-repeat;
}

.kiku-large {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 420px;
    height: 420px;
    opacity: 0.14;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><g fill='none' stroke='%232A2A2E' stroke-width='1'><circle cx='60' cy='60' r='10'/><circle cx='60' cy='60' r='22'/><circle cx='60' cy='60' r='34'/><circle cx='60' cy='60' r='46'/><circle cx='60' cy='60' r='58'/><g><line x1='60' y1='2' x2='60' y2='118'/><line x1='2' y1='60' x2='118' y2='60'/><line x1='17' y1='17' x2='103' y2='103'/><line x1='103' y1='17' x2='17' y2='103'/><line x1='37' y1='5' x2='83' y2='115'/><line x1='83' y1='5' x2='37' y2='115'/><line x1='5' y1='37' x2='115' y2='83'/><line x1='115' y1='37' x2='5' y2='83'/></g></g></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    transform: translate(-50%, -50%);
}

.asanoha-pattern {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--w);
    height: var(--h);
    opacity: 0.10;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 52' width='60' height='52'><g fill='none' stroke='%232A2A2E' stroke-width='0.8'><polygon points='30,2 58,18 58,38 30,50 2,38 2,18'/><line x1='30' y1='2' x2='30' y2='50'/><line x1='2' y1='18' x2='58' y2='38'/><line x1='58' y1='18' x2='2' y2='38'/></g></svg>");
    background-size: 60px 52px;
    background-repeat: repeat;
}

.seigaiha-pattern {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--w);
    height: var(--h);
    opacity: 0.14;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30' width='60' height='30'><g fill='none' stroke='%232A2A2E' stroke-width='0.9'><path d='M0,30 A15,15 0 0,1 30,30'/><path d='M30,30 A15,15 0 0,1 60,30'/><path d='M-15,15 A15,15 0 0,1 15,15'/><path d='M15,15 A15,15 0 0,1 45,15'/><path d='M45,15 A15,15 0 0,1 75,15'/></g></svg>");
    background-size: 60px 30px;
    background-repeat: repeat;
}

.seigaiha-pattern.light {
    opacity: 0.18;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30' width='60' height='30'><g fill='none' stroke='%23F0E8D8' stroke-width='0.9'><path d='M0,30 A15,15 0 0,1 30,30'/><path d='M30,30 A15,15 0 0,1 60,30'/><path d='M-15,15 A15,15 0 0,1 15,15'/><path d='M15,15 A15,15 0 0,1 45,15'/><path d='M45,15 A15,15 0 0,1 75,15'/></g></svg>");
}

/* ============================================
   ORNAMENTAL NUMERALS
   ============================================ */
.numeral {
    position: absolute;
    left: var(--x);
    top: var(--y);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(4rem, 10vw, 8rem);
    line-height: 1;
    color: rgba(42, 42, 46, 0.12);
    letter-spacing: -0.04em;
    user-select: none;
}

.numeral-dark { color: rgba(42, 42, 46, 0.22); }
.numeral-light { color: rgba(240, 232, 216, 0.18); }

/* ============================================
   HERO
   ============================================ */
.hero-content {
    text-align: center;
    padding: 0 2rem;
    mix-blend-mode: normal;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--cream);
    letter-spacing: -0.02em;
    line-height: 1;
    text-shadow: 0 6px 30px rgba(42, 42, 46, 0.35);
}

.hero-sub {
    margin-top: 1.5rem;
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1vw, 1.05rem);
    color: var(--cream);
    letter-spacing: 0.3em;
    text-transform: lowercase;
    opacity: 0.85;
}

.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    background: rgba(240, 232, 216, 0.3);
    overflow: hidden;
    z-index: 4;
}

.scroll-indicator span {
    display: block;
    width: 100%;
    height: 30%;
    background: var(--cream);
    animation: scroll-drop 2s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}

@keyframes scroll-drop {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(400%); }
}

/* ============================================
   MOMENT CONTENT
   ============================================ */
.moment-content {
    max-width: 540px;
    padding: 0 3rem;
    color: var(--cream);
}

.moment-content.align-right {
    margin-left: auto;
    text-align: right;
}

.section-midday .moment-content { color: var(--ink); }
.section-afternoon .moment-content { color: var(--ink); }

.moment-time {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.4em;
    padding: 0.5rem 1rem;
    border: 1px solid currentColor;
    margin-bottom: 1.5rem;
    opacity: 0.85;
}

.moment-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 1.2rem;
    letter-spacing: -0.01em;
}

.moment-copy {
    font-size: clamp(0.9rem, 1vw, 1.05rem);
    line-height: 1.75;
    opacity: 0.92;
    max-width: 40ch;
}

.moment-content.align-right .moment-copy {
    margin-left: auto;
}

/* ============================================
   END SECTION
   ============================================ */
.end-content {
    text-align: center;
    color: var(--cream);
    padding: 0 2rem;
}

.end-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(4rem, 12vw, 9rem);
    line-height: 1;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.end-copy {
    font-size: clamp(0.9rem, 1vw, 1.05rem);
    letter-spacing: 0.3em;
    text-transform: lowercase;
    opacity: 0.7;
}

/* ============================================
   PARTICLES — geometric petals
   ============================================ */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.particle {
    position: absolute;
    top: -5vh;
    width: var(--p-size, 8px);
    height: var(--p-size, 8px);
    background: var(--p-color, #E8B4B8);
    opacity: 0;
    will-change: transform, opacity;
    animation-name: petal-drift;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.particle.circle { border-radius: 50%; }
.particle.square { border-radius: 0; }
.particle.diamond { border-radius: 0; transform: rotate(45deg); }

@keyframes petal-drift {
    0% {
        transform: translateY(-5vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.55; }
    50% {
        transform: translateY(55vh) translateX(20px) rotate(90deg);
    }
    90% { opacity: 0.55; }
    100% {
        transform: translateY(110vh) translateX(-15px) rotate(180deg);
        opacity: 0;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 720px) {
    .moment-content,
    .moment-content.align-right {
        padding: 0 1.5rem;
        text-align: left;
        margin-left: 0;
    }
    .moment-content.align-right .moment-copy { margin-left: 0; }
    .numeral { font-size: clamp(3rem, 14vw, 5.5rem); }
    .shape.torii { width: 180px; height: 220px; }
    .fan, .fan-3d { transform: translate(-50%, -50%) scale(0.7); }
}
