/* 지역코드 GN — design system: dark navy + mono/sans, code-driven local SEO landing pages */

:root {
  --bg: #070b14;
  --bg-panel: #0d1420;
  --bg-panel-2: #111a2b;
  --border: #1c2740;
  --border-soft: #16203450;
  --text: #eef2f9;
  --text-dim: #9aa7bd;
  --text-dimmer: #6b7791;
  --green: #45e193;
  --yellow: #ffc84a;
  --purple: #9a7cff;
  --pink: #ff5d78;
  --blue: #6fb7ff;
  --orange: #ff9d5c;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 14px;
  --maxw: 1120px;
  --ease: cubic-bezier(.16,.8,.24,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
::selection { background: var(--green); color: #06110c; }

code, .mono { font-family: var(--mono); }

/* background grid texture + ambient glow blobs for depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  opacity: .5;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 420px at 8% 15%, color-mix(in srgb, var(--cat-color, var(--green)) 14%, transparent), transparent 70%),
    radial-gradient(620px 480px at 96% 55%, color-mix(in srgb, var(--purple) 10%, transparent), transparent 70%),
    radial-gradient(500px 400px at 20% 95%, color-mix(in srgb, var(--yellow) 7%, transparent), transparent 70%);
}
main, header, footer { position: relative; z-index: 1; }

/* ---------- category color system ---------- */
/* set per-page via <body class="cat-industry|tour|agri|newtown|urban|edu">, drives
   --cat-color used by badges, card accents and the ambient glow above */
body.cat-industry { --cat-color: var(--blue); }
body.cat-tour      { --cat-color: var(--green); }
body.cat-agri      { --cat-color: var(--yellow); }
body.cat-newtown   { --cat-color: var(--purple); }
body.cat-urban     { --cat-color: var(--pink); }
body.cat-edu       { --cat-color: var(--orange); }
body:not([class])  { --cat-color: var(--green); }

.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .04em;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--badge-color) 40%, var(--border));
  background: color-mix(in srgb, var(--badge-color) 12%, var(--bg-panel));
  color: var(--badge-color);
}
.cat-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--badge-color); }
.badge-blue   { --badge-color: var(--blue); }
.badge-green  { --badge-color: var(--green); }
.badge-yellow { --badge-color: var(--yellow); }
.badge-purple { --badge-color: var(--purple); }
.badge-pink   { --badge-color: var(--pink); }
.badge-orange { --badge-color: var(--orange); }

