/* Universal Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables */
:root {
    --synapse-blue: #3A7CA5;
    --interface-grey: #E4E6EB;
    --aurora-pink: #EF9AAE;
    --deep-navy: #1B1C30;
    --metal-grey: #747C8C;
    --smoky-ivory: #F5F6F7;
}

/* Base Body and HTML Styles */
html, body {
    height: 100%; /* HTMLとBodyの高さをビューポートに合わせる */
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--deep-navy);
    background: linear-gradient(180deg, var(--smoky-ivory) 0%, #ffffff 100%);
    font-weight: 400;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Main Content Area */
main {
    flex-grow: 1;
    padding-top: 80px;
    position: relative;
    z-index: 1;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* ビューポートの幅いっぱいに広がる */
    padding: 1rem 0; /* 上下のパディングはヘッダー全体に */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Header Container (HTMLで .container クラスも適用すること) */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.header-brand {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--synapse-blue);
    text-decoration: none;
    z-index: 1001;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--metal-grey);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--synapse-blue);
}

/* Call to Action Button */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: var(--synapse-blue);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    margin-top: 1.5rem; /* これはCTAボタン単体に対するもので、ヘッダー内のボタンには影響しないはず */
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(58, 124, 165, 0.3);
}

/* Global Container for Content Width */
.container {
    max-width: 1200px;
    margin: 0 auto; /* 左右中央寄せ */
    padding: 0 40px; /* 左右のパディング */
}

/* Hero Section */
.hero {
    height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: #fcfcff;
}

.hero::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    top: -150px;
    left: -200px;
    background: radial-gradient(circle, rgba(200, 180, 255, 0.5) 0%, transparent 70%);
    filter: blur(60px);
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    bottom: -150px;
    right: -200px;
    background: radial-gradient(circle, rgba(180, 255, 235, 0.5) 0%, transparent 70%);
    filter: blur(60px);
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    position: relative;
}

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--metal-grey);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: 4rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--deep-navy);
}

.hero-title .emphasis {
    background: linear-gradient(135deg, var(--synapse-blue), var(--aurora-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
}

.hero-description {
    font-size: 1.3rem;
    color: var(--metal-grey);
    margin-bottom: 3rem;
    line-height: 1.8;
    max-width: 800px;
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.keyword-tag {
    padding: 0.5rem 1rem;
    background: rgba(58, 124, 165, 0.1);
    border: 1px solid rgba(58, 124, 165, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--synapse-blue);
    font-weight: 500;
}

.neural-visualization {
    position: absolute;
    right: -200px;
    top: 50%;
    transform: translateY(-50%);
    width: 600px;
    height: 600px;
    opacity: 0.1;
    z-index: 1;
}

.node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--synapse-blue);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

.node:nth-child(1) { top: 20%; left: 30%; animation-delay: 0s; }
.node:nth-child(2) { top: 40%; left: 60%; animation-delay: 0.5s; }
.node:nth-child(3) { top: 60%; left: 20%; animation-delay: 1s; }
.node:nth-child(4) { top: 30%; left: 80%; animation-delay: 1.5s; }
.node:nth-child(5) { top: 70%; left: 70%; animation-delay: 2s; }

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

.connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--synapse-blue), transparent);
    animation: flow 4s ease-in-out infinite;
}

@keyframes flow {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.6; }
}

/* About Section */
.about {
    padding: 60px 0 120px;
    background: white;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--deep-navy);
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: var(--metal-grey);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--deep-navy);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--synapse-blue);
    font-weight: 500;
}

.about-visual {
    background: linear-gradient(135deg, rgba(58, 124, 165, 0.05), rgba(239, 154, 174, 0.05));
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(58, 124, 165, 0.1);
}

.brain-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--synapse-blue), var(--aurora-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Service Section */
.service {
    padding: 80px 0;
    position: relative;
    background-color: white;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.service-item .service-card {
    background: #EAEAEA;
    border-radius: 12px;
    padding: 4rem 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.service-item .service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.service-item .service-card h3 {
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--deep-navy);
}

.service-item p {
    color: var(--metal-grey);
    font-weight: 500;
}

/* Content Section */
.content {
    padding: 80px 0;
    background: var(--smoky-ivory);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.content-tile {
    background: var(--smoky-ivory);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--interface-grey);
    display: flex;
    flex-direction: column;
}

.content-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(27, 28, 48, 0.08);
    color: var(--metal-grey);
}

.content-image {
    height: 150px;
    background: linear-gradient(135deg, var(--interface-grey), var(--smoky-ivory));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--metal-grey);
}

.content-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.content-category {
    font-size: 0.8rem;
    color: var(--synapse-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.content-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--deep-navy);
}

.content-description {
    font-size: 0.9rem;
    color: var(--metal-grey);
    line-height: 1.5;
}

.content-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
}

.update-info {
    font-size: 0.8rem;
    color: var(--metal-grey);
}

.visit-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--synapse-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.visit-link:hover {
    color: var(--aurora-pink);
}

/* Footer */
.footer {
    background: var(--deep-navy);
    color: white;
    /* 上下のパディングはfooterに維持し、左右は.containerに任せる */
    padding-top: 80px; 
    padding-bottom: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
    align-items: start;
}

.footer-column h4 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.1rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-column ul li a:hover {
    color: white;
}

.footer-brand {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    max-width: 400px;
    font-size: 0.9rem;
}

.contact-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contact-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.email-link {
    color: white;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-footer-contact {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: white;
    color: var(--deep-navy);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}
.btn-footer-contact:hover {
    background: var(--smoky-ivory);
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--synapse-blue);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .neural-visualization {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* レスポンシブ時の.containerのパディング */
    .container {
        padding: 0 20px; 
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Section */
.contact {
    padding: 120px 0;
    background: white;
}
.contact-form-container {
    max-width: 700px;
    margin: 0 auto;
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}
.contact-form .form-group {
    margin-bottom: 1.5rem;
}
.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--deep-navy);
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--synapse-blue);
}
.contact-form .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* About Details Page */
.page-content {
    padding: 40px 40px 60px;
}
.page-content h1 { 
    font-size: 2.8rem; 
    font-weight: 300; 
    margin-bottom: 2rem; 
}
.page-content p { 
    font-size: 1.1rem;
    line-height: 1.8;
}