/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600&family=Zen+Kaku+Gothic+New:wght@300;400;500&display=swap');

:root {
    /* Color Palette - Light Chic Wabi-Sabi */
    --color-bg-primary: #FFFFFF;
    /* Bright white */
    --color-bg-secondary: #F8F8F8;
    /* Very subtle off-white for sections */
    --color-accent: #8EAA75;
    /* Slightly darker Wabi Green for better contrast on white */
    --color-text-primary: #333333;
    /* Dark charcoal for readability */
    --color-text-secondary: #666666;
    /* Medium grey */
    --color-border: #E0E0E0;
    /* Light border */

    /* Typography */
    --font-heading: 'Cormorant Garamond', serif;
    /* Elegant, classic */
    --font-body: 'Zen Kaku Gothic New', sans-serif;
    /* Clean, modern Japanese support */

    /* Spacing */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

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

body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.8;
    overflow-x: hidden;
}

:lang(zh-CN) {
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    line-height: 1.3;
    letter-spacing: 0.05em;
    font-weight: 400;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

img {
    max-width: 100%;
    display: block;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Slightly darker */
    z-index: 9999;
    /* Higher z-index */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 900px;
    /* Increased from 600px */
    background: var(--color-bg-primary);
    z-index: 10000;
    /* Higher z-index */
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    padding: 0;
    /* Remove default padding, handle in sections */
}

/* Close button positioning adjustment */
.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text-primary);
    z-index: 1;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--color-accent);
}

.modal-header {
    display: grid;
    grid-template-columns: 250px 1fr;
    /* Larger image area */
    gap: 3rem;
    padding: 4rem;
    background: var(--color-bg-secondary);
    /* Distinct header background */
    align-items: center;
}

@media (max-width: 768px) {
    .modal-header {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 3rem 2rem;
        gap: 2rem;
    }
}

.modal-photo {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    /* Make it circular */
    overflow: hidden;
    background: #e0e0e0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-role {
    color: var(--color-accent);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.modal-body {
    padding: 4rem;
}

@media (max-width: 768px) {
    .modal-body {
        padding: 2rem;
    }
}

.modal-section {
    margin-bottom: 2.5rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h5 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
}

.modal-section p {
    line-height: 1.8;
    color: var(--color-text-secondary);
    font-size: 1.05rem;
}

/* Layout Utils */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    background-color: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-desktop {
    display: flex;
    align-items: center;
}

.nav-desktop ul {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-desktop a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.75)), url('../images/hero-bg.jpg');
    /* Placeholder clean Japanese room */
    background-size: cover;
    background-position: center;
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: var(--spacing-sm);
}

.hero p {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--spacing-md);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--color-accent);
    color: var(--color-bg-primary);
    border-color: var(--color-accent);
}

/* Features/Services Preview */
.services-preview {
    background-color: var(--color-bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
    position: relative;
    display: block;
    /* changed from inline-block */
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background-color: var(--color-accent);
    margin: var(--spacing-sm) auto 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.card {
    background: #FFFFFF;
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-accent);
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.team-member {
    text-align: center;
}

.team-member h4 {
    font-size: 1.2rem;
    margin-top: var(--spacing-sm);
}

.team-member p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* Footer */
footer {
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-content h4 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-accent);
}

.social-links {
    margin-top: var(--spacing-md);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
        /* Add mobile menu later */
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Service Images */
.service-image-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.service-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-block:hover .service-image-container img {
    transform: scale(1.05);
}

/* Social Links in Footer */
.social-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.social-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    border-bottom: 1px solid transparent;
}

.social-links a:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* Language Switcher */
.lang-switch {
    display: flex;
    gap: 1rem;
    margin-left: 2rem;
    align-items: center;
}

.lang-switch a {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.lang-switch a:hover,
.lang-switch a.active {
    color: var(--color-accent);
}

.lang-switch span {
    color: var(--color-border);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1002;
    padding: 10px;
}

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

/* Mobile Menu Container */
.nav-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s ease;
    padding: 2rem;
}

.nav-mobile.active {
    right: 0;
}

.nav-mobile ul {
    list-style: none;
    text-align: center;
    margin-bottom: 2rem;
}

.nav-mobile li {
    margin-bottom: 2rem;
}

.nav-mobile a {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-mobile .lang-switch {
    margin-left: 0;
    justify-content: center;
    margin-top: 1rem;
}

/* Hamburger Animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}


/* Responsive Layout Adjustments */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .section-title {
        font-size: 2rem;
    }

    .grid-3 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .modal-header {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem;
        gap: 1.5rem;
    }

    .modal-photo {
        width: 150px;
        margin: 0 auto;
    }

    .container {
        padding: 0 1.5rem;
    }

    .section {
        padding: 4rem 0;
    }
}

/* Team Photo Individual Adjustments */
.member-photo-container,
.modal-photo {
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 50%;
    margin: 0 auto 1rem;
    width: 180px;
    /* Enforce a reasonable size for team grid */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.member-photo-container img,
.modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 個別調整クラス */
.photo-amanda img {
    object-position: center 20%;
    transform: scale(1.3);
}

.photo-shota img {
    object-position: center 15%;
    transform: scale(1.2);
}

.photo-sarah img {
    object-position: center 20%;
    transform: scale(1.6);
}

.photo-ryota img {
    object-position: center 15%;
    transform: scale(1.4);
}