/* ---------- Header ---------- */
header.site {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(7,11,20,.85);
  backdrop-filter: blur(10px);
  z-index: 50;
}
header.site .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: 2px;
}
.logo .tag { color: var(--green); }
.logo .bracket { color: var(--text-dimmer); }
nav.main { display: flex; align-items: center; gap: 28px; }
nav.main a {
  font-size: 14.5px;
  color: var(--text-dim);
  transition: color .15s;
  position: relative;
}
nav.main a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: all .2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--green);
  color: #06110c;
  border-color: var(--green);
  box-shadow: 0 0 0 0 rgba(69,225,147,0);
}
.btn-primary:hover {
  background: #5cf0a6;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -6px rgba(69,225,147,.55);
}
.btn-ghost { color: var(--text); }
.btn-ghost:hover { border-color: var(--text-dim); transform: translateY(-1px); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero-outer {
  position: relative;
  background: var(--bg);
  padding: 0;
  border-top: none;
}
/* video box height follows the source's real 16:9 ratio (1920x1080), not an
   arbitrary crop — 56.25vw = 9/16 of the viewport width, capped both ends */
.hero-video-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(360px, 56.25vw, 760px);
  overflow: hidden;
  z-index: 0;
  background: var(--bg);
}
.hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .8;
}
.hero-video-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7,11,20,.05) 0%, rgba(7,11,20,.35) 60%, var(--bg) 100%),
    linear-gradient(90deg, rgba(7,11,20,.8) 0%, rgba(7,11,20,.25) 50%, rgba(7,11,20,.1) 100%);
}
.hero {
  position: relative;
  z-index: 1;
  padding: 84px 0 64px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.hero h1, .hero p.lead, .hero .eyebrow, .hero .hero-note {
  text-shadow: 0 2px 16px rgba(0,0,0,.55);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--cat-color, var(--green));
  border: 1px solid color-mix(in srgb, var(--cat-color, var(--green)) 35%, var(--border));
  background: color-mix(in srgb, var(--cat-color, var(--green)) 14%, var(--bg-panel));
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cat-color, var(--green)); box-shadow: 0 0 8px var(--cat-color, var(--green)); }
h1 {
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.28;
  letter-spacing: -.02em;
  margin: 0 0 20px;
  font-weight: 800;
}
h1 .accent {
  background: linear-gradient(100deg, var(--cat-color, var(--green)), color-mix(in srgb, var(--cat-color, var(--green)) 60%, white) 55%, var(--cat-color, var(--green)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 52ch;
  margin: 0 0 30px;
}
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.hero-note { font-size: 13px; color: var(--text-dimmer); font-family: var(--mono); }

/* code panel */
.codepanel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
}
.codepanel .titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel-2);
}
.codepanel .dots { display: flex; gap: 6px; }
.codepanel .dots span { width: 10px; height: 10px; border-radius: 50%; display: block; }
.codepanel .dots span:nth-child(1) { background: #ff5f57; }
.codepanel .dots span:nth-child(2) { background: #febc2e; }
.codepanel .dots span:nth-child(3) { background: #28c840; }
.codepanel .filename { margin-left: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--text-dimmer); }
.codepanel pre {
  margin: 0;
  padding: 22px 20px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.85;
  overflow-x: auto;
}
.tok-key { color: #7dd3fc; }
.tok-str { color: var(--yellow); }
.tok-num { color: var(--purple); }
.tok-bool { color: var(--green); }
.tok-com { color: var(--text-dimmer); }
.tok-punc { color: var(--text-dimmer); }

/* ---------- Section shell ---------- */
section { padding: 72px 0; border-top: 1px solid var(--border); position: relative; }
section.tight { padding: 56px 0; }
.section-head { max-width: 640px; margin: 0 0 42px; }
.section-head.center { max-width: 640px; margin-left: auto; margin-right: auto; text-align: center; }
.kicker {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--cat-color, var(--purple));
  letter-spacing: .1em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.section-head h1,
.section-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin: 0 0 12px;
  letter-spacing: -.01em;
}
.section-head p { color: var(--text-dim); font-size: 15.5px; margin: 0; }

/* ---------- Cards / grid ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  position: relative;
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--card-accent, var(--cat-color, var(--green)));
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--card-accent, var(--cat-color, var(--green))) 45%, var(--border));
  box-shadow: 0 16px 40px -18px color-mix(in srgb, var(--card-accent, var(--cat-color, var(--green))) 55%, transparent);
}
.card:hover::before { opacity: 1; }
.card .num { font-family: var(--mono); font-size: 13px; color: var(--text-dimmer); margin-bottom: 14px; }
.card h3 { font-size: 17px; margin: 0 0 10px; letter-spacing: -.01em; }
.card p { font-size: 14px; color: var(--text-dim); margin: 0; }
.card .icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-size: 16px;
  font-family: var(--mono);
  font-weight: 600;
}
.icon-green  { background: color-mix(in srgb, var(--green) 16%, var(--bg-panel));  color: var(--green);  --card-accent: var(--green); }
.icon-yellow { background: color-mix(in srgb, var(--yellow) 16%, var(--bg-panel)); color: var(--yellow); --card-accent: var(--yellow); }
.icon-purple { background: color-mix(in srgb, var(--purple) 16%, var(--bg-panel)); color: var(--purple); --card-accent: var(--purple); }
.icon-pink   { background: color-mix(in srgb, var(--pink) 16%, var(--bg-panel));   color: var(--pink);   --card-accent: var(--pink); }
.icon-blue   { background: color-mix(in srgb, var(--blue) 16%, var(--bg-panel));   color: var(--blue);   --card-accent: var(--blue); }
.icon-orange { background: color-mix(in srgb, var(--orange) 16%, var(--bg-panel)); color: var(--orange); --card-accent: var(--orange); }

/* local flavor chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.chip {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 6px 12px;
  border-radius: 999px;
}

/* local intro block */
.local-block {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 40px;
  align-items: start;
}
.local-block .badge {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--yellow);
  margin-bottom: 10px;
  display: block;
}
.local-block h2 { font-size: clamp(22px, 2.8vw, 28px); margin: 0 0 16px; }
.local-block p { color: var(--text-dim); font-size: 15.5px; }
.stat-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  border-left: 3px solid var(--cat-color, var(--green));
}
.stat-box .row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--border); font-size: 14px; gap: 16px; }
.stat-box .row:last-child { border-bottom: none; }
.stat-box .row .k { color: var(--text-dimmer); font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.stat-box .row .v { color: var(--text); font-weight: 500; text-align: right; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; }
.step { position: relative; padding: 0 22px 0 0; }
.step:first-child { padding-left: 0; }
.step .step-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cat-color, var(--green));
  border: 1px solid color-mix(in srgb, var(--cat-color, var(--green)) 45%, var(--border));
  background: color-mix(in srgb, var(--cat-color, var(--green)) 12%, var(--bg-panel));
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.step h3 { font-size: 17px; margin: 0 0 8px; }
.step p { font-size: 14px; color: var(--text-dim); margin: 0; }
.step-connector {
  position: absolute;
  top: 19px;
  left: calc(100% - 11px);
  width: calc(100% - 16px);
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--border) 0 6px, transparent 6px 12px);
}

