:root {
    /* --- Base Colors --- */
    --brand-blue: #0F172A;       /* 深いネイビー（信頼・保守） */
    --brand-accent: #3B82F6;     /* 知的なブルー（先進・技術） */
    --text-main: #334155;        /* 読みやすいスレートグレー */
    --text-secondary: #64748B;
    --bg-light: #F8FAFC;         /* 清潔感のある白背景 */
    --bg-secondary: #F1F5F9;

    /* --- Advanced Colors --- */
    --c-pop: #F97316;            /* アクセント（オレンジ・バッジ用） */
    --c-cyan: #06B6D4;           /* グラデーション用シアン */
    --c-violet: #8B5CF6;         /* グラデーション用バイオレット */

    /* グラデーション定義 */
    --grad-primary: linear-gradient(135deg, var(--c-cyan) 0%, var(--brand-accent) 100%);
    --grad-glow: conic-gradient(from 180deg at 50% 50%, var(--c-cyan) 0deg, var(--c-violet) 180deg, var(--c-cyan) 360deg);

    /* --- UI Variables --- */
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 50px -12px rgba(59, 130, 246, 0.3);
    --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.1);

    --radius-lg: 24px;
    --radius-md: 16px;

    /* Fonts */
    --font-jp: "Noto Sans JP", sans-serif;
    --font-en: "Inter", sans-serif;
    --font-display: "Oswald", sans-serif;
}

/* --- 基本設定 --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-en), var(--font-jp), "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    margin: 0;
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* ノイズテクスチャ */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

h1, h2, h3 {
    color: var(--brand-blue);
    margin: 0;
    line-height: 1.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

/* --- コンポーネント --- */

/* ボタン */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-family: var(--font-en);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    cursor: pointer;
    border: none;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.btn-primary {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--brand-accent) 0%, var(--c-violet) 100%);
    z-index: -1;
    transition: opacity 0.3s;
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    background: #fff;
    color: var(--brand-blue);
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

.text-gradient {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* --- ヘッダー --- */
header {
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
}

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

/* --- ヒーロー --- */
.hero {
    padding: 140px 0 180px;
    position: relative;
    overflow: hidden;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.5;
    animation: float 20s infinite alternate;
}

.subpage-blob-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* はみ出したblobをカット */
    z-index: 0;
    pointer-events: none;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--grad-glow);
}

.blob-2 {
    top: 40%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--c-violet), transparent);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, 50px) rotate(10deg); }
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-img-container {
    position: relative;
    z-index: 2;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s ease-out;
}

.hero-img-container:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.hero-img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.2);
    border: 4px solid rgba(255, 255, 255, 0.8);
}

.floating-badge {
    position: absolute;
    background: #fff;
    padding: 12px 20px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: float-y 4s ease-in-out infinite;
    z-index: 3;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.badge-1 {
    top: -5%;
    left: -40px;
}

.badge-2 {
    bottom: -5%;
    right: -30px;
    animation-delay: -2s;
}

@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* --- セクション共通 --- */
section {
    padding: 60px 0;
}

.section-head {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-head .bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 8rem;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.03);
    z-index: -1;
    white-space: nowrap;
    pointer-events: none;
}

.section-head .label {
    display: inline-block;
    color: var(--brand-accent);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-family: var(--font-en);
}

.section-head h2 {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.marker {
    position: relative;
    z-index: 1;
}

.marker::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--c-cyan);
    opacity: 0.3;
    z-index: -1;
    transform: skewX(-20deg);
}

/* --- Bento Grid / Cards --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.bento-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-card);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(6, 182, 212, 0.3);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 24px;
    transition: all 0.3s;
}

.bento-card:hover .card-icon {
    background: var(--brand-blue);
    color: var(--c-cyan);
    transform: scale(1.1) rotate(-5deg);
}

/* --- Solutions --- */
.solution-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 120px;
}

.solution-item.reverse {
    direction: rtl;
}

.solution-item.reverse .content {
    direction: ltr;
}

.solution-tag {
    background: rgba(6, 182, 212, 0.1);
    color: var(--c-cyan);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: inline-block;
}

.check-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.check-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--brand-blue);
}

.check-list i {
    color: var(--c-pop);
    margin-right: 12px;
    background: rgba(249, 115, 22, 0.1);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* --- Contact Form --- */
.form-wrap {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 60px 80px;
    border-radius: 40px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.form-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--grad-primary);
}

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

.input-label {
    display: block;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--brand-blue);
}

.input-field {
    width: 100%;
    padding: 20px;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-size: 1rem;
    background: #F8FAFC;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.input-field:focus {
    outline: none;
    border-color: var(--brand-accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* --- Footer --- */
footer {
    background: var(--brand-blue);
    color: #fff;
    padding: 100px 0 40px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 100px;
    background: var(--brand-accent);
    filter: blur(80px);
    opacity: 0.3;
}

.footer-link {
    color: #94A3B8;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #fff;
}

/* Animation */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.8s ease-out;
}

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

/* Responsive */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 3rem;
    }

    .hero-img-container {
        margin-top: 50px;
    }

    .solution-item {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 80px;
    }

    .solution-item.reverse {
        direction: ltr;
    }

    .swiper-slide {
        width: 85vw;
        height: 260px;
    }

    .nav-links {
        display: none;
    }

    .form-wrap {
        padding: 40px;
    }

    .section-head .bg-text {
        font-size: 4rem;
    }

    .badge-1 {
        left: -10px;
    }

    .badge-2 {
        right: -10px;
    }
}

/* --- Swiper (Works Section) --- */

.work-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
    opacity: 0.9;
}

.swiper {
    width: 100%;
    padding-bottom: 50px !important;
    padding-top: 20px !important;
}

.swiper-wrapper {
    transition-timing-function: linear; /* 等速移動用 */
}

.swiper-slide {
    width: 480px; /* ★ここが重要：カードの幅指定 */
    height: 320px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    background: #000;
    flex-shrink: 0;
    cursor: grab;
}

.swiper-slide:active {
    cursor: grabbing;
}

.swiper-slide:hover .work-img {
    transform: scale(1.05);
    opacity: 0.6;
}

.work-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95), transparent);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s;
    pointer-events: none;
}

.swiper-slide:hover .work-overlay {
    opacity: 1;
    transform: translateY(0);
}

.work-cat {
    color: var(--c-cyan);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.work-overlay h3 {
    color: #fff;
    margin: 0;
}

/* スマホ対応 */
@media (max-width: 900px) {
    .swiper-slide {
        width: 85vw; /* スマホでは画面幅の85%にする */
        height: 260px;
    }
}