/* style.css - 名大レゴ部公式サイト CSS */

:root {
    /* Colors - Apple/Google like minimalist with Lego vibrant accents */
    --color-bg: #fbfbfd;
    --color-text: #1d1d1f;
    --color-text-light: #86868b;
    --color-white: #ffffff;
    --color-light-gray: #f5f5f7;
    --color-dark: #151516;
    
    /* Lego Accents */
    --color-lego-red: #E3000B;
    --color-lego-blue: #0055BF;
    --color-lego-yellow: #F2CD37;
    --color-lego-green: #00852B;

    /* Wood Accent (Requested in spec) */
    --color-wood: #D4A373;
    --color-wood-light: #FAEDDF;

    /* Typography */
    --font-primary: 'Inter', 'Noto Sans JP', sans-serif;
    
    /* Layout */
    --max-width: 1200px;
    --header-height: 70px;
    
    /* Transitions & Shadows */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-hover: 0 12px 32px rgba(0,0,0,0.12);
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s var(--transition-medium);
}

.loader-content {
    text-align: center;
}

.loader-content p {
    margin-top: 2rem;
    font-weight: 600;
    color: var(--color-text-light);
    letter-spacing: 0.05em;
    animation: pulse 1.5s infinite;
}

.lego-stack {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 2px;
}

.brick {
    width: 60px;
    height: 30px;
    border-radius: 4px;
    position: relative;
    box-shadow: inset -4px -4px 0 rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(-100px);
    animation: drop-stack 0.5s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.brick::before, .brick::after {
    content: '';
    position: absolute;
    top: -6px;
    width: 16px;
    height: 6px;
    background: inherit;
    border-radius: 2px 2px 0 0;
    box-shadow: inset -2px 0 0 rgba(0,0,0,0.1);
}

.brick::before { left: 8px; }
.brick::after { right: 8px; }

.brick.red { background-color: var(--color-lego-red); animation: drop-stack 2.0s infinite; animation-delay: 0.2s; }
.brick.blue { background-color: var(--color-lego-blue); animation: drop-stack 2.0s infinite; animation-delay: 0.4s; }
.brick.yellow { background-color: var(--color-lego-yellow); animation: drop-stack 2.0s infinite; animation-delay: 0.6s; }
.brick.green { background-color: var(--color-lego-green); animation: drop-stack 2.0s infinite; animation-delay: 0.8s; }

@keyframes drop-stack {
    0% {
        opacity: 0;
        transform: translateY(-100px);
    }
    30%, 70% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 5%;
}

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

/* Utilities */
.bg-light { background-color: var(--color-light-gray); }
.bg-dark { background-color: var(--color-dark); }
.text-white { color: var(--color-white); }
.text-gray { color: var(--color-text-light); }
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.w-full { width: 100%; }

.wood-accent { border-top: 4px solid var(--color-wood); }
.blue-accent { border-top: 4px solid var(--color-lego-blue); }
.wood-text { color: var(--color-wood); font-weight: 500; font-size: 0.85rem;}
.wood-border { border: 1px solid rgba(212, 163, 115, 0.3); }
.wood-bg { background-color: var(--color-wood-light); color: var(--color-wood); }

.red-bg { background-color: rgba(227, 0, 11, 0.1); color: var(--color-lego-red); }
.blue-bg { background-color: rgba(0, 85, 191, 0.1); color: var(--color-lego-blue); }
.yellow-bg { background-color: rgba(242, 205, 55, 0.2); color: #B3951F; }

/* Buttons */
.btn-primary, .btn-secondary, .filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-text);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-lego-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--color-white);
    color: var(--color-text);
    border: 1px solid rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    background-color: var(--color-light-gray);
}

.btn-text {
    color: var(--color-lego-blue);
    font-weight: 600;
    position: relative;
    padding-bottom: 2px;
}
.btn-text::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background-color: currentColor;
    transition: var(--transition-fast);
}
.btn-text:hover::after { width: 100%; }

/* Navbar - Glassmorphism */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 24px;
    height: 24px;
    background-color: var(--color-lego-red);
    border-radius: 4px;
    position: relative;
}
.logo-icon::before {
    content: '';
    position: absolute;
    top: -4px; left: 4px; right: 4px; bottom: 4px;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn-primary) {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-light);
    transition: var(--transition-fast);
}

.nav-links a:not(.btn-primary):hover {
    color: var(--color-text);
}

.mobile-menu-btn {
    display: none;
}

/* Sections */
.section {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--color-text-light);
    font-size: 1.1rem;
}

.section-desc {
    max-width: 800px;
    margin: 1rem auto 0;
    line-height: 1.8;
}

/* Features Section (About update) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 4rem;
    text-align: center;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.yellow-bg-circle {
    width: 120px;
    height: 120px;
    background-color: var(--color-lego-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(242, 205, 55, 0.3);
}

.icon-white {
    color: var(--color-white);
    font-size: 3rem;
    filter: brightness(0) invert(1); /* Force emojis/symbols to be white */
    line-height: 1;
    display: block;
}

