@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Noto+Serif+JP:wght@300;400;700&display=swap');

:root {
    --bg-washi: #FAF9F6;
    --bg-sumi: #1C1C1C;
    --bg-light-grey: #F0EFEA;
    --accent-urushi: #8B1C24;
    --accent-gold: #D4AF37;
    --text-primary: #222222;
    --text-secondary: #555555;
    --text-light: #EBEBEB;
    --border-color: #D6D5D0;
    --border-dark: #333333;
    
    --font-heading: 'Noto Serif JP', serif;
    --font-body: 'Inter', sans-serif;
    
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.8;
    color: var(--text-primary);
    background-color: var(--bg-washi);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Eliminate horizontal scrolling */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.3;
    color: inherit;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: var(--space-md); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); margin-bottom: var(--space-sm); }
h4 { font-size: clamp(1.25rem, 2vw, 1.75rem); margin-bottom: var(--space-sm); }

p { margin-bottom: var(--space-sm); }
a { color: var(--accent-urushi); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--text-primary); }

strong, b { font-weight: 600; }

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

section { padding: var(--space-xl) 0; }
.section-dark { background-color: var(--bg-sumi); color: var(--text-light); }
.section-light { background-color: var(--bg-light-grey); }

.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* Components */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.4s ease;
    border: none;
    background: none;
}

.btn-primary {
    background-color: var(--accent-urushi);
    color: #FFF;
    border: 1px solid var(--accent-urushi);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-urushi);
}

.btn-outline {
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
}

.section-dark .btn-outline {
    border-color: var(--text-light);
    color: var(--text-light);
}

.btn-outline:hover {
    background-color: var(--text-primary);
    color: var(--bg-washi);
}

.section-dark .btn-outline:hover {
    background-color: var(--text-light);
    color: var(--bg-sumi);
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background-color: var(--bg-washi);
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.4s ease, padding 0.4s ease;
}

.main-header.scrolled {
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.main-header.nav-up {
    transform: translateY(-100%);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
}
.logo span { color: var(--accent-urushi); }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 5px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-urushi);
    transition: width 0.3s ease;
}

.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-toggle span {
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Sections */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    background-color: var(--bg-sumi);
    color: var(--text-light);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    max-width: 900px;
    line-height: 1.1;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    max-width: 700px;
    margin-bottom: var(--space-md);
    opacity: 0.9;
}

/* Subpage Header */
.page-header {
    padding: calc(var(--space-xl) + 80px) 0 var(--space-lg) 0;
    background-color: var(--bg-light-grey);
    border-bottom: 1px solid var(--border-color);
}
.page-header h1 {
    max-width: 1000px;
}
.page-header p {
    font-size: 1.25rem;
    max-width: 800px;
    color: var(--text-secondary);
}

/* Shinto/Shoji Grid Style for Cards */
.shoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0;
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
}
.section-dark .shoji-grid {
    border-color: var(--border-dark);
}

.shoji-item {
    padding: var(--space-lg);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-washi);
    transition: background-color 0.3s ease;
}
.section-dark .shoji-item {
    border-color: var(--border-dark);
    background-color: var(--bg-sumi);
}

.shoji-item:hover {
    background-color: var(--bg-light-grey);
}
.section-dark .shoji-item:hover {
    background-color: #252525;
}

.shoji-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-urushi);
}
.section-dark .shoji-item h3 {
    color: var(--accent-gold);
}

/* Vertical Text (Japanese feel) */
.vertical-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-urushi);
}

/* Image with Caption */
.image-block {
    margin: var(--space-lg) 0;
}
.image-block img {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 700px;
    display: block;
}
.image-block figcaption {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-left: 2px solid var(--accent-urushi);
    padding-left: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.form-control {
    width: 100%;
    padding: 1rem;
    background-color: transparent;
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-urushi);
}
textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
.main-footer {
    background-color: var(--bg-sumi);
    color: var(--text-light);
    padding: var(--space-xl) 0 var(--space-md);
    border-top: 5px solid var(--accent-urushi);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #FFF;
    display: block;
    margin-bottom: 1rem;
}
.footer-logo span { color: var(--accent-urushi); }

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col a { color: var(--text-light); opacity: 0.7; }
.footer-col a:hover { opacity: 1; color: #FFF; }

.footer-bottom {
    border-top: 1px solid var(--border-dark);
    padding-top: var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root {
        --space-md: 1.5rem;
        --space-lg: 3rem;
        --space-xl: 5rem;
    }
    
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .shoji-grid { grid-template-columns: 1fr; border-left: none; }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-washi);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right 0.4s ease;
        z-index: 1000;
    }
    
    .main-nav.active { right: 0; }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .main-nav a {
        font-size: 1.5rem;
    }
    
    .mobile-toggle { display: flex; }
    .mobile-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    .footer-top { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

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