/* Global Styles */
:root {
    --text-color: #000;
    --bg-color: #fff;
    --gray-light: #f5f5f5;
    --gray-medium: #888;
    --accent-color: #000;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --container-width: 1200px;
    --header-height: 80px;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Header */
.header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 24px;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-list a {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-black {
    background-color: #000;
    color: #fff;
}

.btn-black:hover {
    background-color: #333;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 100px;
}

.hero-title {
    font-size: 80px;
    line-height: 1.1;
    margin-bottom: 40px;
    letter-spacing: -2px;
}

.hero-text {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 60px;
    max-width: 800px;
}

.hero-divider {
    height: 1px;
    width: 60px;
    background-color: #000;
    margin: 80px 0;
}

.hero-description-block {
    font-size: 20px;
    color: #333;
    max-width: 900px;
    line-height: 2.2;
    font-weight: 500;
}

.story-title {
    font-size: 48px;
    margin-bottom: 50px;
    letter-spacing: -0.5px;
}

.story-lead {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 50px;
}

.hero-description-block p {
    margin-bottom: 50px;
}

/* Section Common */
.section-title {
    font-size: 40px;
    margin-bottom: 60px;
    letter-spacing: -1px;
}

/* Program Section */
.program {
    padding: 100px 0;
    background-color: #ffffff;
}

.program-list {
    display: flex;
    flex-direction: row;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.program-item {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: #eeeeee;
    padding: 60px 40px;
    height: 320px;
    border-radius: 16px;
    border: none;
}

.program-item:hover {
    transform: translateY(-4px);
    background: #e2e2e2;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.program-item-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.program-item-title-ja {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.4;
    color: #000000;
}

.program-item-subtitle-en {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #777777;
    text-transform: uppercase;
}

.program-item-icon {
    position: absolute;
    right: 24px;
    bottom: 24px;
}

.program-plus-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #000000;
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    font-weight: 300;
    transition: all 0.3s ease;
}

.program-item:hover .program-plus-circle {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .program-list {
        flex-direction: column;
        gap: 24px;
    }
    
    .program-item {
        height: 260px;
        padding: 40px 20px;
    }
}

/* Gallery Section - Vertical Dynamic Layout */
.gallery {
    padding: 150px 0;
    background-color: #fff;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    column-count: 4;
    column-gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    break-inside: avoid;
    margin-bottom: 20px;
}

.gallery-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item.is-visible:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    z-index: 2;
}

.gallery-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    filter: brightness(0.95);
}

.gallery-img.p-portrait { aspect-ratio: 3/4; }
.gallery-img.p-landscape { aspect-ratio: 4/3; }
.gallery-img.p-tall { aspect-ratio: 9/16; }
.gallery-img.p-square { aspect-ratio: 1/1; }

.gallery-item:hover .gallery-img {
    transform: scale(1.08) rotate(1deg);
    filter: brightness(1.1);
}

@media (max-width: 1024px) {
    .gallery-container {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        column-count: 2;
        column-gap: 16px;
        padding: 0 20px;
    }
    
    .gallery-item {
        margin-bottom: 16px;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        column-count: 1;
    }
}

/* CTA Section */
.cta {
    padding: 150px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.cta-title {
    font-size: 48px;
    margin-bottom: 30px;
    line-height: 1.3;
}

.cta-text {
    font-size: 16px;
    margin-bottom: 40px;
    line-height: 2;
}

.cta-btn {
    padding: 15px 40px;
    font-size: 16px;
}

.cta-decoration-left,
.cta-decoration-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    height: 200px;
    z-index: 1;
    opacity: 0.8;
}

.cta-decoration-left {
    left: 100px;
}

.cta-decoration-right {
    right: 100px;
}

/* Company Info Section */
.company-info {
    padding: 100px 0;
    background-color: var(--gray-light);
}

.company-table {
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid #ddd;
}

.table-row {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
}

.row-label {
    width: 200px;
    font-weight: 700;
    font-size: 14px;
    color: #333;
}

