/* yamato.quest — Japanese Zen Portfolio */
/* Fonts: Inter** (haiku display), Lora** (body text), Cormorant (headings) */

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

:root {
    --washi-white: #FAF8F3;
    --pure-white: #FFFFFF;
    --sumi-black: #2C2C2C;
    --light-ink: #5C5C5C;
    --sakura: #C1328E;
    --indigo-deep: #234B6E;
    --natural-ocher: #8B7355;
    --stone-gray: #E8E4DD;
}

html {
    scroll-behavior: smooth;
    scroll-margin-top: 40px;
}

body {
    background-color: var(--washi-white);
    color: var(--sumi-black);
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    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)' opacity='0.03'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* === Typography === */
.section-heading {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 36px;
    color: var(--sumi-black);
    letter-spacing: 0.02em;
    font-feature-settings: 'liga', 'kern';
    margin-bottom: 1.5rem;
}

h3 {
    font-family: 'Cormorant', serif;
    font-weight: 500;
    font-size: 20px;
    letter-spacing: 0.02em;
    font-feature-settings: 'liga', 'kern';
}

/* === Hero Zone === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 2rem;
}

.hero-inner {
    max-width: 500px;
    margin: 0 auto;
}

.calli-mark {
    margin-bottom: 2rem;
    opacity: 0;
    animation: calliReveal 1.2s ease-out 0.3s forwards;
}

.calli-svg {
    display: block;
    margin: 0 auto;
}

.stroke-anim {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: strokeDraw 2s ease-out forwards;
}

.stroke-anim:nth-child(1) { animation-delay: 0.2s; }
.stroke-anim:nth-child(2) { animation-delay: 0.5s; }
.stroke-anim:nth-child(3) { animation-delay: 0.8s; }
.stroke-anim:nth-child(4) { animation-delay: 1.1s; }
.stroke-anim:nth-child(5) { animation-delay: 1.4s; }

.hero-title {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 2.8rem;
    color: var(--sumi-black);
    letter-spacing: 0.02em;
    font-feature-settings: 'liga', 'kern';
    margin-bottom: 0.25rem;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.6s forwards;
}

.hero-jp {
    font-family: 'Cormorant', serif;
    font-weight: 500;
    font-size: 1.3rem;
    color: var(--light-ink);
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.8s forwards;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: var(--light-ink);
    letter-spacing: 0.02em;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 1.0s forwards;
}

.hero-nav {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 1.2s forwards;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: var(--indigo-deep);
    text-decoration: none;
    letter-spacing: 0.02em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-link:hover {
    color: var(--sakura);
    transform: translateY(-2px);
}

.nav-jp {
    font-size: 11px;
    color: var(--light-ink);
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.nav-link:hover .nav-jp {
    color: var(--sakura);
}

.torii-icon {
    color: var(--indigo-deep);
    transition: color 0.3s ease;
    margin-bottom: 0.15rem;
}

.nav-link:hover .torii-icon {
    color: var(--sakura);
}

/* === Haiku Interludes === */
.haiku-interlude {
    text-align: center;
    padding: 48px 2rem;
    margin: 48px 0;
}

.haiku {
    font-family: 'Cormorant', serif;
    font-style: italic;
    font-weight: 500;
    font-size: 1.15rem;
    color: var(--light-ink);
    line-height: 2.2;
    letter-spacing: 0.02em;
    font-feature-settings: 'liga', 'kern';
}

/* === Seasonal Sections === */
.season {
    padding: 80px 2rem;
    scroll-margin-top: 40px;
}

.season-inner {
    max-width: 640px;
    margin: 0 auto;
}

.section-marker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.torii-section-icon {
    color: var(--accent, var(--indigo-deep));
}

