/* ==========================================================================
   CSS Variables & Design System (Plan C: Approachable & Trustworthy)
   ========================================================================== */
:root {
    /* Colors */
    --color-primary: #0a5884;
    /* User Requested Blue - Solid & Trustworthy */
    --color-primary-light: #e6f0f5;
    /* Lighter Blue - Background alt */
    --color-primary-dark: #074263;
    /* Dark Blue - Hover states */
    --color-secondary: #0f172a;
    /* Very Dark Slate - Text headings */
    --color-accent: #2e8bba;
    /* Lighter Blue Accent - Highlights */

    --color-text-main: #334155;
    /* Slate - Body text */
    --color-text-light: #64748b;
    /* Light Slate - Subtitles/Muted */

    --color-bg-main: #ffffff;
    /* Pure White */
    --color-bg-alt: #f8fafc;
    /* Off-white/Light Slate - Alternate sections */
    --color-bg-card: #ffffff;

    /* Typography */
    --font-sans: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;

    /* Spacing & Layout */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    --container-max: 1200px;
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text-main);
    background-color: var(--color-bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-secondary);
    line-height: 1.3;
    font-weight: 700;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.section {
    padding: var(--space-20) 0;
    position: relative;
}

.section-bg-alt {
    background-color: var(--color-bg-alt);
}

.section-bg-primary {
    background-color: var(--color-primary-light);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-2);
}

.section-subtitle {
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: var(--text-sm);
}

.relative {
    position: relative;
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */
.text-center {
    text-align: center;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--border-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-size: var(--text-base);
    text-decoration: none;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
    border-radius: var(--border-radius-lg);
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: #ffffff;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    padding: var(--space-4) 0;
}

.header.scrolled {
    padding: var(--space-3) 0;
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: var(--text-xl);
    font-weight: 900;
    color: var(--color-secondary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 80px;
    max-height: 80px;
    width: auto;
    object-fit: contain;
    display: block;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-list {
    display: flex;
    gap: var(--space-6);
}

.nav-link {
    color: var(--color-text-main);
    font-weight: 500;
    position: relative;
    padding: var(--space-2) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-secondary);
    transition: var(--transition-fast);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: linear-gradient(135deg, rgba(247, 249, 252, 0.85) 0%, rgba(255, 255, 255, 0.95) 100%), url('../images/biwako-hero.jpg');
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-subtitle {
    color: var(--color-primary);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    display: inline-block;
    background: rgba(37, 99, 235, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: var(--space-6);
    letter-spacing: -1px;
    font-weight: 900;
    color: var(--color-secondary);
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text {
    font-size: var(--text-lg);
    color: var(--color-text-light);
    margin-bottom: var(--space-8);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* ==========================================================================
   Message Section
   ========================================================================== */
.message {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.message-text {
    font-size: var(--text-xl);
    line-height: 1.8;
    color: var(--color-secondary);
    font-weight: 500;
}

.message-highlight {
    color: var(--color-primary);
    font-weight: 700;
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-8);
    margin-top: var(--space-12);
}

.service-card {
    background: var(--color-bg-card);
    padding: var(--space-8);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.2);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-6);
    font-size: 24px;
}

.service-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
    color: var(--color-secondary);
}

.service-desc {
    color: var(--color-text-light);
    flex-grow: 1;
}

/* ==========================================================================
   Process Section
   ========================================================================== */
.process-timeline {
    max-width: 800px;
    margin: var(--space-12) auto 0;
    position: relative;
    padding-left: 30px;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-primary-light);
}

.process-step {
    position: relative;
    margin-bottom: var(--space-8);
    background: var(--color-bg-card);
    padding: var(--space-6);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.process-step:last-child {
    margin-bottom: 0;
}

.process-number {
    position: absolute;
    left: -46px;
    /* 30px padding + 16px half-width */
    top: 24px;
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 0 0 4px var(--color-bg-alt);
    z-index: 2;
}

.process-title {
    font-size: 1.25rem;
    color: var(--color-secondary);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.process-title i {
    color: var(--color-primary);
    font-size: 1.1em;
}

.process-desc {
    color: var(--color-text-main);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .process-timeline {
        padding-left: 20px;
    }

    .process-number {
        left: -36px;
    }

    .process-step {
        padding: var(--space-4);
    }
}

/* ==========================================================================
   Works Section (Carousel)
   ========================================================================== */
.works-slider {
    padding-bottom: var(--space-16);
    /* Space for pagination/navigation */
    margin-top: var(--space-12);
}

.swiper-slide {
    height: auto;
    /* To make cards equal height */
}

.work-card {
    background: var(--color-bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Swiper Controls Customization */
.swiper-pagination-bullet {
    background: var(--color-primary);
    opacity: 0.2;
}

.swiper-pagination-bullet-active {
    opacity: 1;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--color-primary);
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 1.2rem;
    font-weight: bold;
}

.swiper-button-prev {
    left: 0;
}

.swiper-button-next {
    right: 0;
}

.work-img-wrapper {
    width: 100%;
    height: 200px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: 2rem;
    overflow: hidden;
    /* Added to keep images within the rounded corners */
}

.work-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures slides fill the space nicely without distortion */
    transition: transform var(--transition-normal);
}

.work-card:hover .work-img-wrapper img {
    transform: scale(1.05);
    /* Slight zoom effect on hover for images too */
}

.work-content {
    padding: var(--space-6);
}

.work-category {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-bg-alt);
    color: var(--color-primary);
    font-size: var(--text-xs);
    font-weight: 700;
    border-radius: 20px;
    margin-bottom: var(--space-3);
}

.work-title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

.work-client {
    color: var(--color-text-light);
    font-size: var(--text-sm);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-wrap {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-12);
    align-items: center;
}

.about-image {
    width: 100%;
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, var(--color-primary-light), #e0e7ff);
    border-radius: var(--border-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--color-primary);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-name {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-1);
}

.about-role {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: var(--space-6);
}

.about-text {
    color: var(--color-text-main);
    margin-bottom: var(--space-6);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.skill-tag {
    background: var(--color-bg-alt);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: var(--text-sm);
    color: var(--color-secondary);
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Footer & Contact
   ========================================================================== */
.footer {
    background: var(--color-secondary);
    color: #ffffff;
    padding: var(--space-16) 0 var(--space-6);
}

.contact-box {
    background: var(--color-primary);
    border-radius: var(--border-radius-xl);
    padding: var(--space-12);
    text-align: center;
    margin-top: calc(var(--space-16) * -1);
    margin-bottom: var(--space-16);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.contact-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

.contact-box h2 {
    color: #ffffff;
    margin-bottom: var(--space-4);
    font-size: var(--text-3xl);
}

.contact-box p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
    font-size: var(--text-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.footer-logo {
    font-size: var(--text-2xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-2);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--text-sm);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 900px) {
    .about-wrap {
        grid-template-columns: 1fr;
    }

    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .header {
        padding: var(--space-2) 0;
    }

    .logo-img {
        height: 50px;
    }

    .hero {
        padding-top: 140px;
    }

    .nav {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 66px;
        left: 0;
        width: 100%;
        height: calc(100vh - 66px);
        background-color: var(--color-bg-main);
        justify-content: flex-start;
        align-items: center;
        padding-top: var(--space-12);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: var(--space-6);
        margin-bottom: var(--space-6);
    }

    .nav-link {
        font-size: 1.1rem;
        padding: var(--space-3) 0;
    }

    .nav.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .section {
        padding: var(--space-12) 0;
    }
}