/* =========================================
   Variables & Reset
   ========================================= */
:root {
    /* Colors */
    --color-bg: #FFFFFF;
    --color-bg-gray: #F8F9FA;
    --color-main: #1A2B45; /* Deep Navy */
    --color-text: #333333;
    --color-text-light: #777777;
    --color-accent: #CC6644; /* Terracotta */
    --color-line: #E0E0E0;

    /* Fonts */
    --font-jp: 'Noto Sans JP', sans-serif;
    --font-en: 'Montserrat', sans-serif;

    /* Spacing */
    --container-width: 1100px;
    --header-height: 80px;
    --spacing-section: 100px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-jp);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

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

/* =========================================
   Utility Classes
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

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

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

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

/* Typography */
.section__header {
    margin-bottom: 60px;
    text-align: center;
}

.section__subtitle {
    font-family: var(--font-en);
    font-size: 0.9rem;
    color: var(--color-accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.section__title {
    font-size: 2rem;
    color: var(--color-main);
    font-weight: 700;
}

.section__desc {
    margin-top: 15px;
    color: var(--color-text-light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 2px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-family: var(--font-jp);
}

.btn--nav {
    background-color: var(--color-accent);
    color: #fff;
}

.btn--nav:hover {
    background-color: #b55536;
}

.btn--submit {
    background-color: var(--color-main);
    color: #fff;
    width: 100%;
    font-size: 1rem;
    margin-top: 20px;
}

.btn--submit:hover {
    background-color: #2c4466;
}

/* =========================================
   Header
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    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);
    display: flex;
    align-items: center;
}

.header__container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-main);
    letter-spacing: 0.05em;
}

.header__logo-sub {
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.header__nav {
    display: flex;
}

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

.header__link {
    font-family: var(--font-en);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-main);
}

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

/* Mobile Nav */
.header__toggle {
    display: none;
    cursor: pointer;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero__bg-shape {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 60%;
    height: 80%;
    background-color: #f0f4f8;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    z-index: -1;
    opacity: 0.8;
    animation: morph 10s ease-in-out infinite alternate;
}

@keyframes morph {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

.hero__content {
    max-width: 600px;
}

.hero__sub {
    font-family: var(--font-en);
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

.hero__title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--color-main);
}

.hero__desc {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 40px;
}

.scroll-down {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: var(--font-en);
    font-size: 0.8rem;
    color: var(--color-main);
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-down__arrow {
    width: 1px;
    height: 40px;
    background-color: var(--color-main);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* =========================================
   Concept Section
   ========================================= */
.concept__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.concept__head {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--color-main);
}

/* CSS Diagram */
.os-diagram {
    background-color: var(--color-bg-gray);
    padding: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-en);
    font-weight: 700;
}

.os-diagram__box {
    background: #fff;
    padding: 20px;
    width: 120px;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
}

.os-diagram__box--old {
    border-left: 4px solid #999;
}

.os-diagram__box--new {
    border-left: 4px solid var(--color-accent);
}

.os-diagram__arrow {
    color: var(--color-text-light);
    font-size: 0.8rem;
    position: relative;
}

.os-diagram__arrow::after {
    content: '→';
    display: block;
    font-size: 1.5rem;
    text-align: center;
}

.status-error {
    font-size: 0.7rem;
    color: red;
    font-weight: 400;
}

.status-ok {
    font-size: 0.7rem;
    color: green;
    font-weight: 400;
}

/* =========================================
   Methodology Section
   ========================================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: #fff;
    border: 1px solid var(--color-line);
    padding: 40px 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-color: var(--color-accent);
}

.card__icon {
    width: 50px;
    height: 50px;
    color: var(--color-main);
    margin-bottom: 20px;
}

.card__title-en {
    font-family: var(--font-en);
    font-size: 1.1rem;
    color: var(--color-accent);
    margin-bottom: 5px;
}

.card__title-jp {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--color-main);
}

.card__text {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

/* =========================================
   Services Section (Accordion)
   ========================================= */
.accordion {
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid var(--color-line);
}

.accordion__item {
    border-bottom: 1px solid var(--color-line);
}

.accordion__header {
    width: 100%;
    padding: 25px 0;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: color 0.3s;
}

.accordion__header:hover .accordion__title {
    color: var(--color-accent);
}

.accordion__number {
    font-family: var(--font-en);
    font-size: 1.2rem;
    color: var(--color-text-light);
    width: 50px;
}

.accordion__title-group {
    flex-grow: 1;
}

.accordion__title {
    font-family: var(--font-en);
    font-size: 1.2rem;
    color: var(--color-main);
    margin-bottom: 5px;
}

.accordion__tag {
    font-size: 0.8rem;
    background-color: #EAEAEA;
    padding: 2px 8px;
    border-radius: 2px;
    color: var(--color-text-light);
}

.accordion__icon {
    font-size: 1.5rem;
    color: var(--color-main);
    transition: transform 0.3s;
}

.accordion__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion__body {
    padding: 0 0 30px 50px;
    color: var(--color-text);
}

.service-list {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.service-list li {
    margin-bottom: 5px;
    list-style: disc;
    margin-left: 20px;
}

.accordion__item.active .accordion__icon {
    transform: rotate(45deg);
}

/* =========================================
   About Section
   ========================================= */
.about__wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.img-placeholder {
    width: 100%;
    height: 500px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-family: var(--font-en);
    text-align: center;
    /* In production, replace with <img> */
}

.about__name {
    font-size: 2rem;
    margin-bottom: 5px;
    color: var(--color-main);
}

.about__name-en {
    font-size: 1.2rem;
    font-family: var(--font-en);
    font-weight: 400;
    margin-left: 10px;
    color: var(--color-text-light);
}

.about__role {
    color: var(--color-accent);
    margin-bottom: 40px;
    font-weight: 500;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
    border-left: 1px solid var(--color-line);
}

.timeline__item {
    margin-bottom: 40px;
    position: relative;
}

.timeline__marker {
    position: absolute;
    left: -35px;
    top: 5px;
    width: 10px;
    height: 10px;
    background-color: var(--color-bg);
    border: 2px solid var(--color-accent);
    border-radius: 50%;
}

.timeline__year {
    font-family: var(--font-en);
    font-size: 0.8rem;
    color: var(--color-text-light);
    display: block;
    margin-bottom: 5px;
}

.timeline__title {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--color-main);
}

.timeline__desc {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

/* =========================================
   Contact Section & Footer
   ========================================= */
.contact__container {
    max-width: 600px;
}

.contact__header {
    text-align: center;
    margin-bottom: 40px;
}

.contact__text {
    margin-top: 20px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-line);
    border-radius: 2px;
    font-family: inherit;
    font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-main);
}

.footer {
    background-color: var(--color-main);
    color: #fff;
    padding: 60px 0 20px;
}

.footer__container {
    text-align: center;
}

.footer__logo {
    font-family: var(--font-en);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer__message {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 30px;
}

.footer__links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.footer__links a {
    font-family: var(--font-en);
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer__links a:hover {
    opacity: 1;
    color: var(--color-accent);
}

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.8rem;
    font-family: var(--font-en);
    opacity: 0.5;
}

/* =========================================
   Animations & Responsive
   ========================================= */
/* Scroll Reveal Class */
.js-scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.js-scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* Responsive */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .concept__grid {
        grid-template-columns: 1fr;
    }

    .about__wrapper {
        grid-template-columns: 1fr;
    }

    .img-placeholder {
        height: 300px;
    }

    /* Mobile Nav */
    .header__toggle {
        display: block;
    }

    .header__toggle .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        background-color: var(--color-main);
        transition: all 0.3s ease;
    }

    .header__nav {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: #fff;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.3s;
    }

    .header__nav.active {
        left: 0;
    }

    .header__list {
        flex-direction: column;
    }
}