.section-label {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 13px;
    color: var(--accent, var(--indigo-deep));
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* === Letterbox Photography === */
.letterbox-photo {
    width: 100%;
    aspect-ratio: 21 / 9;
    position: relative;
    overflow: hidden;
    margin-bottom: 2.5rem;
    border-radius: 2px;
}

.spring-photo {
    background: linear-gradient(135deg, #f5e6f0 0%, #fce4ec 30%, #f8bbd0 60%, #f5e6f0 100%);
}

.summer-photo {
    background: linear-gradient(135deg, #e3edf7 0%, #c5cae9 30%, #9fa8da 60%, #e3edf7 100%);
}

.autumn-photo {
    background: linear-gradient(135deg, #f5ebe0 0%, #e8d5b7 30%, #d4a574 60%, #f5ebe0 100%);
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(250, 248, 243, 0.8) 100%);
}

.photo-caption {
    position: absolute;
    bottom: 12px;
    left: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: var(--light-ink);
    letter-spacing: 0.02em;
}

/* === Content Blocks === */
.content-block {
    border-left: 1px solid var(--accent, var(--natural-ocher));
    padding-left: 1.5rem;
    margin-bottom: 2.5rem;
}

.body-text {
    font-size: 17px;
    color: var(--sumi-black);
    margin-bottom: 1rem;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* === Deity Cards === */
.deity-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.deity-card {
    background: var(--pure-white);
    border: 1px solid var(--stone-gray);
    padding: 1.75rem;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.deity-card:hover {
    border-color: var(--accent, var(--sakura));
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.deity-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.deity-svg {
    flex-shrink: 0;
}

.deity-name {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--sumi-black);
    letter-spacing: 0.02em;
    font-feature-settings: 'liga', 'kern';
    margin-bottom: 0.15rem;
}

.deity-title {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 13px;
    color: var(--light-ink);
    letter-spacing: 0.02em;
}

.deity-desc {
    font-size: 0.95rem;
    color: var(--light-ink);
    line-height: 1.7;
}

.deity-expand {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.4s ease;
    opacity: 0;
}

.deity-card.expanded .deity-expand {
    max-height: 200px;
    opacity: 1;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--stone-gray);
}

.deity-detail {
    font-size: 0.9rem;
    color: var(--sumi-black);
    line-height: 1.7;
}

/* === Timeline === */
.timeline {
    border-left: 2px solid var(--accent, var(--indigo-deep));
    padding-left: 0;
    position: relative;
}

.timeline-event {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem 0 1.25rem 1.5rem;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 1.6rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--washi-white);
    border: 2px solid var(--accent, var(--indigo-deep));
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.timeline-event:hover::before {
    background: var(--accent, var(--indigo-deep));
    transform: scale(1.3);
}

.timeline-event:hover {
    background: rgba(35, 75, 110, 0.03);
}

.timeline-marker {
    flex-shrink: 0;
    min-width: 80px;
}

.event-year-jp {
    font-family: 'Cormorant', serif;
    font-weight: 500;
    font-size: 13px;
    color: var(--light-ink);
    display: block;
    letter-spacing: 0.02em;
}

.event-year {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--accent, var(--indigo-deep));
    display: block;
}

.event-content {
    flex: 1;
}

.event-title {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--sumi-black);
    letter-spacing: 0.02em;
    font-feature-settings: 'liga', 'kern';
    margin-bottom: 0.25rem;
}

.event-text {
    font-size: 0.95rem;
    color: var(--sumi-black);
    line-height: 1.7;
}

/* === Artifact Gallery === */
.artifact-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.artifact {
    background: var(--pure-white);
    border: 1px solid var(--stone-gray);
    border-left: 3px solid var(--accent, var(--natural-ocher));
    padding: 1.75rem;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.artifact:hover {
    border-left-color: var(--sumi-black);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.artifact-icon-wrap {
    flex-shrink: 0;
}

.artifact-svg {
    display: block;
}

.artifact-info {
    flex: 1;
}

.artifact-name {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--sumi-black);
    letter-spacing: 0.02em;
    font-feature-settings: 'liga', 'kern';
    margin-bottom: 0.1rem;
}

.artifact-jp {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 13px;
    color: var(--light-ink);
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 0.5rem;
}

.artifact-desc {
    font-size: 0.9rem;
    color: var(--light-ink);
    line-height: 1.7;
}

.artifact-context {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.4s ease, margin-top 0.3s ease;
    opacity: 0;
    width: 100%;
    margin-top: 0;
}

.artifact.expanded {
    flex-wrap: wrap;
}

.artifact.expanded .artifact-context {
    max-height: 200px;
    opacity: 1;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--stone-gray);
}

.context-text {
    font-size: 0.9rem;
    color: var(--sumi-black);
    line-height: 1.7;
}

/* === Footer === */
.site-footer {
    background: var(--light-ink);
    color: var(--stone-gray);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-inner {
    max-width: 560px;
    margin: 0 auto;
}

.footer-torii {
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.footer-torii svg {
    display: block;
    margin: 0 auto;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-nav-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: var(--stone-gray);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-link:hover {
    color: var(--pure-white);
}

.footer-jp {
    font-size: 11px;
    opacity: 0.7;
    letter-spacing: 0.05em;
}

.footer-advisory {
    border-top: 1px solid rgba(232, 228, 221, 0.2);
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.advisory-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: var(--stone-gray);
    opacity: 0.7;
    line-height: 1.6;
}

.footer-copy {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: var(--stone-gray);
    opacity: 0.6;
    letter-spacing: 0.02em;
}

/* === Animations === */
@keyframes calliReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes strokeDraw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

/* Staggered reveal for timeline events */
.timeline-event {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-event.revealed {
    opacity: 1;
    transform: translateX(0);
}

.timeline-event:nth-child(1) { transition-delay: 0.05s; }
.timeline-event:nth-child(2) { transition-delay: 0.15s; }
.timeline-event:nth-child(3) { transition-delay: 0.25s; }
.timeline-event:nth-child(4) { transition-delay: 0.35s; }
.timeline-event:nth-child(5) { transition-delay: 0.45s; }

/* Staggered reveal for deity cards */
.deity-card {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.deity-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.deity-card:nth-child(1) { transition-delay: 0.05s; }
.deity-card:nth-child(2) { transition-delay: 0.15s; }
.deity-card:nth-child(3) { transition-delay: 0.25s; }

/* Staggered reveal for artifacts */
.artifact {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.artifact.revealed {
    opacity: 1;
    transform: translateY(0);
}

.artifact:nth-child(1) { transition-delay: 0.05s; }
.artifact:nth-child(2) { transition-delay: 0.15s; }
.artifact:nth-child(3) { transition-delay: 0.25s; }

/* === Responsive === */
@media (max-width: 640px) {
    .hero-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .section-heading {
        font-size: 28px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .timeline-event {
        flex-direction: column;
        gap: 0.5rem;
    }

    .timeline-marker {
        min-width: auto;
    }

    .artifact {
        flex-direction: column;
    }

    .footer-nav {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .letterbox-photo {
        aspect-ratio: 16 / 9;
    }
}
