/* ===== Tokens ===== */
:root {
    --bg: #ffffff;
    --bg-soft: #f7f8fa;
    --bg-ph: #f0f2f5;
    --text: #14171c;
    --text-secondary: #5c6570;
    --text-muted: #8b939e;
    --line: #e6e9ee;
    --line-strong: #d5dae2;
    --blue: #2f6fed;
    --blue-hover: #1f5ad4;
    --blue-soft: rgba(47, 111, 237, 0.08);
    --blue-glow: #4d8aff;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-pill: 999px;
    --shadow-nav: 0 4px 24px rgba(20, 23, 28, 0.06);
    --font: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
    --header-h: 72px;
    --page-pad: 30px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font);
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(47, 111, 237, 0.06), transparent 55%),
        linear-gradient(180deg, #fafbfd 0%, var(--bg) 18%, var(--bg) 100%);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

/* ===== Image placeholders ===== */
.ph {
    position: relative;
    background:
        linear-gradient(145deg, #f4f6f9 0%, #ebeef3 100%);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ph::after {
    content: attr(data-label);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 0;
}

.ph img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ph picture {
    display: contents;
}

.ph.is-empty img,
.ph img[src=""] {
    display: none;
}

.ph:not(.is-empty) img:not([src]),
.ph:not(.is-empty) img[src=""] {
    display: none;
}

.ph.has-image {
    border-style: solid;
    border-color: transparent;
    background: transparent;
}

.ph.has-image::after {
    display: none;
}

/* ===== Header ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 var(--page-pad);
    background: transparent;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, background 0.2s;
}

.site-header.is-scrolled {
    background: transparent;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.brand {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    justify-self: start;
}

.brand-world {
    color: #405b94;
}

.nav-pill {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-nav);
}

.nav-pill a {
    padding: 0.55rem 1.35rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}

.nav-pill a:hover,
.nav-pill a.is-active {
    color: var(--text);
    background: var(--bg-soft);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-self: end;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-soft);
    animation: status-dot-pulse 1.6s ease-in-out infinite;
}

@keyframes status-dot-pulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 3px var(--blue-soft);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 5px rgba(47, 111, 237, 0.14);
    }
}

.status-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-right: 0.35rem;
}

.nav-toggle {
    display: none;
    width: 34px;
    height: 34px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 16px;
    height: 1.5px;
    background: var(--text);
}

.nav-drawer {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 99;
    flex-direction: column;
    padding: 1.25rem clamp(1.5rem, 6vw, 3rem) 1.75rem;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.nav-drawer[hidden] {
    display: none !important;
}

.nav-drawer a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    font-weight: 500;
    font-size: 1.05rem;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    margin: 0 auto;
    padding: 0;
    text-align: center;
    background: #f0f2f6;
}

.hero-visual {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
}

.ph--hero {
    width: 100%;
    max-height: none;
    aspect-ratio: auto;
    margin: 0;
    border: none;
    border-radius: 0;
    background:
        radial-gradient(circle at 50% 45%, rgba(77, 138, 255, 0.12), transparent 55%),
        linear-gradient(160deg, #f5f7fb, #e8ecf3);
}

.ph--hero img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.hero-copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -140px;
    z-index: 2;
    padding: 0 var(--page-pad) 60px;
    box-sizing: border-box;
    background: #f1f2f7;
}

@media (min-width: 1200px) {
    .hero-copy {
        bottom: -120px;
    }
}

.hero-copy .eyebrow {
    color: #405b94;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-bottom: 0.85rem;
}

.hero-copy h1 {
    font-size: clamp(1.75rem, 4.2vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.hero-sub {
    font-size: clamp(0.95rem, 2vw, 1.125rem);
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-width: 200px;
    padding: 0.9rem 2.75rem 0.9rem 3rem;
    background: #136fb4;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    transition: background 0.15s, transform 0.15s;
}

.btn-primary:hover {
    background: #476097;
    transform: translateY(-1px);
}

/* ===== Concept ===== */
.concept {
    margin: 0 auto;
    padding: 0 var(--page-pad) 0px;
}

.concept-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4.5rem;
    position: relative;
}

.concept-grid::before {
    content: "";
    position: absolute;
    top: 50px;
    bottom: 50px;
    left: 50%;
    width: 1px;
    background: var(--line);
    transform: translateX(-50%);
    pointer-events: none;
}

.concept-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 1.75rem 0  1.5rem;
}

.concept-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
}

.concept-card > p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.ph--diagram {
    aspect-ratio: 16 / 7;
    width: 90%;
}

/* ===== Tech ===== */
.tech {
    margin: 0 auto;
    padding: 16px var(--page-pad) 16px;
}

