:root {
    --color-bg-dark: #0f1b26; /* Kachi-iro (Victory Indigo) */
    --color-bg-paper: #f4f1e8; /* Washi color */
    --color-text-light: #e0e0e0; /* Silver Gray */
    --color-text-dark: #2b2b2b; /* Sumi Ink */
    --color-accent: #c5a059; /* Muted Gold */
    --font-main: 'Shippori Mincho', serif;
    --font-display: 'Zen Old Mincho', serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    line-height: 2.0;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 1s ease;
}

body.loaded {
    opacity: 1;
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
}

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.2em;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/hero.png');
    background-size: cover;
    background-position: center;
    filter: brightness(0.6);
    z-index: -1;
    transform: scale(1.1);
    animation: slowZoom 20s infinite alternate;
}

@keyframes slowZoom {
    from { transform: scale(1.1); }
    to { transform: scale(1.2); }
}

.hero-content {
    z-index: 1;
    text-align: center;
    /* For vertical text centering */
    display: flex;
    flex-direction: row-reverse;
    gap: 2rem;
    align-items: flex-start;
}

.hero h1 {
    font-size: 4rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    height: 60vh;
}

.hero .subtitle {
    writing-mode: vertical-rl;
    font-size: 1.2rem;
    opacity: 0.8;
    margin-top: 2rem;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background-color: var(--color-text-light);
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Sections */
.section-padding {
    padding: 8rem 2rem;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.bg-washi {
    background-color: var(--color-bg-paper);
    background-image: url('assets/washi.png');
    background-blend-mode: multiply;
    color: var(--color-text-dark);
}

.bg-dark {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
}

/* Text Styles */
.section-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    display: inline-block;
}

.center-title {
    text-align: center;
    width: 100%;
    display: block;
    margin-bottom: 3rem;
}

.gold-text {
    color: var(--color-accent);
}

.dark-text {
    color: var(--color-text-dark);
}

.body-text {
    font-size: 1.1rem;
    line-height: 2.2;
    text-align: justify;
}

.text-center {
    text-align: center;
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 4rem;
}

/* Layouts */
.flex-row {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.col-text {
    flex: 1;
    display: flex;
    flex-direction: row-reverse;
    gap: 2rem;
}

.col-img {
    flex: 1;
}

.shadow-img {
    width: 100%;
    height: auto;
    box-shadow: 10px 10px 30px rgba(0,0,0,0.2);
    border-radius: 4px;
}

/* Cards */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: rgba(255,255,255,0.05);
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h3 {
    color: var(--color-accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.card-img {
    width: 100%;
    margin-top: 1rem;
    border-radius: 4px;
    opacity: 0.8;
}

/* Note Box */
.note-box {
    margin-top: 4rem;
    padding: 1.5rem;
    border-left: 2px solid var(--color-accent);
    background: rgba(0,0,0,0.2);
    font-size: 0.9rem;
    color: #aaa;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #ccc; /* Border color */
    margin-top: 2rem;
    border: 1px solid #ccc;
}

.gallery-item {
    background: var(--color-bg-paper);
    padding: 3rem 1rem;
    text-align: center;
    transition: background 0.3s;
    writing-mode: vertical-rl;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.gallery-item:hover {
    background: #fff;
}

.gallery-label {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-text-dark);
}

.gallery-desc {
    font-size: 0.9rem;
    color: #666;
}

/* Footer */
.footer {
    padding: 4rem 0;
    text-align: center;
    background: #0a1219;
}

.footer-msg {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.copyright {
    font-size: 0.8rem;
    color: #555;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

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

.delay-1 { transition-delay: 0.3s; }

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-text {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-accent);
    letter-spacing: 0.5em;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .text-center {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .reverse-mobile {
        flex-direction: column-reverse;
    }
    
    .col-text {
        flex-direction: column;
        writing-mode: horizontal-tb;
    }
    
    .vertical-text {
        writing-mode: horizontal-tb;
        letter-spacing: 0.1em;
    }
    
    .section-title {
        margin-bottom: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        writing-mode: horizontal-tb;
        padding: 2rem;
        flex-direction: column;
    }
}

/* Tegawari List */
.tegawari-list {
    list-style: none;
    margin: 1.5rem 0;
    padding-left: 1rem;
    border-left: 1px solid rgba(0,0,0,0.2);
}

.tegawari-list li {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.8;
}

.tegawari-list li span {
    font-weight: bold;
    color: #555;
    display: inline-block;
    margin-right: 0.5rem;
}
