@font-face {
    font-family: "H0 Hangul";
    src: url("assets/h0-hangul.woff") format("woff");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    unicode-range: U+B2E4, U+B4DC, U+C9C4;
}

:root {
    color-scheme: dark;
    --bg: #090814;
    --surface: #151222;
    --line: #2a243a;
    --accent: #ff4e7f;
    --ink: #f2eef7;
    --muted: #bfb4d0;
    --sans: "Space Grotesk", "Bahnschrift", "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", "H0 Hangul", "Cascadia Mono", Consolas, "Malgun Gothic", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--accent); color: var(--bg); }
[hidden] { display: none !important; }
.shell { width: min(1200px, calc(100% - 88px)); margin-inline: auto; }
.mono, code, pre { font-family: var(--mono); }
.skip { position: fixed; z-index: 10; top: -5rem; left: 1rem; padding: .7rem 1rem; background: var(--accent); color: var(--bg); }
.skip:focus { top: 1rem; }
h1, h2, h3, p { margin-top: 0; }
em { color: var(--accent); font-style: normal; }

.site-header { border-bottom: 1px solid var(--line); background: #0d0b18; }
.nav { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { display: block; width: 122px; height: auto; }
.nav nav { display: flex; align-items: center; gap: clamp(22px, 4vw, 52px); color: var(--muted); }
.nav nav a:hover { color: var(--accent); }
.button { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; min-height: 49px; padding: 0 20px; border: 1px solid transparent; transition: background .18s, color .18s, border-color .18s; white-space: nowrap; }
.button-small { padding-inline: 16px; min-height: 40px; font-size: .9rem; }
.primary { background: var(--accent); color: var(--bg); cursor: pointer; }
.primary:hover { background: #ff80a3; }
.primary:disabled { opacity: .65; cursor: wait; }
.ghost { border-color: #55445e; color: var(--ink); }
.ghost:hover { border-color: var(--accent); color: var(--accent); background: #201426; }

.hero { position: relative; isolation: isolate; padding-block: clamp(40px, 4.5vw, 68px) clamp(48px, 5.8vw, 80px); }
.hero::before {
    content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse at 68% 37%, #29132d 0%, transparent 59%);
}
.hero h1 { margin: 0 0 clamp(28px, 3.1vw, 43px); font-size: clamp(4.35rem, 10.15vw, 9.15rem); font-weight: 700; line-height: .87; letter-spacing: -.087em; }
.hero h1 span { display: inline-block; }
.calendar { margin: 0; min-width: 0; border: 1px solid #55405e; border-left: 3px solid var(--accent); background: #120e20; box-shadow: 0 19px 50px #0005; }
.calendar-bar, .calendar-bar > div { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.calendar-bar { justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: .875rem; }
.calendar-filename { font-weight: 600; color: var(--ink); }
.calendar-label, .calendar-status { color: var(--muted); }
.calendar-status { font-size: .81rem; }
.calendar-download { color: var(--accent); text-decoration: underline; text-underline-offset: .23em; }
pre { margin: 0; overflow-x: auto; scrollbar-color: #826680 #100d1b; }
.calendar pre { padding: 15px 18px 17px; font-size: clamp(.78rem, 1.14vw, .925rem); line-height: 1.6; color: #e0d8ef; tab-size: 2; }
.calendar pre:focus-visible { outline-offset: -3px; }
.glyph { color: #ff86ac; font-weight: 600; }
.hero-answer { margin-top: clamp(32px, 3.35vw, 47px); }
.answer { margin: 0 0 12px; font-size: clamp(3.9rem, 7.3vw, 7.6rem); line-height: .9; font-weight: 700; letter-spacing: -.085em; }
.hero-description { margin-bottom: 0; font-size: clamp(1.05rem, 1.8vw, 1.45rem); line-height: 1.45; color: var(--muted); }
.hero-description strong { color: var(--ink); font-size: 1.16em; }
.hero-description strong span { font-weight: 500; }
.metrics { background: #100d1b; border-block: 1px solid var(--line); }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-grid > div { display: flex; align-items: center; gap: 18px; min-height: 108px; padding: 14px 26px; border-right: 1px solid var(--line); }
.metric-grid > div:first-child { padding-left: 0; }
.metric-grid > div:last-child { border-right: 0; }
.metric-grid b { color: var(--accent); font-size: clamp(1.95rem, 3.2vw, 2.9rem); line-height: 1; letter-spacing: -.08em; white-space: nowrap; }
.metric-grid b small { font-size: .5em; letter-spacing: -.02em; }
.metric-grid p { margin: 0; font-size: .98rem; font-weight: 700; line-height: 1.3; }
.metric-grid p span { display: block; margin-top: 4px; color: var(--muted); font-size: .83rem; font-weight: 400; }

.section { padding-block: 88px; scroll-margin-top: 28px; }
.language { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); align-items: center; gap: clamp(30px, 6.5vw, 94px); }
.eyebrow { color: var(--accent); letter-spacing: .135em; font-size: .78rem; font-weight: 500; margin: 0 0 14px; }
h2 { margin-bottom: 18px; font-size: clamp(2.65rem, 6vw, 5.05rem); letter-spacing: -.09em; line-height: .97; }
.section-copy > p:not(.eyebrow), .section-intro { color: var(--muted); font-size: 1.045rem; line-height: 1.65; margin-bottom: 18px; }
.section-intro { max-width: 650px; }
.text-link { color: var(--accent); text-decoration: underline; text-decoration-color: #9c5678; text-underline-offset: 4px; font-weight: 600; }
.text-link:hover { text-decoration-color: var(--accent); }
.editor { border: 1px solid #493850; background: #100d1b; min-width: 0; }
.sample-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.sample { background: transparent; color: var(--muted); padding: .8rem 1rem; border: 0; cursor: pointer; font-size: .91rem; font-weight: 600; }
.sample.active { color: var(--accent); box-shadow: inset 0 -2px var(--accent); }
.sample:not(.active):hover { background: var(--surface); color: var(--ink); }
.editor-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px 7px; color: var(--muted); font-size: .84rem; }
.copy { color: var(--ink); border: 1px solid var(--line); background: #21162b; padding: .35rem .55rem; cursor: pointer; font-size: .8rem; }
.copy:hover { border-color: var(--accent); color: var(--accent); }
.editor-code { padding: 14px 18px 10px; color: var(--accent); font-size: clamp(2.1rem, 5.2vw, 4.1rem); line-height: 1.3; letter-spacing: -.07em; }
.example-caption { padding: 0 18px 12px; color: var(--muted); line-height: 1.5; }
.editor-footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; min-height: 48px; align-items: center; padding: 8px 18px; font-size: .87rem; }
#example-status { color: var(--muted); }

.benchmarks { border-block: 1px solid var(--line); background: #100e1c; }
.benchmark-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 25px; }
.benchmark { border: 1px solid var(--line); background: #0e0c19; padding: 20px; }
.benchmark h3 { margin: 0 0 5px; font-size: 1.33rem; letter-spacing: -.04em; }
.benchmark p { margin: 0 0 22px; color: var(--muted); font-size: .85rem; }
.bar-row { font-family: var(--mono); display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 12px; color: var(--accent); font-size: .86rem; }
.bar-row i { height: 4px; width: var(--bar); grid-column: 1 / -1; background: var(--accent); }
.bar-row.baseline { color: var(--muted); }
.bar-row.baseline i { background: #655a71; }
.note { color: var(--muted); margin: 16px 0 0; font-size: .85rem; line-height: 1.5; }
.documentation h2 { font-size: clamp(3rem, 7.3vw, 7rem); }
.documentation-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 27px; }
.documentation-status { min-height: 1.3em; margin: 13px 0 0; color: var(--muted); font-size: .875rem; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); background: #0e0c19; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 80px; font-size: .84rem; }

@media (max-width: 940px) {
    .shell { width: min(100% - 44px, 1200px); }
    .metric-grid > div { padding-inline: 15px; gap: 12px; }
    .section { padding-block: 68px; }
}

@media (max-width: 670px) {
    .shell { width: calc(100% - 32px); }
    .nav { min-height: 62px; gap: 10px; }
    .nav nav { display: none; }
    .hero h1 { font-size: clamp(3.6rem, 12vw, 5.4rem); }
    .calendar-bar { gap: 8px; padding-inline: 12px; }
    .calendar-bar > div { gap: 8px; }
    .calendar pre { padding-inline: 12px; }
    .calendar-status:empty { display: none; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-grid > div { min-height: 70px; border-right: 0; border-bottom: 1px solid var(--line); padding: 9px 0; }
    .metric-grid > div:last-child { border: 0; }
    .metric-grid b { min-width: 80px; }
    .section { padding-block: 52px; }
    .language { grid-template-columns: 1fr; gap: 27px; }
    .benchmark-grid { grid-template-columns: 1fr; }
    .sample { padding: .75rem .6rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0s !important; }
}
