/* CSS Variables for Theme */
:root {
    /* Colors */
    --color-white: #ffffff;
    --color-light: #f5f7fa;
    --color-navy: #1a365d;
    --color-navy-light: #2c5282;
    --color-matcha: #8b9a46;
    --color-brown: #5d4037;
    --color-text-main: #333333;
    --color-text-muted: #666666;

    /* Typography */
    --font-gothic: 'Noto Sans JP', sans-serif;
    --font-mincho: 'Zen Old Mincho', serif;

    /* Spacing & Sizes */
    --container-width: 1100px;
    --section-pad: 100px 0;
    --section-pad-mobile: 60px 0;
    --transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Base for rem */
}

body {
    font-family: var(--font-gothic);
    color: var(--color-text-main);
    line-height: 1.8;
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    font-size: 1.125rem;
    word-break: auto-phrase;
    /* Modern wrapping for Japanese */
    font-feature-settings: "palt";
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

/* Typography Classes */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-mincho);
    line-height: 1.4;
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--color-navy);
    color: var(--color-white);
    border: 1px solid var(--color-navy);
}

.btn-primary:hover {
    background-color: var(--color-white);
    color: var(--color-navy);
}

.btn-large {
    padding: 20px 48px;
    font-size: 1.25rem;
    border-radius: 8px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

.logo {
    display: flex;
    flex-direction: column;
}

.logo-clinic {
    font-size: 0.8rem;
    font-family: var(--font-gothic);
    color: var(--color-text-muted);
    white-space: nowrap;
}

.logo-main {
    font-size: 1.6rem;
    color: var(--color-navy);
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: var(--color-navy);
    position: relative;
    white-space: nowrap;
}

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

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

.nav-link-external {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-brown);
    position: relative;
    padding-right: 18px;
    margin-right: 16px;
    white-space: nowrap;
}

.nav-link-external::after {
    content: '↗';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
}

.nav-link-external:hover {
    color: var(--color-navy);
}

@media (max-width: 1040px) {
    .header-nav {
        display: none;
        /* simple hidden for mobile for now */
    }

    .header-right {
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .header-inner {
        height: 65px;
    }

    .logo-clinic {
        font-size: 0.65rem;
    }

    .logo-main {
        font-size: 1.1rem;
    }

    .nav-link-external {
        font-size: 0.65rem;
        padding-right: 12px;
        margin-right: 0;
        text-align: right;
        line-height: 1.3;
        max-width: 130px;
    }

    .nav-link-external::after {
        font-size: 0.6rem;
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 8s ease-out;
    transform: scale(1.05);
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1.0);
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.4) 60%, rgba(255, 255, 255, 0.1) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 600px;
    padding-top: 80px;
    /* Offset for header */
}

.hero-copy {
    font-size: 3.5rem;
    color: var(--color-navy);
    margin-bottom: 24px;
}

.hero-copy-small {
    font-family: var(--font-gothic);
    font-size: 1.5rem;
    color: var(--color-matcha);
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.hero-desc {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: var(--color-text-main);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--color-navy);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background-color: var(--color-navy);
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-white);
    animation: scrollLine 2s infinite cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

@media (max-width: 768px) {
    .carousel-overlay {
        background: rgba(255, 255, 255, 0.7);
    }

    .hero-copy {
        font-size: 2.25rem;
    }

    .hero-copy-small {
        font-size: 1.1rem;
    }

    .hero-desc {
        font-size: 1.1rem;
    }
}

/* Reusable Section Styles */
.section {
    padding: var(--section-pad);
}

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

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

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--color-navy);
    margin-bottom: 8px;
}

.bg-dark .section-title {
    color: var(--color-white);
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-matcha);
    letter-spacing: 0.2em;
}

.section-intro {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 50px;
    line-height: 2;
}

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

/* Concept Grid */
.concept-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.concept-card {
    background: var(--color-white);
    padding: 50px 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border-top: 4px solid var(--color-navy);
    transition: var(--transition);
}

.concept-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
}

.concept-icon {
    font-size: 3rem;
    margin-bottom: 24px;
}

.concept-title {
    font-size: 1.5rem;
    color: var(--color-navy);
    margin-bottom: 20px;
}

.concept-text {
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .concept-grid {
        grid-template-columns: 1fr;
    }
}

/* Symptoms Section */
.symptoms-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.symptom-item {
    background-color: var(--color-white);
    border: 1px solid #eaeaea;
    padding: 30px 20px;
    text-align: center;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.symptom-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--color-matcha);
    transition: var(--transition);
}

.symptom-item:hover {
    border-color: var(--color-matcha);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.symptom-name {
    font-size: 1.35rem;
    color: var(--color-navy);
    font-family: var(--font-gothic);
}

@media (max-width: 900px) {
    .symptoms-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .symptoms-list {
        grid-template-columns: 1fr;
    }
}

/* System Section */
.system-box {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.system-attention {
    color: #ffd54f;
    /* Accent for dark bg */
    font-size: 1.75rem;
    margin-bottom: 24px;
}

.system-text {
    font-size: 1.2rem;
    line-height: 2;
    margin-bottom: 50px;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.pricing-card {
    background-color: var(--color-white);
    color: var(--color-text-main);
    padding: 50px 40px;
    border-radius: 8px;
    border-top: 6px solid var(--color-matcha);
    position: relative;
}

.pricing-card-highlight {
    border-top-color: #e67e22;
    box-shadow: 0 8px 30px rgba(230, 126, 34, 0.15);
}

.pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e67e22;
    color: var(--color-white);
    padding: 4px 24px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.pricing-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.pricing-price {
    font-size: 3rem;
    font-family: var(--font-gothic);
    font-weight: 700;
    color: var(--color-brown);
    margin-bottom: 20px;
}

.pricing-price-special {
    color: #e67e22;
}

.pricing-unit {
    font-size: 1.25rem;
    color: var(--color-text-muted);
}

.pricing-note {
    font-size: 1rem;
    color: var(--color-text-muted);
}

.pricing-desc {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .pricing-card {
        padding: 30px 20px;
    }

    .pricing-price {
        font-size: 2rem;
    }
}

/* Contact Section */
.contact-section {
    background-color: var(--color-light);
    background-image: linear-gradient(135deg, var(--color-light) 0%, #eef2f6 100%);
}

.contact-box {
    background-color: var(--color-white);
    max-width: 800px;
    margin: 0 auto;
    padding: 60px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

.contact-title {
    font-size: 2.25rem;
    color: var(--color-brown);
    margin-bottom: 24px;
}

.contact-text {
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.contact-clinic-name {
    font-size: 2.5rem;
    font-family: var(--font-mincho);
    color: var(--color-navy);
    font-weight: 700;
    margin-bottom: 20px;
    padding: 30px;
    border: 2px solid var(--color-navy-light);
    border-radius: 4px;
}

.contact-clinic-name .small {
    font-size: 1.25rem;
    font-family: var(--font-gothic);
    font-weight: normal;
}

.contact-reserve-btn {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
}

.contact-note {
    color: var(--color-text-muted);
    font-size: 1rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .contact-box {
        padding: 40px 20px;
    }

    .contact-title {
        font-size: 1.75rem;
    }

    .contact-clinic-name {
        font-size: 1.75rem;
        padding: 20px;
    }
}

/* Footer */
.footer {
    background-color: var(--color-text-main);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 30px 0;
    font-size: 0.9rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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