/* Dark-first; the light palette only swaps tokens. */
:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-raised: #12151d;
  --border: #232836;
  --text: #e7e9ef;
  --text-muted: #9aa1b2;
  --accent: #7c8cff;
  --accent-2: #3fd0c9;
  --accent-text: #0b0d12;
  --glow: rgba(124, 140, 255, 0.18);
  --radius: 14px;
  --gutter: clamp(16px, 5vw, 32px);
  --max: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f7f8fb;
    --bg-raised: #ffffff;
    --border: #e1e4ec;
    --text: #151823;
    --text-muted: #5b6275;
    --accent: #4a5ae8;
    --accent-2: #0f9e97;
    --accent-text: #ffffff;
    --glow: rgba(74, 90, 232, 0.12);
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(60rem 30rem at 80% -10%, var(--glow), transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all; /* avoid mid-word breaks in Korean */
  overflow-wrap: anywhere;
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--accent);
  color: var(--accent-text);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.lang {
  display: inline-flex;
  gap: 4px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.lang:hover { border-color: var(--accent); }
.lang[data-current="en"] [data-lang="en"],
.lang[data-current="ko"] [data-lang="ko"] { color: var(--text); font-weight: 600; }

/* Hero */
.hero { padding-block: clamp(56px, 12vw, 128px) clamp(48px, 8vw, 88px); }
.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}
h1 {
  margin: 0;
  max-width: 16ch;
  white-space: pre-line;
  font-size: clamp(2.3rem, 6.5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--text) 40%, var(--accent) 80%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  margin: 20px 0 0;
  max-width: 56ch;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--text-muted);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, white); }
.btn-secondary { color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); }

/* Services */
h2 {
  margin: 0 0 24px;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
}
.services { padding-block: 24px 64px; scroll-margin-top: 16px; }

/* Sub-pages */
.hero-sub { padding-block: clamp(32px, 7vw, 72px) clamp(32px, 6vw, 56px); }
.hero-sub h1 { max-width: 20ch; font-size: clamp(2rem, 5vw, 3.2rem); }
.back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
}
.back:hover { color: var(--text); }
.section { padding-block: 16px 56px; scroll-margin-top: 16px; }
.steps {
  margin: 0 0 28px;
  padding: 0;
  max-width: 68ch;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 16px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  min-height: 30px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
/* Transit page */
.figures {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
@media (min-width: 900px) { .figures { grid-template-columns: repeat(4, 1fr); } }
.figure {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.figures h3 { margin: 12px 0 4px; font-size: 1rem; }
.figures p:not(.figure) { margin: 0; font-size: 0.95rem; color: var(--text-muted); }
.checks {
  margin: 0;
  padding: 0;
  max-width: 68ch;
  list-style: none;
  display: grid;
  gap: 12px;
}
.checks li { position: relative; padding-left: 30px; color: var(--text-muted); }
.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--accent);
}
.checks strong { color: var(--text); }
.checks strong::after { content: " —"; font-weight: 400; color: var(--text-muted); }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 4px 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.grid.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid.grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid.grid-4 { grid-template-columns: repeat(4, 1fr); } }
.faq { display: grid; gap: 12px; max-width: 68ch; }
.faq details {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.faq summary { padding: 16px 20px; font-weight: 600; cursor: pointer; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--text-muted); }
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 56px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(30rem 12rem at 100% 0%, var(--glow), transparent 70%),
    var(--bg-raised);
}
.cta-band h2 { margin: 0 0 4px; }
.cta-band p { margin: 0; color: var(--text-muted); }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 12px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.card h3 { margin: 0; font-size: 1.3rem; letter-spacing: -0.01em; }
.card-tag { margin: 0 0 8px; font-size: 0.9rem; color: var(--accent-2); font-weight: 600; }
.card p { margin-top: 0; }
.card h3 + p:not(.card-tag) { margin-top: 8px; }
.card > p:not(.card-tag) { color: var(--text-muted); }
.features {
  margin: 4px 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.features li { position: relative; padding-left: 22px; }
.features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.card .btn { margin-top: auto; align-self: flex-start; }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 28px 36px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.site-footer p { margin: 0; }

@media (max-width: 640px) {
  .card { padding: 22px; }
}
