/* Reset & Base */
:root {
    --yuiwa-black: #0d0d0d;
    --yuiwa-gold: #c5a059;
    --yuiwa-pearl: #f9f8f4;
    --yuiwa-gray: #f0f0f0;
    --text-color: #333;
    --text-light: #666;
}

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

body {
    font-family: 'Shippori Mincho', serif;
    background-color: var(--yuiwa-pearl);
    color: var(--text-color);
    line-height: 1.8;
    padding-top: 110px; /* Header height + Nav height adjustment */
}

@media (min-width: 768px) {
    body { padding-top: 0; }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* Offset for fixed header */
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.container.narrow {
    max-width: 800px;
}

.block { display: block; }

/* Ruby */
ruby { ruby-position: over; }
rt { font-size: 0.6em; color: var(--yuiwa-gold); font-weight: normal; }

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(249, 248, 244, 0.95);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px; /* Mobile header height */
}

@media (min-width: 768px) {
    .header-container { height: 80px; }
}

.header-logo { font-size: 20px; font-weight: bold; letter-spacing: 0.1em; }
@media (min-width: 768px) { .header-logo { font-size: 24px; } }

/* Navigation */
.header-nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background-color: rgba(249, 248, 244, 0.98);
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Hide scrollbar for Chrome, Safari and Opera */
.header-nav::-webkit-scrollbar { display: none; }
/* Hide scrollbar for IE, Edge and Firefox */
.header-nav { -ms-overflow-style: none;  scrollbar-width: none; }

.nav-container {
    display: flex;
    white-space: nowrap;
    padding: 0 20px;
    height: 50px;
    align-items: center;
}

.header-nav a {
    display: inline-block;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    letter-spacing: 0.05em;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
    line-height: 48px; /* Vertically center text */
}

.header-nav a:hover {
    color: var(--yuiwa-gold);
}

@media (min-width: 768px) {
    .header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .header-container {
        width: auto;
        flex-grow: 1;
        padding-right: 0; /* Reset */
    }

    .header-nav {
        width: auto;
        background: none;
        border: none;
        overflow: visible;
        position: absolute;
        top: 0;
        right: 180px; /* Space for contact button */
        height: 80px;
        display: flex;
        align-items: center;
    }

    .nav-container {
        padding: 0;
        height: auto;
        gap: 32px;
    }

    .header-nav a {
        padding: 0;
        line-height: normal;
        border: none;
    }
}

.header-contact-btn {
    padding: 8px 16px;
    background-color: var(--yuiwa-black);
    color: var(--yuiwa-pearl);
    font-size: 12px;
    transition: background-color 0.3s;
    border-radius: 2px;
}
.header-contact-btn:hover { background-color: var(--yuiwa-gold); }

@media (min-width: 768px) {
    .header-contact-btn {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        padding: 10px 24px;
        font-size: 14px;
    }
}

/* Hero */
.hero {
    position: relative;
    height: 100vh; /* Fallback */
    height: 100dvh; /* Dynamic viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: -110px; /* Counteract body padding */
    padding-top: 110px;
}
@media (min-width: 768px) {
    .hero { margin-top: 0; padding-top: 0; }
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1623836878378-015d86221447?q=80&w=2574&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}
.hero-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
@media (min-width: 768px) {
    .hero-container { flex-direction: row; text-align: left; }
}
.hero-catchphrase {
    writing-mode: vertical-rl;
    font-size: 36px;
    font-weight: bold;
    letter-spacing: 0.2em;
    line-height: 1.8;
    height: 384px;
    border-left: 1px solid rgba(197, 160, 89, 0.5);
    padding-left: 32px;
    margin-left: 32px;
    order: 2;
}
@media (max-width: 767px) {
    .hero-catchphrase {
        writing-mode: horizontal-tb;
        height: auto;
        border: none;
        padding: 0;
        margin: 0 0 24px 0;
        font-size: 24px;
        line-height: 1.6;
        order: 2;
    }
}
.hero-title-group { order: 1; margin-bottom: 48px; }
@media (min-width: 768px) {
    .hero-title-group { order: 1; margin-bottom: 0; margin-right: 96px; }
}
.hero-subtitle { color: var(--yuiwa-gold); font-size: 18px; margin-bottom: 16px; letter-spacing: 0.1em; }
.hero-title { font-size: 60px; font-weight: bold; margin-bottom: 24px; }
.hero-description { font-size: 14px; line-height: 2; color: var(--text-light); }
.hero-scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--yuiwa-gold);
}
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); } 40% { transform: translate(-50%, -15px); } 60% { transform: translate(-50%, -5px); } }

