/* Lanes landing page. Metro tokens from src/App.css and the graph palette from src/ui/log/palette.ts. */
:root {
  --bg: #14161D;
  --bg-deep: #0F1117;
  --panel: #1A1D26;
  --panel-2: #20242F;
  --border: #272B38;
  --inset: #10121A;
  --text: #E8EAF2;
  --muted: #8C93A6;
  --muted-2: #A3AABD;
  --accent: #4C8DFF;
  --accent-strong: #2A66E0;
  --add: #4BD68A;
  --warn: #F2B84B;
  /* graph lines */
  --l-blue: #2F78FF;
  --l-purple: #B04CF0;
  --l-green: #2FD47A;
  --l-orange: #FF9A2E;
  --l-pink: #FF4F9A;
  --l-cyan: #1FD1E0;
  --l-yellow: #F5D33B;
  --font: "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  --display: "Archivo", "IBM Plex Sans KR", -apple-system, "Apple SD Gothic Neo", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
.zoom { display: block; cursor: zoom-in; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #7AAAFF; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
code, kbd { font-family: var(--mono); font-size: .9em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent-strong); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────────── header ───────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(20, 22, 29, .86);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.top .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 800 15px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; }
.brand img { width: 30px; height: 30px; }
.brand:hover { color: var(--text); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--muted-2); text-decoration: none; font-size: 14px; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav .lang { border: 1px solid var(--border); }
.nav .gh { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 760px) {
  .nav .sec { display: none; }
}

/* ───────────── hero ───────────── */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 112px) 0 0; isolation: isolate; }
.hero-lanes { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.hero-lanes path { fill: none; stroke-width: 10; stroke-linejoin: miter; stroke-linecap: butt; }
.hero::after { /* fade lanes into the page */
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%; z-index: -1;
  background: linear-gradient(to bottom, rgba(20, 22, 29, 0), var(--bg) 85%);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 18px; }
.hero-inner > * { max-width: 100%; min-width: 0; }
.hero-icon { width: 112px; height: 112px; filter: drop-shadow(0 12px 28px rgba(47, 120, 255, .25)); }
.hero h1 { margin: 0; font: 800 clamp(48px, 9vw, 88px)/1 var(--display); letter-spacing: -.01em; }
.tagline { margin: 0; max-width: 720px; font-size: clamp(18px, 2.4vw, 22px); line-height: 1.55; color: var(--muted-2); }
.tagline strong { color: var(--text); font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 12px;
  font: 600 16px/1 var(--font); text-decoration: none; color: var(--text);
  border: 1px solid var(--border); background: var(--panel);
  transition: background-color .15s, border-color .15s, transform .15s;
}
.btn:hover { background: var(--panel-2); color: var(--text); border-color: #3A4157; }
.btn.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; box-shadow: 0 8px 24px rgba(42, 102, 224, .35); }
.btn.primary:hover { background: #3574EE; border-color: #3574EE; }
.btn svg { flex: none; }
.meta { margin: 2px 0 0; color: var(--muted-2); font-size: 14px; font-family: var(--mono); letter-spacing: .01em; }
.brew {
  display: flex; align-items: center; gap: 8px; max-width: 100%;
  margin-top: 6px; padding: 6px 6px 6px 16px;
  background: var(--inset); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .4);
}
.brew code { font-size: 14px; color: var(--text); white-space: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.brew code::-webkit-scrollbar { display: none; }
.brew code .p { color: var(--muted); user-select: none; }
.copy {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--muted-2);
  font: 600 13px/1 var(--font); cursor: pointer;
}
.copy:hover { color: var(--text); background: var(--panel-2); }
.copy.done { color: var(--add); border-color: rgba(75, 214, 138, .45); }

.shot-hero { margin: clamp(40px, 6vw, 64px) auto 0; max-width: 1240px; padding: 0 var(--gutter); }

/* window frame around screenshots */
.frame {
  margin: 0; border-radius: 12px; overflow: hidden; background: var(--bg-deep);
  border: 1px solid #2E3343;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .02) inset;
}
.frame .bar { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; background: #1B1E27; border-bottom: 1px solid var(--border); }
.frame .bar i { width: 11px; height: 11px; border-radius: 50%; background: #3A3F4F; }
.frame .bar i:nth-child(1) { background: #FF5F57; }
.frame .bar i:nth-child(2) { background: #FEBC2E; }
.frame .bar i:nth-child(3) { background: #28C840; }
.frame .bar span { margin-left: 8px; color: var(--muted); font-size: 12px; font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
figure { margin: 0; }
figcaption { margin-top: 12px; color: var(--muted-2); font-size: 14px; }

/* ───────────── route (feature sections on a metro line) ───────────── */
main { display: block; }
.route { position: relative; padding: clamp(64px, 9vw, 120px) 0 24px; }
.route::before { /* the trunk line */
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(max(var(--gutter), (100% - var(--wrap)) / 2 + var(--gutter)) + 11px);
  width: 6px; border-radius: 3px;
  background: linear-gradient(to bottom, var(--l-blue) 0%, var(--l-blue) 24%, var(--l-purple) 26%, var(--l-purple) 49%, var(--l-green) 51%, var(--l-green) 74%, var(--l-orange) 76%, var(--l-orange) 100%);
  opacity: .9;
}
.stop { position: relative; padding-left: 64px; margin-bottom: clamp(72px, 10vw, 128px); }
.stop:last-child { margin-bottom: 0; }
.stop::before { /* station */
  content: ""; position: absolute; left: 0; top: 6px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg); border: 6px solid var(--line, var(--l-blue)); box-shadow: 0 0 0 4px var(--bg);
}
.stop-head { max-width: 760px; }
.kicker { margin: 0 0 6px; font: 800 12px/1.2 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--line); }
.stop h2 { margin: 0 0 14px; font: 800 clamp(30px, 4.4vw, 44px)/1.15 var(--display); letter-spacing: -.005em; }
.lead { margin: 0; color: var(--muted-2); font-size: 18px; }
.feats { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 28px; }
.feats li { position: relative; padding-left: 22px; color: var(--muted-2); }
.feats li::before { /* small diamond, like the icon's angled stations */
  content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; background: var(--line); transform: rotate(45deg);
}
.feats b { color: var(--text); font-weight: 600; }
.shots { margin-top: 40px; display: grid; gap: 28px; }
.shots.two { grid-template-columns: 1fr 1fr; }
.shots .wide { grid-column: 1 / -1; }
.shots.side { grid-template-columns: minmax(0, 1fr) 320px; align-items: center; gap: 40px; }
@media (max-width: 860px) {
  .shots.two, .shots.side { grid-template-columns: 1fr; }
  .shots.side .narrow { max-width: 340px; }
}

/* angular lane divider */
.divider { display: block; width: 100%; height: 48px; margin: 0; }
.divider path { fill: none; stroke-width: 6; stroke-linejoin: miter; }

/* ───────────── plain sections ───────────── */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section h2 { margin: 0 0 16px; font: 800 clamp(28px, 4vw, 40px)/1.15 var(--display); }
.section .lead { max-width: 760px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 32px; }
.card { padding: 22px 22px 20px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; border-top: 4px solid var(--line, var(--l-green)); }
.card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.card p { margin: 0; color: var(--muted-2); font-size: 15px; }

.support { text-align: center; }
.support .lead { margin: 0 auto; }
.support .cta { margin-top: 28px; }
.btn.sponsor { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn.sponsor:hover { background: #3574EE; border-color: #3574EE; color: #fff; }
.btn.sponsor svg { color: #FF8FC8; }

.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  padding: 20px 4px; font-weight: 600; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { /* station marker that fills when open */
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--accent); background: transparent;
  transition: background-color .15s;
}
.faq details[open] summary::before { background: var(--accent); }
.faq summary:hover { color: #fff; }
.faq .a { padding: 0 4px 22px 32px; color: var(--muted-2); }
.faq .a p { margin: 0 0 10px; }
.faq .a p:last-child { margin: 0; }

/* ───────────── footer ───────────── */
.foot { border-top: 1px solid var(--border); background: var(--bg-deep); padding: 40px 0 48px; color: var(--muted); font-size: 14px; }
.foot .row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.foot .row + .row { margin-top: 14px; }
.foot a { color: var(--muted-2); }
.foot a:hover { color: var(--text); }
.foot .brand { font-size: 13px; }
.foot .brand img { width: 24px; height: 24px; }
.foot p { margin: 0; }
.foot .tm { margin-top: 18px; font-size: 13px; max-width: 860px; }

/* ───────────── small screens ───────────── */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .top .wrap { gap: 10px; }
  .brand span { display: none; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .hero-icon { width: 88px; height: 88px; }
  .cta .btn { width: 100%; }
  .brew { width: 100%; }
  .brew code { font-size: 12.5px; }
  .meta { font-size: 12.5px; }
  .route::before { left: calc(var(--gutter) + 7px); width: 4px; }
  .stop { padding-left: 40px; }
  .stop::before { width: 20px; height: 20px; border-width: 4px; top: 8px; box-shadow: 0 0 0 3px var(--bg); }
  .frame .bar { height: 22px; padding: 0 8px; gap: 5px; }
  .frame .bar i { width: 8px; height: 8px; }
  .frame .bar span { display: none; }
  .faq summary { font-size: 16px; }
}

/* ───────────── motion ───────────── */
@media (prefers-reduced-motion: no-preference) {
  .hero-lanes path { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 2.4s cubic-bezier(.3, .6, .2, 1) forwards; }
  .hero-lanes path:nth-child(2) { animation-delay: .25s; }
  .hero-lanes path:nth-child(3) { animation-delay: .5s; }
  .hero-lanes path:nth-child(4) { animation-delay: .7s; }
  .hero-lanes path:nth-child(5) { animation-delay: .9s; }
  .hero-lanes path:nth-child(6) { animation-delay: 1.1s; }
  .btn:hover { transform: translateY(-1px); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
