/* 
   Hanamoude Premium Design System 
   Focus: Tradition, Elegance, and Emotional Impact
*/

:root {
    --color-gold: #C5A059;
    --color-gold-light: #DBC291;
    --color-dark: #0F1012;
    --color-bg-light: #FBF9F6;
    --color-text-main: #1A1A1A;
    --color-text-sub: #555555;
    --font-serif: 'Shippori Mincho', 'Noto Serif JP', serif;
    --font-sans: 'Noto Sans JP', sans-serif;
    --transition-slow: all 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    --transition-mid: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    font-family: var(--font-sans);
    color: var(--color-text-main);
    background-color: #FFF;
    line-height: 2.0;
    letter-spacing: 0.08em;
    -webkit-font-smoothing: antialiased;
}

/* Background Texture */
.washi-texture {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("https://www.transparenttextures.com/patterns/natural-paper.png");
    opacity: 0.25;
    pointer-events: none;
    z-index: 9999;
}

/* Typography Extensions */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; }

.section { padding: 180px 0; position: relative; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.text-center { text-align: center; }
.text-gold { color: var(--color-gold); }
.bg-light { background-color: var(--color-bg-light); }
.bg-dark { background-color: var(--color-dark); color: #FFF; }

/* Header */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100px;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition-mid);
    background: transparent;
}

.header.scrolled {
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 30px rgba(0,0,0,0.05);
}

.header-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--color-gold);
    letter-spacing: 0.1em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.brand-logo-svg {
    width: 48px;
    height: 48px;
    transition: var(--transition-mid);
}

.logo:hover .brand-logo-svg {
    transform: rotate(15deg) scale(1.1);
}

.nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px; /* Reduced to prevent overlap with center logo */
}

.nav a {
    font-size: 0.9rem;
    font-family: var(--font-serif);
    color: var(--color-text-main);
    text-decoration: none;
    position: relative;
    padding-bottom: 5px;
    letter-spacing: 0.1em;
}

.header.scrolled .nav a {
    color: var(--color-text-main);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 0; height: 1px;
    background: var(--color-gold);
    transition: var(--transition-mid);
}

.nav a:hover::after { width: 100%; }

.btn-contact-nav {
    border: 1px solid var(--color-gold);
    padding: 12px 30px;
    color: var(--color-gold) !important;
    transition: var(--transition-mid);
}

.btn-contact-nav:hover {
    background: var(--color-gold);
    color: #FFF !important;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 100px; /* Space for the header */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: var(--color-bg-light);
    color: var(--color-text-main);
}

.hero-bg-light {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" opacity="0.03"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/></filter><rect width="200" height="200" filter="url(%23noise)"/></svg>');
    z-index: 1;
}

.hero-branch-bg {
    position: absolute;
    bottom: 0;
    left: 18%;
    width: 35vw;
    height: 65vh;
    max-width: 250px;
    max-height: 500px;
    background-image: url('reference-bg.jpg');
    background-size: 200% auto;
    background-position: left bottom;
    background-repeat: no-repeat;
    opacity: 0.95;
    z-index: 2;
    mix-blend-mode: multiply;
    pointer-events: none;
    animation: sway 15s ease-in-out infinite alternate;
    transform-origin: bottom left;
    mask-image: linear-gradient(to right, black 20%, transparent 52%);
    -webkit-mask-image: linear-gradient(to right, black 20%, transparent 52%);
}

@keyframes sway {
    0% { transform: rotate(-10deg) scale(1); }
    100% { transform: rotate(-12deg) scale(1.02); }
}