/* Section */
.section { padding: 100px 0; }
.section-alt { background-color: white; }
.section-title { text-align: center; margin-bottom: 64px; }
.section-title.left { text-align: left; }
.section-subtitle { display: block; color: var(--yuiwa-gold); font-size: 14px; letter-spacing: 0.1em; margin-bottom: 8px; }
.section-title h2 { font-size: 32px; font-weight: bold; }
.section-note { text-align: center; margin-top: 48px; font-size: 14px; color: var(--text-light); }

/* Grids */
.grid-3 { display: grid; gap: 48px; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (min-width: 768px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.grid-2 { display: grid; gap: 48px; align-items: center; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

/* Cards */
.card {
    padding: 32px;
    background-color: var(--yuiwa-pearl);
    border: 1px solid rgba(197, 160, 89, 0.2);
    text-align: center;
    transition: box-shadow 0.3s;
}
.card:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.card-title { font-size: 20px; font-weight: bold; margin-bottom: 16px; }
.card p { font-size: 14px; color: var(--text-light); }

.item-card {
    aspect-ratio: 1 / 1;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--yuiwa-gray);
    transition: border-color 0.3s;
    cursor: default;
}
.item-card:hover { border-color: var(--yuiwa-gold); }
.item-card span { font-size: 18px; font-weight: 500; transition: color 0.3s; }
.item-card:hover span { color: var(--yuiwa-gold); }

/* Flow */
.flow-steps { display: grid; gap: 32px; }
@media (min-width: 768px) { .flow-steps { grid-template-columns: repeat(4, 1fr); } }
.flow-step { position: relative; padding: 24px; border-left: 2px solid rgba(197, 160, 89, 0.3); }
.flow-step::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 24px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--yuiwa-gold);
    border: 4px solid white;
}
.flow-step-number {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 48px;
    font-weight: bold;
    color: var(--yuiwa-gray);
    z-index: -1;
}
.flow-step h3 { font-size: 20px; font-weight: bold; margin-bottom: 8px; }
.flow-step p { font-size: 14px; color: var(--text-light); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 24px; }
.faq-item { background-color: white; padding: 24px; border: 1px solid var(--yuiwa-gray); }
.faq-item h3 { font-weight: bold; margin-bottom: 12px; display: flex; }
.faq-q { color: var(--yuiwa-gold); margin-right: 12px; }
.faq-a { color: var(--text-light); margin-right: 12px; }
.faq-item p { font-size: 14px; color: var(--text-light); padding-left: 30px; }

/* Company & Access */
.company-info { font-size: 14px; line-height: 2.2; }
.company-info strong { display: inline-block; width: 80px; }
.license { font-size: 12px; color: var(--text-light); margin-top: 16px; }
.map-placeholder {
    height: 320px;
    background-color: var(--yuiwa-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

/* Contact */
.section-contact {
    padding: 100px 0;
    background-color: var(--yuiwa-black);
    color: var(--yuiwa-pearl);
}
.section-contact .section-title p { color: #aaa; font-size: 14px; }
.contact-form {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 48px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.contact-form label { display: block; font-size: 12px; letter-spacing: 0.1em; margin-bottom: 8px; }
.contact-form input, .contact-form textarea {
    width: 100%;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #666;
    padding: 8px 0;
    color: white;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-bottom-color: var(--yuiwa-gold);
}
.form-submit { text-align: center; margin-top: 24px; }
.form-submit button {
    padding: 12px 48px;
    background-color: var(--yuiwa-gold);
    color: var(--yuiwa-black);
    border: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}
.form-submit button:hover { background-color: white; }

/* Footer */
.footer {
    background-color: var(--yuiwa-black);
    color: #888;
    padding: 48px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    text-align: center;
}

/* Sticky Footer */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: var(--yuiwa-black);
    border-top: 1px solid rgba(197, 160, 89, 0.3);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
}
@media (min-width: 768px) { .sticky-footer { display: none; } }
.sticky-footer-text { color: var(--yuiwa-pearl); }
.sticky-footer-text p:first-child { font-size: 12px; color: #aaa; }
.phone-number { font-weight: bold; font-size: 18px; }
.sticky-footer-btn {
    background-color: var(--yuiwa-gold);
    color: var(--yuiwa-black);
    padding: 10px 24px;
    font-weight: bold;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

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