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

body {
    font-family: 'Noto Serif JP', 'Times New Roman', serif;
    color: #333;
    line-height: 1.8;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Opening Animation */
.opening {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeOut 0.8s ease 2.5s forwards;
}

.opening-text {
    color: #fff;
    font-size: 72px;
    letter-spacing: 8px;
    font-weight: 300;
    opacity: 0;
    animation: textFadeIn 1.5s ease 0.5s forwards;
}

@keyframes textFadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    to { opacity: 0; pointer-events: none; }
}

body.loading {
    overflow: hidden;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #333;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    letter-spacing: 1.5px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #c9a961;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: #333;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #f5f5f0 0%, #e8e8dc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 80px;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 245, 240, 0.5);
    z-index: 1;
}

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

.hero-number {
    font-size: 120px;
    font-weight: 300;
    color: rgba(201, 169, 97, 0.3);
    margin-bottom: -40px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    letter-spacing: 8px;
    font-weight: 400;
}

.hero p {
    font-size: 18px;
    color: #666;
    letter-spacing: 2px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    font-size: 12px;
    letter-spacing: 2px;
    animation: bounce 2s infinite;
    z-index: 2;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Section Styles */
section {
    padding: 100px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 36px;
    margin-bottom: 20px;
    letter-spacing: 4px;
    font-weight: 400;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 60px;
    line-height: 1.8;
}

/* About Section */
#about {
    background: #fff;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 60px;
}

.about-text h3 {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 400;
    letter-spacing: 2px;
}

.about-text p {
    margin-bottom: 30px;
    color: #555;
}

/* Typewriter Animation */
.typewriter-container {
    overflow: hidden;
}

.typewriter-line {
    opacity: 0;
    transform: translateY(20px);
}

.typewriter-line.visible {
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-image {
    background: #f5f5f0;
    min-height: 400px;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.about-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Works Section */
#works {
    background: #f9f9f5;
}

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

.work-item {
    background: #fff;
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid #e8e8dc;
}

.work-item:hover {
    transform: translateY(-10px);
}

.work-number {
    font-size: 48px;
    color: #c9a961;
    margin-bottom: 20px;
    font-weight: 300;
}

.work-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.work-item p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

/* Company Section */
#company {
    background: #fff;
}

/* Awards Section */
#awards {
    background: #f9f9f5;
}

/* News Section */
#news {
    background: #f9f9f5;
}

.news-slider-container {
    position: relative;
    margin-top: 60px;
    overflow: hidden;
}

.news-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 20px;
    scrollbar-width: none;
}

.news-slider::-webkit-scrollbar {
    display: none;
}

.news-item {
    min-width: 350px;
    background: #fff;
    border: 1px solid #e8e8dc;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s;
    cursor: pointer;
}

.news-item:hover {
    transform: translateY(-10px);
}

.news-image {
    width: 100%;
    height: 250px;
    background: #e8e8dc;
    object-fit: cover;
}

.news-content {
    padding: 30px;
}

.news-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.news-category {
    display: inline-block;
    background: #c9a961;
    color: #fff;
    padding: 4px 12px;
    font-size: 11px;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    color: #333;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.slider-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.3s;
}

.slider-btn:hover {
    background: #c9a961;
}

.company-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    margin-top: 60px;
}

.info-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8e8dc;
}

.info-label {
    font-weight: 600;
    color: #333;
}

.info-value {
    color: #666;
}

/* Status Display */
.status-display {
    background: #fff;
    padding: 40px 50px;
    text-align: center;
    border-top: 1px solid #e8e8dc;
    border-bottom: 1px solid #e8e8dc;
}

.status-text {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    letter-spacing: 2px;
    color: #333;
}

.status-number {
    color: #c9a961;
    font-weight: bold;
}

.status-time {
    color: #666;
}

/* Contact Section */
#contact {
    background: #f9f9f5;
}

.contact-form {
    max-width: 700px;
    margin: 60px auto 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
}

.form-group textarea {
    min-height: 200px;
    resize: vertical;
}

.submit-btn {
    background: #333;
    color: #fff;
    padding: 15px 60px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    letter-spacing: 2px;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #c9a961;
}

/* Gallery Section */
.gallery-section {
    padding: 100px 50px;
    max-width: 1400px;
    margin: 0 auto;
    background: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 400px);
    gap: 10px;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

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

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

/* Gallery Video Styling */
.gallery-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 上段左: 横長の大きい画像 */
.gallery-1 {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
}

/* 上段中央: 縦長 */
.gallery-2 {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
}

/* 上段右: 縦長 */
.gallery-3 {
    grid-column: 4 / 5;
    grid-row: 1 / 3;
}

/* 下段左: 小 */
.gallery-4 {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

/* 下段中左: 小 */
.gallery-5 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

/* 下段中右: 小（実際には存在しないので削除するか、予備として残す） */
.gallery-6 {
    display: none;
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 40px 20px;
    font-size: 12px;
    letter-spacing: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 80px;
        flex-direction: column;
        background: #fff;
        width: 100%;
        padding: 40px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        transition: right 0.3s;
    }

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

    .hamburger {
        display: flex;
    }

    nav {
        padding: 20px 30px;
    }

    .hero h1 {
        font-size: 32px;
        letter-spacing: 4px;
    }

    .hero-number {
        font-size: 80px;
    }

    section {
        padding: 60px 30px;
    }

    .about-content,
    .company-info {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .section-title {
        font-size: 28px;
    }

    .news-item {
        min-width: 280px;
    }

    .opening-text {
        font-size: 48px;
    }

    /* Gallery Grid Responsive */
    .gallery-section {
        padding: 60px 30px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 10px;
        padding: 0;
    }

    .gallery-item,
    .gallery-1,
    .gallery-2,
    .gallery-3,
    .gallery-4,
    .gallery-5,
    .gallery-6 {
        grid-column: 1 / 2 !important;
        grid-row: auto !important;
        height: 300px;
        display: block !important;
    }

    /* Status Display Responsive */
    .status-display {
        padding: 30px 20px;
    }

    .status-text {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .status-brackets {
        display: block;
        margin-top: 10px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .gallery-section {
        padding: 80px 40px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 350px);
        gap: 10px;
    }

    .gallery-1 {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }

    .gallery-2 {
        grid-column: 1 / 2;
        grid-row: 2 / 4;
    }

    .gallery-3 {
        grid-column: 2 / 3;
        grid-row: 2 / 4;
    }

    .gallery-4 {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }

    .gallery-5 {
        grid-column: 2 / 3;
        grid-row: 3 / 4;
    }

    .gallery-6 {
        display: none;
    }
}