.hero-content {
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-center-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.hero-logo-row {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.hero-title-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-new-logo {
    width: 90px;
    height: 90px;
    color: var(--color-gold);
    animation: fadeIn 2s ease-out;
}

.hero-brand-name {
    font-size: 3.5rem;
    font-weight: 500;
    letter-spacing: 0.2em; /* Slightly reduced for left alignment */
    color: var(--color-gold);
    margin: 0;
    text-shadow: none;
}

.hero-brand-roman {
    font-size: 0.9rem;
    letter-spacing: 0.6em;
    color: var(--color-gold);
    margin: 5px 0 0 0;
}

.hero-tagline-vertical {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    letter-spacing: 0.8em;
    color: var(--color-text-main);
    font-weight: 400;
    line-height: 2.5;
    margin-top: 10px;
}

.hero-tagline-vertical span {
    display: inline-block;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.btn-scroll-down-dark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: var(--color-gold);
    text-decoration: none;
}

.btn-scroll-down-dark span {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    writing-mode: vertical-rl;
}

.btn-scroll-down-dark::after {
    content: '';
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-gold), transparent);
    position: relative;
}

/* Modern Concept Section */
.modern-philosophy-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 80px;
    padding: 80px 0;
}

.modern-philosophy-header {
    flex: 0 0 200px;
    position: sticky;
    top: 150px;
}

.modern-section-title {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modern-section-title .en {
    font-size: 0.9rem;
    letter-spacing: 0.4em;
    color: var(--color-gold);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.modern-section-title .jp {
    font-size: 2.2rem;
    font-family: var(--font-serif);
    color: var(--color-text-main);
    letter-spacing: 0.1em;
}

.modern-philosophy-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 100px;
}

.modern-purpose {
    padding-top: 10px;
}

.modern-enlightened {
    font-family: var(--font-serif);
    font-size: 3.2rem;
    line-height: 1.6;
    color: var(--color-text-main);
    letter-spacing: 0.05em;
}

.modern-mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.modern-mv-card {
    background: #FFF;
    padding: 60px 50px;
    border-radius: 8px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.04);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border-top: 3px solid var(--color-gold);
    position: relative;
    overflow: hidden;
}

.modern-mv-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(197, 160, 89, 0.03) 100%);
    pointer-events: none;
}

.modern-mv-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.mv-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    color: var(--color-gold);
    letter-spacing: 0.2em;
    margin-bottom: 25px;
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.mv-title span {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--color-text-sub);
    letter-spacing: 0.1em;
}

.mv-desc {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--color-text-main);
    letter-spacing: 0.05em;
}

/* About Section */
.about-flex {
    display: flex;
    align-items: center;
    gap: 80px;
}

.about-image-wrapper {
    flex: 1;
    position: relative;
}

.about-image-main {
    position: relative;
    z-index: 2;
    border: 15px solid #FFF;
    box-shadow: 0 40px 100px rgba(0,0,0,0.1);
}

.about-image-sub {
    position: absolute;
    top: -40px; left: -40px;
    width: 100%; height: 100%;
    border: 1px solid var(--color-gold);
    z-index: 1;
}

.about-text-content {
    flex: 1;
}

.value-tags {
    margin-top: 40px;
    display: flex;
    gap: 20px;
}

.value-tags span {
    font-size: 0.85rem;
    color: var(--color-gold);
    background: var(--color-bg-light);
    padding: 8px 20px;
    border-radius: 50px;
}

/* Value Grid */
.value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 80px;
}

.value-item {
    background: rgba(255,255,255,0.03);
    padding: 60px 40px;
    border: 1px solid rgba(197, 160, 89, 0.1);
    transition: var(--transition-mid);
}

.value-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--color-gold);
    transform: translateY(-15px);
}

.value-num {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--color-gold);
    opacity: 0.4;
    margin-bottom: 20px;
}

.value-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    letter-spacing: 0.1em;
}

/* Gallery Container */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 400px;
    gap: 20px;
    margin-top: 60px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.gallery-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #FFF;
    opacity: 0;
    transition: var(--transition-mid);
}

.gallery-item:hover img { transform: scale(1.1); }
.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-shrine {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    letter-spacing: 0.2em;
}

/* CTA Section */
.cta-section {
    padding: 120px 0;
    background: #FFF;
}

