/* =========================================================================
   # Base Variables & Reset
   ========================================================================= */

:root {
    /* Colors */
    --color-primary: #1A365D;
    /* ネイビー */
    --color-primary-light: #2C5282;
    --color-primary-dark: #0F172A;
    --color-secondary: #E2E8F0;
    /* ライトグレー */
    --color-accent: #3182CE;

    --color-bg: #FFFFFF;
    /* ベース ホワイト */
    --color-bg-light: #F8FAFC;

    --color-text-main: #334155;
    --color-text-light: #64748B;
    --color-white: #FFFFFF;

    /* Typography */
    --font-heading: 'Inter', 'Noto Sans JP', sans-serif;
    --font-body: 'Inter', 'Noto Sans JP', sans-serif;

    /* Variables */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

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

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

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

ul {
    list-style: none;
}

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

/* =========================================================================
   # Typography & Utilities
   ========================================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-primary-dark);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--color-bg-light);
}

.text-primary {
    color: var(--color-accent);
}

.icon-list {
    width: 20px;
    height: 20px;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.section-desc {
    max-width: 600px;
    margin: 0 auto;
    color: var(--color-text-main);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

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

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

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

.btn-inverse:hover {
    background-color: var(--color-bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--color-primary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

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

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* Hover Effects */
.hover-lift {
    transition: var(--transition);
}

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

/* =========================================================================
   # Components
   ========================================================================= */

/* Header (Fixed Navigation) */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
    padding-top: 5px;
    padding-bottom: 5px;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.logo span {
    font-weight: 500;
}

.logo-icon {
    color: var(--color-accent);
    width: 24px;
    height: 24px;
}

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

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

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-main);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--color-accent);
}

.nav-link:hover::after {
    width: 100%;
}

.header-contact-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1010;
}

.bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px auto;
    transition: var(--transition);
    background-color: var(--color-primary);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding: 0 5%;
    margin-top: 0;
    padding-top: 80px;
    /* Offset for header */
}

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hero Overlay - ダークグラデーションで視認性を高める */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(26, 54, 93, 0.6) 100%);
}

.hero-content {
    max-width: 800px;
    color: var(--color-white);
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    color: var(--color-white);
    margin-bottom: 24px;
    line-height: 1.25;
    font-weight: 900;
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.03);
}

.about-heading {
    font-size: 2rem;
    margin-bottom: 24px;
    color: var(--color-primary);
}

.about-text {
    margin-bottom: 20px;
    color: var(--color-text-main);
    font-size: 1.05rem;
}

.about-list {
    margin-top: 30px;
}

.about-list li {
    margin-bottom: 12px;
    font-size: 1.05rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Services */
.service-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background-color: var(--color-white);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 1px solid var(--color-secondary);
}

.service-icon {
    width: 80px;
    height: 80px;
    background-color: var(--color-bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--color-primary);
    transition: var(--transition);
}

.service-icon svg {
    width: 36px;
    height: 36px;
}

.service-card:hover .service-icon {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.service-name {
    font-size: 1.35rem;
    margin-bottom: 16px;
    color: var(--color-primary-dark);
}

.service-description {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    padding: 80px 0;
    text-align: center;
    color: var(--color-white);
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.2rem;
    color: var(--color-white);
    margin-bottom: 20px;
}

.cta-desc {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

/* Strength Section */
.strength-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.strength-item {
    position: relative;
    padding-left: 80px;
}

.strength-number {
    position: absolute;
    left: 0;
    top: -10px;
    font-size: 4rem;
    font-weight: 900;
    color: var(--color-secondary);
    opacity: 0.5;
    font-family: var(--font-heading);
    line-height: 1;
}

.strength-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.strength-desc {
    color: var(--color-text-main);
    position: relative;
    z-index: 1;
}

/* Works Section */
.works-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.work-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--color-secondary);
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.work-image {
    position: relative;
    height: 220px;
}

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

.work-content {
    padding: 24px;
}

.work-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--color-primary-dark);
}

.work-desc {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Company Section */
.company-card {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-secondary);
}

.company-table {
    width: 100%;
    border-collapse: collapse;
}

.company-table th,
.company-table td {
    padding: 20px;
    border-bottom: 1px solid var(--color-secondary);
    text-align: left;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
    border-bottom: none;
}

.company-table th {
    width: 30%;
    font-weight: 600;
    color: var(--color-primary-dark);
}

/* Contact Section */
.contact-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--color-white);
    padding: 50px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

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

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-primary-dark);
}

.required {
    background-color: #E53E3E;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-secondary);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background-color: #F8FAFC;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    background-color: var(--color-white);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

textarea.form-control {
    resize: vertical;
}

.select-wrapper {
    position: relative;
}

.select-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
    pointer-events: none;
    width: 20px;
    height: 20px;
}

.form-submit {
    margin-top: 40px;
}

/* Footer */
.footer {
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
    padding: 60px 0 40px;
    text-align: center;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-white);
    font-family: var(--font-heading);
}

.footer-logo-icon {
    width: 28px;
    height: 28px;
    color: var(--color-white);
}

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

.footer-links a:hover {
    color: var(--color-white);
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* =========================================================================
   # Animations (改善)
   ========================================================================= */

/* フェードイン＋軽いスライド (0.6s) */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

/* =========================================================================
   # Media Queries
   ========================================================================= */

@media (max-width: 992px) {

    .about-grid,
    .strength-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
    }

    .service-cards,
    .works-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 3.2rem;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        left: -100%;
        top: 60px;
        /* Header height offset */
        flex-direction: column;
        background-color: var(--color-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 30px 0;
        gap: 15px;
        z-index: 999;
    }

    .nav.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 15px;
    }

    .header-contact-btn {
        margin-top: 15px;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* モバイル Hero文字サイズ調整 */
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    /* モバイル 1カラムレイアウト化 */
    .service-cards,
    .works-cards {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    /* モバイル CTAボタンフル幅設定 */
    .hero-buttons .btn {
        width: 100%;
    }

    .contact-form-wrapper {
        padding: 30px 20px;
    }

    .section {
        padding: 70px 0;
    }
}

@media (max-width: 576px) {

    .company-table th,
    .company-table td {
        display: block;
        width: 100%;
    }

    .company-table th {
        border-bottom: none;
        padding-bottom: 5px;
    }

    .company-table td {
        padding-top: 0;
        padding-bottom: 20px;
    }
}