/* ---------- Pricing ---------- */
.price-card {
  background: linear-gradient(180deg, var(--bg-panel-2), var(--bg-panel));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.price-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(360px 220px at 100% 0%, color-mix(in srgb, var(--cat-color, var(--green)) 16%, transparent), transparent 70%);
  pointer-events: none;
}
.price-ribbon {
  position: absolute;
  top: 18px;
  right: -34px;
  transform: rotate(40deg);
  background: var(--cat-color, var(--green));
  color: #06110c;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 4px 40px;
}
.price-card .plabel { font-family: var(--mono); font-size: 13px; color: var(--cat-color, var(--green)); margin-bottom: 8px; position: relative; }
.price-card .pamount { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -.02em; position: relative; }
.price-card .pamount small { font-size: 16px; font-weight: 500; color: var(--text-dim); }
.price-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; position: relative; }
.price-list li { font-size: 14px; color: var(--text-dim); display: flex; gap: 8px; align-items: baseline; }
.price-list li::before { content: "✓"; color: var(--cat-color, var(--green)); font-family: var(--mono); font-weight: 700; }

/* ---------- Category teaser (home) ---------- */
.cat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat-tile {
  display: block;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
  position: relative;
  overflow: hidden;
}
.cat-tile::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--tile-color);
  opacity: 0; transition: opacity .25s var(--ease);
}
.cat-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tile-color) 45%, var(--border));
  box-shadow: 0 16px 40px -18px color-mix(in srgb, var(--tile-color) 50%, transparent);
}
.cat-tile:hover::before { opacity: 1; }
.cat-tile .tile-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--tile-color); margin-bottom: 14px; display: block; }
.cat-tile h3 { font-size: 18px; margin: 0 0 8px; }
.cat-tile p { font-size: 13px; color: var(--text-dim); margin: 0 0 14px; line-height: 1.55; }
.cat-tile .tile-foot { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--text-dimmer); }
.cat-tile .tile-foot .arrow { color: var(--tile-color); transition: transform .2s var(--ease); }
.cat-tile:hover .tile-foot .arrow { transform: translateX(3px); }
.tile-blue   { --tile-color: var(--blue); }
.tile-green  { --tile-color: var(--green); }
.tile-yellow { --tile-color: var(--yellow); }
.tile-purple { --tile-color: var(--purple); }
.tile-pink   { --tile-color: var(--pink); }
.tile-orange { --tile-color: var(--orange); }

.regions-cta { text-align: center; margin-top: 32px; }

/* ---------- Regions directory page ---------- */
.cat-group { margin-bottom: 56px; }
.cat-group:last-child { margin-bottom: 0; }
.cat-group-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.cat-group-head .dash { width: 28px; height: 3px; border-radius: 2px; background: var(--group-color); }
.cat-group-head h2 { font-size: 20px; margin: 0; }
.cat-group-head span.count { font-family: var(--mono); font-size: 12.5px; color: var(--text-dimmer); }

