/* ==========================================================================
   CSS Variables & Design System
   ========================================================================== */
:root {
    /* Colors - Redesigned for JAPANTORY 15 (Mint Green & Lavender) */
    --primary-color: #66BB6A;
    /* Fresh Mint Green */
    --primary-light: #F1F8E9;
    /* Very soft green */
    --primary-dark: #388E3C;
    /* Darker green */
    --secondary-color: #AB47BC;
    /* Soft Lavender/Purple */
    --accent-color: #29B6F6;
    /* Soft blue */

    --text-main: #3E2723;
    /* Soft warm brown/gray */
    --text-muted: #8D6E63;
    --text-light: #FFFFFF;

    --bg-main: #FAFAFA;
    --bg-white: #FFFFFF;
    --bg-soft: #F9FBE7;
    /* Very soft green/yellow background */

    --border-color: #F5F5F5;

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

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Layout */
    --container-width: 1200px;
    --header-height: 80px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

a {
    text-decoration: none;
    color: var(--primary-dark);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */
.text-center {
    text-align: center;
}

.highlight {
    color: var(--primary-dark);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: var(--accent-color);
    opacity: 0.4;
    z-index: -1;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

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

.btn-outline {
    background-color: transparent;
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

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

.btn-sm {
    padding: 8px 24px;
    font-size: 0.9rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.header.scrolled {
    height: 70px;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    max-width: 60%;
}

.logo-img {
    height: 70px;
    /* Base height restriction */
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-left: auto;
}

.nav-list {
    display: flex;
    gap: var(--space-md);
}

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

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

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    position: absolute;
    left: 0;
    transition: all var(--transition-normal);
}

.menu-toggle span:nth-child(1) {
    top: 0;
}

.menu-toggle span:nth-child(2) {
    top: 9px;
}

.menu-toggle span:nth-child(3) {
    top: 18px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    padding-top: calc(var(--header-height) + var(--space-xl));
    padding-bottom: var(--space-xl);
    background-color: var(--bg-soft);
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 1000px;
    position: relative;
    z-index: 2;
    animation: fadeUp 1s ease forwards;
}

.hero-title {
    font-size: 3rem;
    color: var(--text-main);
    margin-bottom: var(--space-md);
}

.hero-description {
    font-size: 1.1rem;
    /*color: var(--text-muted);*/
    color: black;
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.hero-bg-shape {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: url('../images/hero_kids.png');
    background-size: cover;
    background-position: center;
    border-bottom-left-radius: 100px;
    z-index: 0;
}

.hero-bg-shape::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(to right, var(--bg-soft) 0%, rgba(255, 253, 249, 0) 42%);
    border-bottom-left-radius: 100px;
}

.deco-element {
    position: absolute;
    z-index: 1;
    font-size: 2rem;
    opacity: 0.2;
    color: var(--primary-color);
    animation: float 6s ease-in-out infinite;
}

.deco-1 {
    top: 20%;
    right: 40%;
    font-size: 3rem;
    color: var(--accent-color);
    animation-delay: 0s;
}

.deco-2 {
    bottom: 20%;
    right: 10%;
    font-size: 2.5rem;
    color: var(--primary-dark);
    animation-delay: 2s;
}

.deco-3 {
    top: 40%;
    right: 20%;
    font-size: 4rem;
    color: var(--secondary-color);
    animation-delay: 4s;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--bg-white);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.footer-logo {
    color: var(--primary-dark);
    font-family: var(--font-heading);
    margin-bottom: var(--space-xs);
}

.company-name {
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.company-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
}

.footer-bottom {
    padding: var(--space-sm) 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* ==========================================================================
   Sections General
   ========================================================================== */
.section {
    padding: var(--space-xl) 0;
}

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

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

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

.text-white {
    color: var(--text-light);
}

.section-header {
    margin-bottom: var(--space-lg);
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-main);
}

.section-subtitle {
    display: inline-block;
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: var(--space-xs);
}

.lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.mb-4 {
    margin-bottom: var(--space-md);
}

.mb-5 {
    margin-bottom: calc(var(--space-md) * 1.5);
}

/* Visibility Classes for Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ==========================================================================
   Why Choose Us (Features Grid)
   ========================================================================== */
.highlight-title {
    font-size: 1.8rem;
    color: var(--primary-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.feature-card {
    background: var(--bg-main);
    padding: var(--space-md);
    border-radius: 16px;
    text-align: center;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: var(--space-sm);
}

.feature-title {
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
}

/* ==========================================================================
   Services
   ========================================================================== */
.services-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.service-item {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    background: var(--bg-white);
    padding: var(--space-lg);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-normal);
}

.service-item:hover {
    box-shadow: var(--shadow-md);
}

.service-icon {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 3.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.service-content {
    flex-grow: 1;
}

.service-title {
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
    color: var(--secondary-color);
}

.service-desc {
    margin-bottom: var(--space-sm);
    color: var(--text-muted);
}

.service-details {
    list-style: none;
    margin-top: var(--space-sm);
}

.service-details li {
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 500;
}

.text-primary {
    color: var(--primary-color);
    margin-right: 8px;
}

/* ==========================================================================
   Safety & Support
   ========================================================================== */
.safety-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
}

.safety-card {
    background: var(--bg-soft);
    padding: var(--space-md);
    border-radius: 12px;
    border-top: 4px solid var(--secondary-color);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.safety-number {
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 4rem;
    font-weight: 800;
    color: rgba(42, 157, 143, 0.1);
    line-height: 1;
}

/* ==========================================================================
   Timeline / How It Works
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: var(--primary-light);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: var(--space-md);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 3px solid var(--primary-color);
    color: var(--primary-dark);
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    font-size: 1.2rem;
}

.timeline-dot.bg-primary {
    background: var(--primary-color);
}

.timeline-content {
    background: var(--bg-white);
    padding: var(--space-md);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.timeline-content h4 {
    color: var(--primary-dark);
    margin-bottom: 8px;
}

/* ==========================================================================
   Representative
   ========================================================================== */
.rep-wrapper {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    background: var(--bg-soft);
    padding: var(--space-lg);
    border-radius: 24px;
}

.rep-image-col {
    flex-shrink: 0;
    width: 300px;
    text-align: center;
}

.rep-image-placeholder {
    width: 240px;
    height: 300px;
    background: #EAEAEA;
    border-radius: 12px;
    margin: 0 auto var(--space-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5rem;
    color: #CCCCCC;
    overflow: hidden;
}

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

.rep-name {
    font-weight: 700;
    color: var(--text-main);
}

.rep-content-col {
    flex-grow: 1;
}

.rep-title {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.rep-subtitle {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: var(--space-md);
}

.rep-text p {
    margin-bottom: var(--space-sm);
    color: var(--text-muted);
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-white);
    border-radius: 12px;
    margin-bottom: var(--space-sm);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
}

.faq-question {
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h4 {
    margin: 0;
    font-size: 1.1rem;
}

.faq-toggle {
    color: var(--primary-color);
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 var(--space-md);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all var(--transition-normal);
    background: var(--bg-main);
}

.faq-item.active .faq-answer {
    padding: var(--space-sm) var(--space-md);
    max-height: 200px;
    opacity: 1;
}

/* ==========================================================================
   Contact Form
   ========================================================================== */
.contact-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.contact-form-container {
    background: var(--bg-white);
    padding: var(--space-lg);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    text-align: left;
}

.form-group {
    margin-bottom: var(--space-sm);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-submit {
    width: 100%;
    margin-top: var(--space-sm);
    padding: 16px;
    font-size: 1.1rem;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 991px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-white);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--space-lg) var(--space-md);
        box-shadow: var(--shadow-md);
        transition: left var(--transition-normal);
        overflow-y: auto;
        z-index: 1002;
    }

    .main-nav.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: var(--space-sm);
        margin-bottom: var(--space-md);
    }

    .nav-link {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }

    .nav-overlay {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
        z-index: 1001;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .hero-bg-shape {
        width: 100%;
        height: 60%;
        bottom: 0;
        top: auto;
        border-bottom-left-radius: 0;
        border-top-left-radius: 50% 10%;
    }

    .hero-bg-shape::after {
        background: linear-gradient(to bottom, var(--bg-soft) 0%, rgba(255, 253, 249, 0) 50%);
    }

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

    .hero-title-break {
        display: block;
    }

    /* Additional tablet adjustments */
    .section {
        padding: var(--space-lg) 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .service-item,
    .service-item.flex-reverse {
        flex-direction: column;
        text-align: center;
        padding: var(--space-md);
        gap: var(--space-md);
    }

    .service-details {
        text-align: left;
        display: inline-block;
        margin: var(--space-sm) auto 0;
    }

    .rep-wrapper {
        flex-direction: column;
        text-align: center;
        padding: var(--space-md);
        gap: var(--space-md);
    }

    .rep-image-col {
        width: 100%;
    }

    .faq-question {
        padding: var(--space-sm);
    }

    .hero-section {
        padding-top: calc(var(--header-height) + var(--space-md));
        padding-bottom: var(--space-md);
        min-height: auto;
        display: block;
        text-align: center;
    }

    .hero-content {
        padding-top: var(--space-md);
        padding-bottom: 300px;
    }

    .hero-cta {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .logo-img {
        height: 60px !important;
    }

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

    .hero-description {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

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

    .timeline-item {
        padding-left: 45px;
    }

    .timeline-dot {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .timeline::before {
        left: 15px;
    }

    .footer-top {
        text-align: center;
    }
}

/* PC Specific Adjustments */
@media (min-width: 992px) {
    .logo {
        position: relative;
        left: 50px;
    }
}