.feature-item h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.feature-item p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    filter: brightness(0.9);
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); /* 写真を少し暗くして文字を目立たせる */
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding-top: var(--header-height);
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); /* 白文字＋影 */
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto 3rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); /* 白文字＋影 */
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Page Hero for Subpages */
.page-hero {
    height: 40vh;
    min-height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    margin-bottom: 3rem;
}

.page-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.2));
    z-index: 1;
}

.page-hero h1 {
    position: relative;
    z-index: 2;
    color: var(--color-white);
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* About Section - Legacy (Replaced by Features) */
.about-grid {
    display: none;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Gallery Section */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.1);
    color: var(--color-text-light);
    padding: 0.5rem 1.25rem;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--color-text);
    color: var(--color-white);
    border-color: var(--color-text);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.gallery-item {
    background: var(--color-white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-medium);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.gallery-img-wrapper {
    height: 240px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.gallery-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-medium);
}

.gallery-item:hover .gallery-img-wrapper img {
    transform: scale(1.05);
}

.author-text {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--color-text-light);
    font-weight: 500;
}

.placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}
.placeholder-text {
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0.8;
}

.gallery-info {
    padding: 1.5rem;
}

.gallery-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.gallery-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    background: var(--color-light-gray);
    border-radius: 99px;
    color: var(--color-text-light);
}

/* Columns Section */
.columns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.column-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.column-card:hover {
    box-shadow: var(--shadow-md);
}

.column-date {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.column-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.column-excerpt {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* SNS Section */
.sns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.instagram-embed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.instagram-embed-grid .instagram-embed-wrapper {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.instagram-embed-grid .instagram-embed-wrapper:hover {
    box-shadow: var(--shadow-md);
}

.sns-widget {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2rem;
}

.sns-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.sns-icon {
    font-size: 1.5rem;
}

.sns-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.sns-time {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

/* Contact Section */
.contact-wrapper {
    background: var(--color-white);
    border-radius: 32px;
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
    background: var(--color-bg);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-lego-blue);
    box-shadow: 0 0 0 3px rgba(0, 85, 191, 0.1);
}

/* Footer */
.footer {
    background: var(--color-light-gray);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 1.25rem;
}
.footer-brand p {
    color: var(--color-text-light);
    font-size: 0.9rem;
}
.footer-disclaimer {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 0.75rem;
    line-height: 1.5;
    max-width: 450px;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    color: var(--color-text-light);
    font-size: 0.8rem;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .section { padding: 5rem 0; }
    .section-header { margin-bottom: 3rem; }
    .section-header h2 { font-size: 2rem; }

    /* Mobile Nav */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--color-white);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: var(--transition-medium);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 1001;
        display: flex;
        padding: 2rem;
    }

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

    .mobile-menu-btn { 
        display: flex; 
        flex-direction: column; 
        gap: 6px; 
        width: 30px; 
        cursor: pointer;
        z-index: 1002;
    }

    .mobile-menu-btn span {
        width: 100%; 
        height: 2px; 
        background: var(--color-text);
        transition: var(--transition-fast);
        transform-origin: center;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn-primary, .hero-actions .btn-secondary { width: 100%; }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-grid, .contact-wrapper { 
        grid-template-columns: 1fr; 
        gap: 3rem; 
    }
    
    .contact-wrapper { padding: 2rem 1.5rem; }
    .footer-content { flex-direction: column; gap: 2rem; text-align: center; }
    .footer-disclaimer { margin-left: auto; margin-right: auto; }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--transition-medium);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--color-white);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 32px;
    position: relative;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s var(--transition-medium);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2010;
    font-size: 1.2rem;
    color: var(--color-text);
    transition: var(--transition-fast);
    border: 1px solid rgba(0,0,0,0.05);
}

.modal-close:hover {
    background: var(--color-white);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    flex: 1;
    min-height: 0;
}

.modal-img-side {
    background: #f0f0f2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-img-side img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-info-side {
    padding: 3rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-info-side .tag {
    align-self: flex-start;
    margin-bottom: 1rem;
    background: var(--color-wood-light);
    color: var(--color-wood);
    font-weight: 600;
}

.modal-info-side h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.modal-author {
    color: var(--color-text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

.modal-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 2.5rem;
    white-space: pre-wrap;
}

.modal-comments-section {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.modal-comments-section h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.comment-item {
    background: var(--color-light-gray);
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.comment-user {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    display: block;
}

.comment-text {
    font-size: 0.9rem;
    color: var(--color-text);
}

@media (max-width: 850px) {
    .modal-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    .modal-img-side {
        height: 300px;
    }
    .modal-info-side {
        padding: 2rem;
    }
    .modal-info-side h2 {
        font-size: 1.8rem;
    }
}

