/* ==========================================================================
   CSS Reset & Base Variables
   ========================================================================== */
   :root {
    /* Colors */
    --primary: #0A1930;       /* Deep Navy */
    --primary-light: #1A365D; /* Light Navy */
    --accent: #2B6CB0;        /* Accent Blue */
    --bg-main: #FFFFFF;       /* White */
    --bg-light: #F7F9FC;      /* Light Gray for sections */
    --text-main: #2D3748;     /* Dark Gray/Black */
    --text-muted: #718096;    /* Medium Gray */
    --border: #EDF2F7;        /* Very Light Gray */
    
    /* Typography */
    --font-heading: 'Inter', 'Noto Sans JP', sans-serif;
    --font-body: 'Inter', 'Noto Sans JP', sans-serif;
    
    /* Spacing */
    --sp-sm: 1rem;
    --sp-md: 2rem;
    --sp-lg: 4rem;
    --sp-xl: 8rem;
    
    /* Animation */
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

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

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: var(--sp-xl) 0;
}

.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--text-main); }
.bg-navy { background-color: var(--primary); }
.text-white { color: #fff; }
.text-center { text-align: center; }

/* Utility Classes */
.mb-2 { margin-bottom: 2rem; }
.mt-3 { margin-top: 3rem; }

/* ==========================================================================
   Typography & Titles
   ========================================================================== */
.section-header {
    margin-bottom: var(--sp-lg);
}

.section-en {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-en-dark {
    color: rgba(255, 255, 255, 0.6);
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-main);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: transparent;
    transition: background-color var(--transition-fast), padding var(--transition-fast), box-shadow var(--transition-fast);
    padding: 1.5rem 0;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--bg-main);
    transition: color var(--transition-fast);
}

.logo-icon {
    height: 32px;
    width: auto;
    /* メインビジュアル（暗い背景）では、白背景を黒にしロゴを白にしてScreen合成（白抜き透過） */
    filter: grayscale(1) invert(1) contrast(500%);
    mix-blend-mode: screen;
    transition: filter var(--transition-fast), mix-blend-mode var(--transition-fast);
}

.header.scrolled .logo a {
    color: var(--primary);
}

.header.scrolled .logo-icon {
    /* スクロール時（白い背景）では、Multiply合成で白背景のみを透過し、ロゴは元の色を保持 */
    filter: none;
    mix-blend-mode: multiply;
}

.global-nav ul {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.global-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bg-main);
    transition: color 0.3s;
}

.header.scrolled .global-nav a {
    color: var(--text-main);
}

.global-nav a:hover,
.header.scrolled .global-nav a:hover {
    color: var(--accent);
}

.global-nav .btn-contact {
    border: 1px solid var(--bg-main);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
}

.global-nav .btn-contact:hover {
    background-color: var(--bg-main);
    color: var(--primary) !important;
}

.header.scrolled .btn-contact {
    border-color: var(--primary);
    color: var(--primary);
}

.header.scrolled .btn-contact:hover {
    background-color: var(--primary);
    color: var(--bg-main) !important;
}

/* Mobile Nav & Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--bg-main);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.header.scrolled .hamburger span {
    background-color: var(--primary);
}

.hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); background-color: var(--text-main); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); background-color: var(--text-main); }

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: right var(--transition-slow);
    z-index: 99;
}

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

.mobile-nav ul {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-nav a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 700px;
    display: flex;
    align-items: center;
    padding: 0 5%;
    overflow: hidden;
    background-color: var(--primary);
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(10, 25, 48, 0.9) 0%, rgba(10, 25, 48, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--bg-main);
    max-width: 800px;
    margin-top: 5rem;
}

.hero-sub {
    font-size: 1rem;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    font-weight: 300;
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
}

.hero-main {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   Service Section (Cards)
   ========================================================================== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-main);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.card-img {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 2.5rem 2rem;
}

.card-body h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.card-body p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.8;
}

/* ==========================================================================
   Works Section (List)
   ========================================================================== */
.process-wrapper {
    max-width: 800px;
}

.process-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    border-left: 1px solid var(--border);
    padding-left: 3rem;
    margin-left: 1.5rem;
}

.process-item {
    position: relative;
}

.process-num {
    position: absolute;
    left: -4.5rem;
    top: 0;
    background: var(--bg-main);
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 700;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.process-detail h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.process-detail h4 .ja {
    font-size: 0.9375rem;
    color: var(--text-muted);
    font-weight: 400;
}

.process-detail p {
    color: var(--text-muted);
}

/* ==========================================================================
   Action Section
   ========================================================================== */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.mission-lead {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.mission-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   Company Section
   ========================================================================== */
.company-table {
    border-top: 1px solid var(--border);
    max-width: 1000px;
}

.company-table dl {
    display: flex;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.company-table dt {
    width: 250px;
    font-weight: 600;
    color: var(--primary);
}

.company-table dd {
    flex: 1;
}

/* ==========================================================================
   Contact / Buttons
   ========================================================================== */
.btn-primary {
    display: inline-block;
    background-color: var(--bg-main);
    color: var(--primary);
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.125rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.contact-desc {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
}

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

.footer-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

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

.footer-bottom {
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Animations & Hover Utilities
   ========================================================================== */
.hover-lift {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

/* Reveal Animations */
.reveal .fade-in-up,
.reveal .hover-lift,
.reveal .hover-effect,
.reveal .company-table,
.reveal .contact-desc,
.reveal .btn-primary {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active .fade-in-up,
.reveal.active .hover-lift,
.reveal.active .hover-effect,
.reveal.active .company-table,
.reveal.active .contact-desc,
.reveal.active .btn-primary {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }

/* ==========================================================================
   Contact Form
   ========================================================================== */
.contact-form-wrapper {
    max-width: 700px;
    margin: 3rem auto 0;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 2rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.form-group label .required {
    background-color: #e53e3e;
    color: #fff;
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-weight: 400;
}

.form-group label .optional {
    background-color: #718096;
    color: #fff;
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-weight: 400;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--bg-main);
    border: 1px solid transparent;
    border-radius: 4px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.3);
}

.form-submit .btn-primary {
    border: none;
    cursor: pointer;
    width: 100%;
    max-width: 300px;
}

.form-submit .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.form-message.success {
    display: block;
    background-color: rgba(72, 187, 120, 0.2);
    color: #48bb78;
    border: 1px solid #48bb78;
}

.form-message.error {
    display: block;
    background-color: rgba(229, 62, 62, 0.2);
    color: #fc8181;
    border: 1px solid #fc8181;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media screen and (max-width: 992px) {
    .hero-main { font-size: 3rem; }
    .action-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media screen and (max-width: 768px) {
    .global-nav { display: none; }
    .hamburger { display: flex; }
    
    .hero-main { font-size: clamp(1.2rem, 6.5vw, 2.25rem); }
    .hero-content { margin-top: 0; }
    
    .company-table dl { flex-direction: column; gap: 0.5rem; }
    .process-list { padding-left: 2rem; margin-left: 0.5rem; }
    .process-num { left: -3rem; width: 2.5rem; height: 2.5rem; font-size: 1rem; }
    
    .footer-layout { flex-direction: column; gap: 2rem; text-align: center; }
    .footer-nav { flex-direction: column; gap: 1rem; }
    
    .contact-form-wrapper { padding: 1.5rem; margin-top: 1.5rem; }
}
