:root {
    --bs-body-bg: #f7f8fb;
    --bs-body-color: #0f172a;
    --bs-primary: #A72D28;
    --bs-primary-rgb: 167, 45, 40;
    --bs-secondary: #64748b;
    --bs-border-color: rgba(15, 23, 42, .12);
    --accent-light: #c24a43;
    --accent-alpha-10: rgba(167, 45, 40, 0.10);
    --accent-alpha-22: rgba(167, 45, 40, 0.22);

    --bs-body-font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", sans-serif;
    --bs-heading-font-weight: 900;

    --header-height: 72px;

    --bs-border-radius: 1rem;
    --bs-border-radius-lg: 1.25rem;

    --shadow-sm: 0 0.375rem 0.875rem rgba(15, 23, 42, 0.06);
    --shadow-md: 0 0.625rem 1.5rem rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 1.125rem 2.5rem rgba(15, 23, 42, 0.10);
}

body {
    font-family: var(--bs-body-font-family);
    background: var(--bs-body-bg);
}

::selection {
    background: var(--accent-alpha-10);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--bs-heading-font-weight);
}

h1 {
    line-height: 1.2;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: var(--header-height);
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid var(--bs-border-color);
}

.header-inner {
    height: 100%;
}

.brand {
    text-decoration: none;
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 0.875rem;
    display: grid;
    place-items: center;
    background: var(--bs-primary);
    color: white;
    font-weight: 900;
    font-size: 1.25rem;
}

.brand-text {
    font-weight: 900;
    letter-spacing: 0.02em;
}

.navbar-nav .nav-link {
    color: rgba(15, 23, 42, 0.70);
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s;
}

.navbar-nav .nav-link:hover {
    color: var(--bs-body-color);
    background: rgba(15, 23, 42, 0.04);
}

.navbar-nav .nav-link.active {
    color: var(--bs-body-color);
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid var(--bs-border-color);
}

.btn {
    border-radius: 0.875rem;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
    box-shadow: 0 0.875rem 1.75rem var(--accent-alpha-22);
}

.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 1rem 2rem var(--accent-alpha-22);
}

.btn-outline-primary {
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
}

.btn-outline-primary:hover {
    background: white;
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.card {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    box-shadow: var(--shadow-lg);
    background: white;
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 1rem;
    display: grid;
    place-items: center;
    background: var(--accent-alpha-10);
    border: 1px solid var(--accent-alpha-22);
    font-weight: 900;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.hero {
    position: relative;
    min-height: 80vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: #f7f8fb;
}

.hero-canvas-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.hero-geo,
.hero-title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block; 
}

.hero-geo {
    z-index: 1;
    opacity: 0.95;
    mix-blend-mode: normal;
}

.hero-title {
    z-index: 3;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background: rgba(255, 255, 255, 0.50);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 4;
    text-align: center;
}

.hero-main-title {
    font-size: clamp(2.5rem, 9vw, 5.5rem);
    font-weight: 900;
    color: var(--bs-primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 0;
    opacity: 0.8;
}

@media (max-width: 560px) {
    .hero-main-title {
        white-space: pre-line;
        word-break: keep-all;
    }

    .hero-subtitle {
        white-space: pre-line;
    }
}

.hero-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(247, 248, 251, 0.95), transparent);
    z-index: 2;
    pointer-events: none;
}

.main {
    padding-top: var(--header-height);
}

.page-hero {
    padding: 4rem 0 2rem;
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section {
    padding: 4rem 0;
}

.section-alt {
    background: rgba(15, 23, 42, 0.03);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.timeline {
    position: relative;
}

.timeline-item {
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 1.5rem;
}

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

.timeline-item .card {
    position: relative;
}

.timeline-badge {
    position: absolute;
    left: 0;
    top: 1.25rem;
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary);
    color: white;
    font-weight: 900;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(167, 45, 40, 0.3);
    z-index: 1;
}

.timeline-item .card-body {
    padding: 1.5rem;
}

.timeline-item h3 {
    margin-top: 0.25rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.timeline-item p {
    line-height: 1.6;
}

.lab-card-img {
    height: 160px;
    width: 100%;
    object-fit: cover;
    border-radius: 0.875rem;
    border: 1px solid var(--bs-border-color);
    background: rgba(15, 23, 42, 0.04);
}

.lab-tags {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.lab-tag {
    font-size: 0.75rem;
    padding: 0.3125rem 0.625rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--bs-border-color);
}

.filter-chip {
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--bs-border-color);
    background: rgba(255, 255, 255, 0.75);
    color: rgba(15, 23, 42, 0.68);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip.active,
.filter-chip:hover {
    color: var(--bs-body-color);
    background: rgba(15, 23, 42, 0.06);
}

.accordion-button:not(.collapsed) {
    background-color: rgba(167, 45, 40, 0.05);
    color: var(--bs-body-color);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--bs-border-color);
}

.site-footer {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.70);
    padding: 3rem 0 2rem;
}

.footer-brand {
    font-weight: 900;
    margin-bottom: 0.75rem;
}

.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: 0.6s opacity ease, 0.6s transform ease;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

.text-muted {
    color: rgba(15, 23, 42, 0.68) !important;
}

.note {
    padding: 1rem 1.25rem;
    border-radius: 0.875rem;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    background: rgba(255, 255, 255, 0.82);
}

.lang-chip {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(15, 23, 42, 0.08);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .hero {
        min-height: 60vh;
    }

    .hero-bg {
        height: 80px;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .timeline-item {
        padding-left: 3rem;
    }

    .timeline-badge {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}

@media (max-width: 767.98px) {
    .page-hero h1 {
        font-size: 1.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-geo {
        display: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

.brand-logo {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.navbar-brand.brand {
    padding-top: 0;
    padding-bottom: 0;
}

.nav-tabs .nav-link {
    border-radius: 999px;
    border: 1px solid var(--bs-border-color);
    background: rgba(255, 255, 255, 0.75);
    color: rgba(15, 23, 42, 0.68);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.nav-tabs .nav-link.active {
    color: var(--bs-body-color);
    background: rgba(15, 23, 42, 0.06);
    border-color: var(--bs-border-color);
}

.nav-tabs {
    border-bottom: none;
}

.offcanvas-header {
    border-bottom: 1px solid var(--bs-border-color);
}

.offcanvas-body .nav-link {
    padding: 0.75rem 1rem;
    border-radius: var(--bs-border-radius);
    border: 1px solid var(--bs-border-color);
    background: rgba(15, 23, 42, 0.03);
    margin-bottom: 0.5rem;
}

.offcanvas-body .nav-link.active {
    background: rgba(15, 23, 42, 0.06);
}

[data-i18n] {
    white-space: pre-line;
}
