/* Base Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --transition: all 0.3s ease;
}

/* Hamburger toggle hidden on desktop */
.nav-toggle {
    display: none;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif JP', serif;
    font-weight: 500;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.6rem 0; /* tighter */
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0; /* remove default h1 margins */
}

/* image logo sizing */
.logo a {
    display: flex;
    align-items: center;
    height: 100px; /* larger */
    gap: 0.75rem; /* space between image and text logo */
}
.logo img {
    height: 100% !important;   /* ensure logo follows container height */
    width: auto !important;
    max-width: 420px !important; /* allow wider logo when height increases */
    display: block;
}

/* text logo next to the image */
.logo-text {
    font-weight: 700;
    letter-spacing: 2px;
    white-space: nowrap;
    line-height: 1;
    color: var(--dark-color);
    font-size: clamp(1.25rem, 2.5vw, 2rem);
}

@media (max-width: 480px) {
  .logo a { height: 84px; }
  header { padding: 0.75rem 0; }
}

nav ul {
    display: flex;
    gap: 1.5rem;
}

nav ul li a {
    font-size: 0.95rem;
    line-height: 1;
    padding: 0.1rem 0; /* reduce link vertical padding */
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
    background-color: transparent;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-title .jp {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 300;
    letter-spacing: 4px;
}

.hero-title .en {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: 8px;
    white-space: nowrap; /* prevent wrapping for 'Glass Mahalo' */
}

@media (max-width: 360px) {
  .hero-title .en {
    font-size: clamp(2rem, 9vw, 4.5rem); /* ensure it fits on very small screens */
  }
}

/* Section Styles */
section {
    padding: 8rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
}

/* About Section */
.about {
    background-color: white;
}

.about-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
}

.about-text {
    max-width: 600px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1.5rem;
}

/* Works Section */
.works {
    background-color: #f9f9f9;
    padding: 6rem 0;
    text-align: center;
}

.works .section-title {
    margin-bottom: 1.5rem;
}

.works-intro {
    max-width: 800px;
    margin: 0 auto 5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    position: relative;
}

.works-intro::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: var(--accent-color);
    margin: 2rem auto 0;
}

.intro-large {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.4;
    text-wrap: pretty; /* avoid awkward last-line widows in supported browsers */
}

.intro-sub {
    font-size: 1.2rem;
    color: #777;
    margin-bottom: 0;
}

/* Prevent line break for specific inline chunks */
.nb-end {
    white-space: nowrap;
    display: inline-block;
}

/* Feature Showcase */
.feature-showcase {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 6rem;
}

.feature-main {
    display: flex;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-main:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.feature-image {
    flex: 1;
    min-height: 400px;
    overflow: hidden;
    background: none;
    position: relative;
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* 画像を枠いっぱいに中央トリミング */
    object-position: center;
    display: block;
    vertical-align: middle;
}



.feature-content {
    flex: 1;
    padding: 3rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-content h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 1rem;
}

.feature-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

.feature-content p {
    color: #666;
    line-height: 1.8;
    font-size: 1.1rem;
}

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

.feature-item {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-item h4 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-item p {
    color: #666;
    line-height: 1.7;
    font-size: 1rem;
}

/* Gallery Preview */
.gallery-preview {
    margin-top: 6rem;
}

.gallery-preview h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
}

.gallery-preview h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
}

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

.gallery-item {
    height: 250px;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Works Message */
.works-message {
    max-width: 800px;
    margin: 6rem auto 0;
    padding: 3rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.works-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--accent-color);
}

.works-message p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.works-message .highlight {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 1.5rem;
    display: block;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .feature-main {
        flex-direction: column;
    }
    
    .feature-image {
        min-height: 300px;
    }
    
    .feature-content {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .works-intro {
        margin-bottom: 3rem;
    }
    
    .intro-large {
        font-size: 1.5rem;
    }
    
    .intro-sub {
        font-size: 1.1rem;
    }
    
    .works-message {
        padding: 2rem;
        margin-top: 4rem;
    }
}

@media (max-width: 576px) {
    .works {
        padding: 4rem 0;
    }
    
    .feature-content h3 {
        font-size: 1.5rem;
    }
    
    .works-message {
        padding: 1.5rem;
    }
}

/* Profile Section */
.profile {
    background-color: white;
}

.profile-content {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.profile-image {
    flex: 1;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    padding: 0;
    margin: 0;
    background: none;
}

.profile-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;      /* 枠いっぱいに表示（はみ出しは中央でトリミング） */
    object-position: center;/* 中央寄せ */
}

.profile-text {
    flex: 1;
}

.profile-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Two-person unified profile layout */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.person-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.person-image {
    width: 100%;
    height: 400px; /* same height for both */
    overflow: hidden;
}

.person-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.person-body {
    padding: 1.25rem 1.25rem 1.5rem;
}

.person-role {
    font-size: 1.25rem;
    margin: 0 0 1rem;
}

.staff-member {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 0.5rem;
}

.staff-member .staff-photo {
    width: 200px;   /* 代表画像(400px)の約半分 */
    height: 200px;  /* 代表画像(400px)の約半分 */
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.staff-member p {
    margin: 0;
}

.history {
    margin-bottom: 2rem;
}

.history li {
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.year {
    font-weight: 700;
    color: var(--accent-color);
    white-space: nowrap;
}

/* Contact Section */
.contact {
    background-color: #f9f9f9;
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.contact-button {
    display: inline-block;
    padding: 1rem 3rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: var(--transition);
}

.contact-button:hover {
    background-color: var(--dark-color);
    transform: translateY(-5px);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: row;      /* keep in one line to avoid tall header */
        gap: 0.75rem;
        padding: 0 1rem;          /* tighter side padding */
        align-items: center;
        justify-content: space-between;
    }
    /* hamburger button */
    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        width: 40px;
        height: 32px;
        background: transparent;
        border: 0;
        padding: 0;
        cursor: pointer;
        margin-left: auto; /* push toggle to the far right */
    }
    .nav-toggle .bar {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--dark-color);
        border-radius: 2px;
    }

    /* collapsed nav by default on mobile */
    header nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    header nav.is-open {
        max-height: 50vh; /* enough to show the list */
    }
    header nav ul {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem 1rem 1rem;
    }
    header nav ul li a {
        font-size: 0.95rem;
        line-height: 1.3;
        padding: 0.25rem 0;
    }
    .logo-text {
        display: none; /* hide text logo on small screens */
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .person-image {
        height: 300px; /* モバイル時は300pxの高さで維持 */
    }
    
    .about-content {
        flex-direction: column;
    }

    /* legacy staff layout not used anymore */
}

@media (max-width: 576px) {
    nav ul {
        gap: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Wide screens: keep the lead sentence on a single line */
@media (min-width: 1024px) {
    .works-intro {
        max-width: 1100px; /* widen so the sentence fits in one line */
    }
    .works-intro .intro-large {
        white-space: nowrap;
    }
}