/* ---------- Region grid (internal linking) ---------- */
.region-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.region-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
  border-left: 3px solid var(--rc-color, var(--border));
}
.region-card:hover {
  border-color: var(--rc-color, var(--green));
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--rc-color, var(--green)) 60%, transparent);
}
.region-card .rname { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.region-card .rname .full { font-size: 12px; color: var(--text-dimmer); font-weight: 400; margin-left: 6px; }
.region-card .rkind { font-family: var(--mono); font-size: 11.5px; color: var(--rc-color, var(--purple)); margin-bottom: 8px; display: block; }
.region-card .rdesc { font-size: 12.5px; color: var(--text-dimmer); line-height: 1.5; }
.region-card.current { border-color: var(--green); background: #0c1a13; }

.region-links { display: flex; flex-wrap: wrap; gap: 8px; }
.region-links a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 7px 13px;
  border-radius: 999px;
  transition: color .15s, border-color .15s;
}
.region-links a:hover { color: var(--cat-color, var(--green)); border-color: var(--cat-color, var(--green)); }
.region-links a.current { color: var(--green); border-color: var(--green); background: #0c1a13; }

/* faq accordion */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s var(--ease);
}
.faq-item[open] { border-color: color-mix(in srgb, var(--cat-color, var(--green)) 40%, var(--border)); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  font-weight: 500;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .q-mark { color: var(--cat-color, var(--green)); font-family: var(--mono); margin-right: 4px; }
.faq-item summary .chev {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  transition: transform .25s var(--ease);
}
.faq-item[open] summary .chev { transform: rotate(45deg); color: var(--cat-color, var(--green)); border-color: var(--cat-color, var(--green)); }
.faq-item .faq-a {
  padding: 0 22px 20px 22px;
  font-size: 14px;
  color: var(--text-dim);
}

/* breadcrumb */
.breadcrumb { font-family: var(--mono); font-size: 12.5px; color: var(--text-dimmer); padding: 20px 0 0; }
.breadcrumb a:hover { color: var(--green); }

/* ---------- CTA band ---------- */
.cta-band {
  border-top: 1px solid var(--border);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(680px 320px at 50% 0%, color-mix(in srgb, var(--cat-color, var(--green)) 14%, transparent), transparent 70%);
  pointer-events: none;
}
.cta-band h2 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 14px; position: relative; }
.cta-band p { color: var(--text-dim); margin: 0 0 30px; position: relative; }
.cta-band .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--border); padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-col h4 { font-size: 13px; color: var(--text-dimmer); font-family: var(--mono); font-weight: 500; margin: 0 0 14px; }
.footer-col a, .footer-col p { display: block; font-size: 13.5px; color: var(--text-dim); margin-bottom: 9px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-dimmer);
  font-family: var(--mono);
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
  .local-block { grid-template-columns: 1fr; }
  .region-grid { grid-template-columns: repeat(2, 1fr); }
  .price-card { grid-template-columns: 1fr; text-align: left; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cat-tiles { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step-connector { display: none; }
  .step { padding-right: 0; }
}
@media (max-width: 640px) {
  nav.main, .header-actions .btn-ghost { display: none; }
  .nav-toggle { display: block; }
  .hero-video { display: none; }
  .region-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .price-list { grid-template-columns: 1fr; }
  h1 { font-size: 30px; }
  .cat-tiles { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
}

/* mobile nav drawer */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0 18px;
  border-top: 1px solid var(--border);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 12px 4px; font-size: 15px; color: var(--text-dim); border-bottom: 1px solid var(--border-soft); }

/* ================= tech / motion accents ================= */

/* terminal blinking cursor — used next to the logo and hero-note */
.term-cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  margin-left: 5px;
  background: currentColor;
  color: var(--cat-color, var(--green));
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}
.logo .term-cursor { color: var(--green); }

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* pulsing "live" status dot (eyebrow badge) */
.eyebrow .dot { position: relative; }
.eyebrow .dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid currentColor;
  animation: ping 2.2s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes ping {
  0%   { transform: scale(1);   opacity: .7; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* code panel typewriter reveal — pure CSS, lands exactly on real char
   count via monospace `ch` units computed per line in build.py. No-ops
   entirely (falls back to fully-visible, static text) when the visitor
   prefers reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .codepanel .type-line {
    display: inline-block;
    vertical-align: top;
    white-space: pre;
    /* clip-path insets are relative to the element's own (auto-sized)
       content box, so this reveals correctly regardless of glyph width —
       IBM Plex Mono has no Hangul, so Korean values in these lines render
       in a fallback CJK font whose characters are wider than a `ch` unit,
       which is why width-based reveal was avoided here. */
    clip-path: inset(0 100% 0 0);
    animation-name: typeLine;
    animation-timing-function: steps(var(--type-steps, 30), end);
    animation-fill-mode: forwards;
    animation-duration: var(--type-duration, 1s);
    animation-delay: var(--type-delay, 0s);
  }
  .codepanel .type-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    margin-left: 1px;
    background: var(--green);
    vertical-align: -2px;
    opacity: 0;
    animation: blink 1s steps(1) infinite, cursorIn .01s var(--cursor-delay, 1s) forwards;
  }
  @keyframes typeLine { to { clip-path: inset(0 0 0 0); } }
  @keyframes cursorIn { to { opacity: 1; } }
}

/* scroll-reveal fade-up — progressive enhancement only; the .js class is
   added synchronously in <head>, so no-JS visitors always see full content */
