/* --- Reset & Base --- */
:root {
    --bg-color: #FFFFFF;
    --text-color: #333333;
    --primary-color: #007BFF;
    --surface-color: #F8F9FA;
    --font-heading: 'Noto Sans JP', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: #222;
    font-weight: 700;
}

p {
    line-height: 1.8;
    font-size: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

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

/* --- Header --- */
header {
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #EAEAEA;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 35px;
    width: auto;
    z-index: 1001;
}

/* --- Navigation --- */
.nav-toggle {
    display: block;
    cursor: pointer;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.main-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.main-nav.active {
    display: flex;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav li {
    margin: 1.5rem 0;
}

.main-nav a {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
}


/* --- Main Content --- */
main {
    padding-top: 67px; /* Header height */
}

section {
    padding: 4rem 0;
}

section:nth-child(even) {
    background-color: var(--surface-color);
}

/* --- Hero Section --- */
#hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('img/main-visual.jpg') no-repeat center center/cover;
    padding: 4rem 0;
    margin-bottom: 50px; /* Space for the logo */
}

.hero-content {
    padding: 0 1rem;
}

#hero h2 {
    font-size: 1.8rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

#hero p {
    font-size: 1rem;
    color: #FFFFFF;
    max-width: 500px;
    margin: 0 auto;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

.hero-logo {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- Grids (Service, Works, Pricing) --- */
.service-list, .pricing-table, .thumbnail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.service-item, .pricing-item {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    text-align: center;
}

.service-item h4, .pricing-item h4 {
    font-size: 1.5rem;
    margin-top: 0;
    color: var(--primary-color);
}

.price {
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--primary-color);
    display: block;
    margin: 1rem 0;
}

.pricing-item ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    color: #666;
}

.pricing-item li {
    margin-bottom: 0.8rem;
}

/* --- Buttons --- */
.contact-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.8rem 2rem;
    margin-top: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.contact-btn:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem 0;
    font-size: 0.9rem;
    color: #888;
    background-color: var(--surface-color);
}

/* --- Case Study Page --- */
#case-study-hero {
    padding: 4rem 0;
    text-align: center;
    background-color: var(--surface-color);
}

#case-study-hero h2 {
    font-size: 2rem;
}

.thumbnail-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    aspect-ratio: 1 / 1;
}

.thumbnail-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
}

#caption {
    text-align: center;
    color: #ccc;
    padding: 20px 10px;
    font-size: 1rem;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 35px;
    cursor: pointer;
}


/* --- Desktop Styles --- */
@media (min-width: 768px) {
    .logo {
        height: 40px;
    }

    .nav-toggle {
        display: none;
    }

    .main-nav {
        display: flex;
        position: static;
        height: auto;
        width: auto;
        background: none;
        flex-direction: row;
    }

    .main-nav ul {
        display: flex;
        align-items: center;
    }

    .main-nav li {
        margin: 0 0 0 2.5rem;
    }

    .main-nav a {
        font-size: 0.9rem;
    }

    main {
        padding-top: 77px; /* Header height */
    }

    section {
        padding: 6rem 0;
    }

    #hero {
        min-height: 80vh;
        margin-bottom: 75px; /* Space for logo */
    }

    #hero h2 {
        font-size: 3.5vw;
    }

    #hero p {
        font-size: 1.2rem;
    }

    .hero-logo {
        bottom: -75px;
        width: 150px;
        height: 150px;
    }

    .service-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .pricing-table {
        grid-template-columns: repeat(3, 1fr);
    }

    .thumbnail-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    #case-study-hero h2 {
        font-size: 3rem;
    }
}