.section-title {
    text-align: center;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.tech .section-title,
.research .section-title {
    text-align: left;
    margin-left: 20px;
}
.tech .section-title {
    margin-bottom: 1.5rem;
}

.tech .section-title {
    margin-bottom: 1rem;
}

.section-title span {
    display: inline;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.85em;
}

.tech-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr) 38px minmax(0, 1fr) 38px minmax(0, 1fr) 38px minmax(0, 1fr);
    align-items: center;
    justify-items: center;
    gap: 0.2rem 0;
}

.tech-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    color: var(--text-muted);
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1;
    user-select: none;
}

.tech-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 230px;
    padding: 0.5rem 0.5rem 0.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fafbfd;
    min-height: 0;
    min-width: 0;
}

.ph--icon {
    width: min(148px, 100%);
    aspect-ratio: 1;
    height: auto;
    border-radius: 12px;
    margin-bottom: 0.35rem;
    flex-shrink: 0;
}

.tech-card h3 {
    font-size: 0.92rem;
    font-weight: 650;
    margin-bottom: 0.2rem;
}

.tech-card .en {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: auto;
    padding-bottom: 0.4rem;
}

.tech-num {
    display: block;
    align-self: stretch;
    box-sizing: border-box;
    margin: 0 -0.5rem;
    padding: 0.4rem 0.5rem 0;
    border-top: 1px solid var(--line);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* ===== Research ===== */
.research {
    margin: 0 auto;
    padding: 30px var(--page-pad) 60px;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
}

.research-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.research-text {
    padding: 1.5rem 1.5rem 0.75rem;
}

.research-text h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.research-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.ph--research {
    aspect-ratio: 16 / 9;
    margin: 0.5rem 1rem 1rem;
    border-radius: 10px;
}

/* ===== Simulation ===== */
.simulation {
    margin: 0 auto;
    padding: 30px var(--page-pad) 70px;
    background: rgb(240, 242, 246, 0.5);
}

.sim-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
}

.sim-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    padding: 1.25rem 1rem 1rem;
}

.sim-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.sim-card > p {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.ph--sim {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
}

/* ===== Closing ===== */
.closing {
    margin: 0 auto;
    padding: 40px var(--page-pad) 0;
    text-align: center;
}

.closing h2 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    margin-bottom: 0;
}

.closing > p {
    color: var(--text-secondary);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 400;
    margin-bottom: 2.5rem;
}

.ph--wave {
    width: min(900px, 100%);
    aspect-ratio: 2008 / 160;
    margin: 0 auto;
    border: none;
    background: none;
}

.ph--orb {
    width: min(280px, 55vw);
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 50%;
    border: none;
    background:
        radial-gradient(circle at 40% 35%, #7eb0ff, var(--blue) 45%, #1a3f9a 80%, transparent 82%);
    box-shadow:
        0 0 60px rgba(47, 111, 237, 0.35),
        0 20px 40px rgba(47, 111, 237, 0.15);
}

.ph--orb::after {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
}

.ph--orb.has-image {
    box-shadow: none;
    background: transparent;
}

/* ===== About page ===== */
.about-intro {
    margin: 0 auto;
    padding: 160px clamp(48px, 10vw, 60px) clamp(2rem, 4vw, 3rem);
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.about-intro-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.about-intro-copy h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.about-title-mark {
    display: inline-block;
    position: relative;
    padding-bottom: 0.25em;
}

.about-title-mark::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 90%;
    height: 3px;
    background: var(--blue);
    border-radius: 1px;
}

.about-intro-copy p {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 1.15rem;
}

.about-intro-copy p:last-child {
    margin-bottom: 0;
}

.about-intro-visual {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-left: clamp(0.5rem, 2vw, 1.5rem);
}

.ph--about-hero {
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    border: none;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

.ph--about-hero img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center right;
}

.about-directions {
    margin: 0 auto;
    padding: clamp(2.5rem, 4vw, 3.5rem) clamp(8px, 7vw, 60px);
    text-align: center;
}

body[data-page="about"] .about-directions {
    padding-top: 160px;
}

.about-directions-title {
    font-size: clamp(1.5rem, 3.2vw, 1.95rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2.25rem;
    display: inline-block;
    position: relative;
    padding-bottom: 0.65rem;
}

.about-directions-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-27%);
    width: 60px;
    height: 3px;
    border-radius: 2px;
    background: var(--blue);
}

.about-directions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    text-align: left;
}

.about-dir-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow: 0 8px 28px rgba(20, 23, 28, 0.04);
    min-height: 220px;
}

.ph--about-icon {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 10px;
    margin-bottom: 1.15rem;
    background: transparent;
}

.ph--about-icon img {
    object-fit: contain;
}