.reveal { transition: opacity .6s var(--ease), transform .6s var(--ease); }
html.js .reveal { opacity: 0; transform: translateY(18px); }
html.js .reveal.in { opacity: 1; transform: translateY(0); }
.grid-4 .reveal:nth-child(1), .grid-3 .reveal:nth-child(1), .cat-tiles .reveal:nth-child(1), .steps .reveal:nth-child(1), .stat-strip .reveal:nth-child(1) { transition-delay: 0s; }
.grid-4 .reveal:nth-child(2), .grid-3 .reveal:nth-child(2), .cat-tiles .reveal:nth-child(2), .steps .reveal:nth-child(2), .stat-strip .reveal:nth-child(2) { transition-delay: .08s; }
.grid-4 .reveal:nth-child(3), .grid-3 .reveal:nth-child(3), .cat-tiles .reveal:nth-child(3), .steps .reveal:nth-child(3), .stat-strip .reveal:nth-child(3) { transition-delay: .16s; }
.grid-4 .reveal:nth-child(4), .cat-tiles .reveal:nth-child(4), .stat-strip .reveal:nth-child(4) { transition-delay: .24s; }
.cat-tiles .reveal:nth-child(5) { transition-delay: .32s; }
.cat-tiles .reveal:nth-child(6) { transition-delay: .4s; }
.region-grid .reveal:nth-child(4n+1) { transition-delay: 0s; }
.region-grid .reveal:nth-child(4n+2) { transition-delay: .06s; }
.region-grid .reveal:nth-child(4n+3) { transition-delay: .12s; }
.region-grid .reveal:nth-child(4n+4) { transition-delay: .18s; }

/* stat counter strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-strip .stat {
  padding: 30px 20px;
  text-align: center;
  border-left: 1px solid var(--border);
}
.stat-strip .stat:first-child { border-left: none; }
.stat-strip .stat .num {
  display: block;
  font-family: var(--mono);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--cat-color, var(--green));
  letter-spacing: -.01em;
}
.stat-strip .stat .label { font-size: 12px; color: var(--text-dimmer); margin-top: 6px; }

@media (max-width: 640px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip .stat:nth-child(3) { border-left: none; }
}

/* ================= column / articles ================= */
.article-header { padding: 56px 0 40px; }
.article-header .meta-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.article-header .read-time { font-family: var(--mono); font-size: 12.5px; color: var(--text-dimmer); }
.article-header h1 { font-size: clamp(26px, 3.6vw, 38px); margin: 0 0 16px; max-width: 20ch; }
.article-header .dek { font-size: 16.5px; color: var(--text-dim); max-width: 62ch; margin: 0; }

.article-body { max-width: 700px; }
.article-body h2 { font-size: clamp(19px, 2.2vw, 23px); margin: 40px 0 14px; letter-spacing: -.01em; }
.article-body h2:first-child { margin-top: 0; }
.article-body p { font-size: 15.5px; line-height: 1.8; color: var(--text-dim); margin: 0 0 16px; }
.article-body strong { color: var(--text); font-weight: 600; }

.related-box {
  margin-top: 48px;
  padding: 24px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--cat-color, var(--green));
}
.related-box h4 { font-family: var(--mono); font-size: 12.5px; color: var(--text-dimmer); margin: 0 0 12px; letter-spacing: .04em; }
.related-box .region-links { margin: 0; }

.article-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.article-card {
  display: block;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--rc-color, var(--green));
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -18px color-mix(in srgb, var(--rc-color, var(--green)) 50%, transparent); }
.article-card .tag { font-family: var(--mono); font-size: 11px; color: var(--rc-color, var(--green)); letter-spacing: .06em; margin-bottom: 10px; display: block; }
.article-card h3 { font-size: 17px; margin: 0 0 8px; line-height: 1.4; }
.article-card p { font-size: 13.5px; color: var(--text-dim); margin: 0; line-height: 1.55; }

.column-teaser {
  margin-top: 20px;
  padding: 18px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--cat-color, var(--green));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.column-teaser .t { font-size: 14px; }
.column-teaser .t strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 3px; }
.column-teaser .t span { color: var(--text-dim); }
.column-teaser a.arrow-link { font-family: var(--mono); font-size: 13px; color: var(--cat-color, var(--green)); white-space: nowrap; }

@media (max-width: 640px) {
  .article-grid { grid-template-columns: 1fr; }
}

/* Search-friendly representative images */
.seo-featured-image { margin: 0 0 40px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--card); }
.seo-featured-image img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.seo-panel-image { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 1px solid var(--line); }

/* in-text internal links */
.section-head p a, .faq-a a, .card p a { text-decoration: underline; text-underline-offset: 3px; }