.row-value {
    flex: 1;
    font-size: 14px;
    color: #666;
}

@media (max-width: 768px) {
    .table-row {
        flex-direction: column;
        gap: 8px;
    }

    .row-label {
        width: 100%;
    }
}

/* Footer */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid #eee;
}

.footer-container {
    display: flex;
    justify-content: space-between;
}

.footer-logo a {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 900;
    letter-spacing: -2px;
}

.footer-links {
    display: flex;
    gap: 100px;
}

.footer-column h4 {
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    font-size: 14px;
    color: #666;
}

.footer-column ul li a:hover {
    color: #000;
}

/* Contact Form Styles */
.contact-form {
    background: #fff;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
    color: #333;
}

.required {
    color: #ff4d4d;
    font-size: 11px;
    padding: 2px 6px;
    background: #fff0f0;
    border-radius: 4px;
    margin-left: 5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000;
}

.radio-group {
    display: flex;
    gap: 30px;
    padding: 10px 0;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500 !important;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #000;
}

.copyright {
    margin-top: 40px;
    font-size: 12px;
    color: #999;
}

/* Theme Dark Styles */
.theme-dark {
    background-color: #111;
    color: #fff;
}

.story {
    padding: 150px 0;
    position: relative;
    overflow: hidden;
}

.story-background-text {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(10vw, -50%);
    font-size: 25vw;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    z-index: 0;
    font-family: var(--font-heading);
    pointer-events: none;
    letter-spacing: -5px;
}

.theme-dark .hero-divider {
    background-color: #fff;
}

.theme-dark .hero-description-block {
    color: #fff;
}

.theme-dark .story-title {
    color: #fff;
}

.theme-dark .section-title {
    color: #fff;
}

.gallery.theme-dark {
    background-color: #111;
}

.company-info.theme-dark {
    background-color: #111;
}

.theme-dark .row-label {
    color: #fff;
}

.theme-dark .row-value {
    color: #ccc;
}

.theme-dark .table-row {
    border-bottom: 1px solid #333;
}

.theme-dark .company-table {
    border-top: 1px solid #333;
}

footer.theme-dark {
    background-color: #111;
    border-top: none;
}

.theme-dark .footer-logo a {
    color: #fff;
}

.theme-dark .footer-column h4 {
    color: #fff;
}

.theme-dark .footer-column ul li a {
    color: #ccc;
}

.theme-dark .footer-column ul li a:hover {
    color: #fff;
}

/* Official Note Section */
.news {
    padding: 100px 0;
    background-color: #fff;
}

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

.news .section-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 50px;
    color: #000;
    font-family: 'Inter', sans-serif;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.news-image-wrapper {
    width: 100%;
    aspect-ratio: 1.5; /* 3:2 */
    overflow: hidden;
    border-bottom: 1px solid #f0f0f0;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
    color: #1e293b;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 72px; /* 3行分の高さを固定してカードの高さを揃える */
}

.news-date {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 24px 0;
    font-family: 'Inter', sans-serif;
}

.news-link {
    font-size: 12px;
    font-weight: 800;
    color: #000;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-top: auto;
}

.news-link:hover {
    color: #ff4d4d;
}

/* Note button styling */
.note-btn-wrapper .btn-black {
    background-color: #000;
    color: #fff;
    padding: 14px 36px;
    font-size: 14px;
    font-weight: 800;
    border-radius: 9999px;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.note-btn-wrapper .btn-black:hover {
    opacity: 0.8;
}


/* Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
    }

    .nav {
        display: none;
        /* simple hide for now */
    }

    .hero-title {
        font-size: 48px;
    }

    .program-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .program-item-image {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        margin-right: 0;
    }



    .news-grid {
        grid-template-columns: 1fr;
    }

    .cta-decoration-left,
    .cta-decoration-right {
        display: none;
    }

    .footer-container {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        flex-direction: column;
        gap: 40px;
    }
}