.about-dir-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.55rem;
}

.about-dir-card p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.about-closing {
    padding-left: clamp(8px, 7vw, 60px);
    padding-right: clamp(8px, 7vw, 60px);
    padding-bottom: 2rem;
}

/* ===== Footer ===== */
.site-footer {
    margin: 0 auto;
    padding: 2.5rem var(--page-pad) 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid transparent;
}

.footer-left,
.footer-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.footer-right a + a {
    padding-left: 1rem;
    border-left: 1px solid var(--line-strong);
}

.site-footer a:hover {
    color: var(--text);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .tech-arrow {
        display: none;
    }

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

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

    .about-directions-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    :root {
        --page-pad: 20px;
        --header-h: 64px;
    }

    html {
        scroll-padding-top: 88px;
    }

    .nav-pill {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-drawer:not([hidden]) {
        display: flex;
    }

    .site-header {
        grid-template-columns: 1fr auto;
        padding: 0 16px;
        background: rgba(255, 255, 255, 0.92);
        border-bottom-color: var(--line);
    }

    .brand {
        font-size: 0.88rem;
        max-width: calc(100vw - 96px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero {
        padding-top: calc(var(--header-h) + 10px);
    }

    .hero-copy {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        padding: 1rem var(--page-pad) 1.75rem;
        background: #f1f2f7;
    }

    .hero-copy h1 {
        font-size: clamp(1.45rem, 6.5vw, 1.85rem);
        margin-bottom: 0.75rem;
    }

    .hero-sub {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }

    .btn-primary {
        min-width: 0;
        width: 100%;
        max-width: 280px;
        padding: 0.85rem 1.75rem;
        font-size: 0.95rem;
    }

    .status-text {
        display: none;
    }

    .concept {
        padding: 1.75rem var(--page-pad) 0.5rem;
    }

    .concept-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .concept-grid::before {
        display: none;
    }

    .concept-card {
        padding: 0.5rem 0 0.25rem;
    }

    .ph--diagram {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .tech {
        padding: 2rem var(--page-pad) 1.25rem;
    }

    .tech .section-title,
    .research .section-title {
        margin-left: 0;
        text-align: left;
    }

    .section-title {
        margin-bottom: 1.25rem;
        font-size: 1.35rem;
    }

    .section-title span {
        display: block;
        margin-top: 0.35rem;
    }

    .tech-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        justify-items: stretch;
    }

    .tech-card {
        max-width: none;
        width: 100%;
    }

    .ph--icon {
        width: min(120px, 72%);
    }

    .research {
        padding: 1.75rem var(--page-pad) 2.5rem;
    }

    .research-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .research-text {
        padding: 1.25rem 1.25rem 0.5rem;
    }

    .ph--research {
        margin: 0.35rem 1rem 1rem;
    }

    .simulation {
        padding: 1.75rem var(--page-pad) 2.5rem;
    }

    .sim-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .closing {
        padding: 2rem var(--page-pad) 0;
    }

    .closing h2 {
        font-size: clamp(1.45rem, 6vw, 1.85rem);
        line-height: 1.35;
    }

    .closing > p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .about-intro {
        padding: 1.25rem var(--page-pad) 1.75rem;
    }

    .about-intro-copy h2 {
        margin-bottom: 1.15rem;
    }

    .about-intro-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-intro-visual {
        justify-content: center;
        padding-left: 0;
        margin-top: 0.25rem;
    }

    .ph--about-hero {
        margin: 0 auto;
        max-width: min(320px, 92%);
    }

    .about-directions {
        padding: 2rem var(--page-pad);
    }

    body[data-page="about"] .about-directions {
        padding-top: 1.25rem;
    }

    .about-dir-card {
        min-height: 0;
        padding: 1.35rem 1.25rem 1.25rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .about-dir-card h3 {
        text-align: center;
    }

    .about-dir-card p {
        align-self: stretch;
        text-align: left;
    }

    .ph--about-icon {
        margin-bottom: 0.85rem;
    }

    .about-closing {
        padding-left: var(--page-pad);
        padding-right: var(--page-pad);
    }

    .site-footer {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 1.75rem var(--page-pad) 1.5rem;
        gap: 0.75rem;
    }

    .footer-left,
    .footer-right {
        justify-content: center;
    }

    .footer-right {
        gap: 0.75rem;
    }

    .footer-right a + a {
        padding-left: 0.75rem;
    }
}

@media (max-width: 480px) {
    :root {
        --page-pad: 16px;
    }

    .tech-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        max-width: 320px;
        margin: 0 auto;
    }

    .tech-card h3 {
        font-size: 0.95rem;
    }

    .ph--icon {
        width: min(140px, 70%);
    }
}