.cta-title {
    font-size: 3.5rem;
    margin-bottom: 50px;
    line-height: 1.4;
}

.cta-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.qr-btn-inline {
    border: 1px solid #DDD;
    padding: 20px 40px;
    cursor: pointer;
    font-family: var(--font-serif);
    transition: var(--transition-mid);
}

.qr-btn-inline:hover { border-color: var(--color-gold); color: var(--color-gold); }

/* Contact Box */
.contact-box {
    max-width: 900px;
    margin: 0 auto;
    background: #FFF;
    padding: 80px;
    box-shadow: 0 50px 100px rgba(0,0,0,0.05);
}

.contact-form { margin-top: 50px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.form-group { margin-bottom: 30px; }
.form-group label { display: block; font-size: 0.85rem; color: #888; margin-bottom: 10px; }
.form-group input, .form-group textarea {
    width: 100%; padding: 15px; border: 1px solid #EEE; background: #F9F9F9;
    font-family: inherit; font-size: 1rem; transition: var(--transition-mid);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--color-gold); background: #FFF;
}

.btn-submit {
    width: 100%; background: var(--color-dark); color: #FFF; border: none;
    padding: 25px; font-family: var(--font-serif); font-size: 1.2rem;
    cursor: pointer; transition: var(--transition-mid); letter-spacing: 0.2em;
}

.btn-submit:hover { background: var(--color-gold); letter-spacing: 0.3em; }

/* Animations */
.fade-in, .fade-in-up { opacity: 0; }
.fade-in.visible { animation: fadeIn 1.5s forwards; }
.fade-in-up.visible { animation: fadeInUp 1.2s forwards; }

@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .hero-main-title h1 { font-size: 4.5rem; }
    .hero-vertical-text { font-size: 1.5rem; margin-right: 30px; }
    .modern-philosophy-wrapper { flex-direction: column; gap: 50px; padding: 60px 0; }
    .modern-philosophy-header { position: static; flex: auto; }
    .modern-philosophy-content { gap: 60px; }
    .modern-enlightened { font-size: 2.5rem; }
    .modern-mission-vision { grid-template-columns: 1fr; gap: 30px; }
    .value-grid { grid-template-columns: 1fr; }
    .gallery-container { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
    .gallery-item.large { grid-column: span 2; }
}

@media (max-width: 768px) {
    .header { height: 70px; }
    .hero-content { flex-direction: column; }
    .hero-vertical-text { writing-mode: horizontal-tb; margin-right: 0; margin-bottom: 20px; font-size: 1.2rem; }
    .hero-main-title h1 { font-size: 3.5rem; text-align: center; }
    .about-flex { flex-direction: column; }
    .modern-enlightened { font-size: 2rem; }
    .modern-mv-card { padding: 40px 30px; }
    .section { padding: 100px 0; }
    .cta-title { font-size: 2.2rem; }
    .cta-btns { flex-direction: column; }
    .contact-box { padding: 40px 20px; }
    .form-row { grid-template-columns: 1fr; }
}

/* Hamburger & Nav */
.hamburger { display: none; cursor: pointer; z-index: 1100; position: relative; width: 30px; height: 20px; }
.hamburger span { display: block; position: absolute; height: 1px; width: 100%; background: var(--color-gold); transition: .4s; }
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }
.hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav {
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
        background: #FFF; transition: .5s; display: flex; align-items: center; justify-content: center;
    }
    .nav.active { right: 0; }
    .nav ul { flex-direction: column; gap: 40px; text-align: center; }
    .nav a { font-size: 1.5rem; }
}

/* QR Modal */
.qr-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 2000; display: none; align-items: center; justify-content: center;
}
.qr-modal.active { display: flex; }
.qr-modal-content { background: #FFF; padding: 40px; position: relative; text-align: center; }
.qr-close { position: absolute; top: 10px; right: 10px; cursor: pointer; font-size: 1.5rem; }
