/*
Theme Name: Z-Bike Racing
Description: Z-바이크탁송 (zbike.kr) — 레이싱 다크, 모바일 우선, 탁송비 계산기
Version: 1.0
Author: -
Text Domain: zbike-racing
*/

/* 레이아웃: 한 줄 세로 흐름(모바일) → 넓은 화면은 히어로·계산기 2단. 바탕은 아스팔트 검정, 강조는 형광 라임 하나 */
:root {
  --bg: #0b0d10;
  --surface: #14181e;
  --surface-2: #1c222a;
  --line: #2a313b;
  --text: #f2f4f6;
  --muted: #9aa4b1;
  --lime: #c8f53a;
  --lime-ink: #0b0d10;
  --danger: #ff6b5b;
  --ok: #7ee2a8;
  --f-display: "Black Han Sans", "Noto Sans KR", sans-serif;
  --f-race: "Chakra Petch", "Noto Sans KR", sans-serif;
  --f-body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --r: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--f-body);
  font-size: 16px; line-height: 1.65; word-break: keep-all;
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
[hidden] { display: none !important; }

/* 헤더 */
.hd { position: sticky; top: 0; z-index: 40; background: rgba(11,13,16,0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.hd-in { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 12px; }
.logo { display: flex; align-items: baseline; gap: 8px; }
.logo-mark { font-family: var(--f-race); font-style: italic; font-weight: 700; font-size: 1.45rem; letter-spacing: 0.02em; color: var(--lime); }
.logo-sub { font-weight: 700; font-size: 0.92rem; color: var(--text); }
.hd-tel { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--f-race); font-style: italic; font-weight: 700; font-size: 1.1rem; line-height: 1.1; }
.hd-tel-label { font-family: var(--f-body); font-style: normal; font-weight: 500; font-size: 0.7rem; color: var(--muted); }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 50px; padding: 0 22px; border-radius: 12px; font-weight: 700; font-size: 1rem; border: 1.5px solid transparent; cursor: pointer; transition: transform 0.12s, background 0.12s; }
.btn:active { transform: translateY(1px); }
.btn-lime { background: var(--lime); color: var(--lime-ink); }
.btn-lime:hover { background: #d6fb5c; }
.btn-line { border-color: var(--line); background: transparent; color: var(--text); }
.btn-line:hover { border-color: var(--muted); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* 히어로 */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% center; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,13,16,0.35) 0%, rgba(11,13,16,0.55) 45%, var(--bg) 100%); }
.hero-in { padding-block: 64px 36px; }
.chip { display: inline-block; font-size: 0.82rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(200,245,58,0.14); color: var(--lime); border: 1px solid rgba(200,245,58,0.35); }
.hero-title { margin-top: 16px; font-family: var(--f-display); font-weight: 400; font-size: clamp(3.2rem, 14vw, 6.2rem); line-height: 0.98; letter-spacing: -0.01em; transform: skewX(-8deg); transform-origin: left bottom; text-wrap: balance; }
.hero-title span { display: block; }
.hero-title .hl { color: var(--lime); }
.hero-sub { margin-top: 16px; max-width: 30em; color: #d9dee4; font-size: 1.02rem; }
.hero-cta { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cta .btn { flex: 1 1 160px; }
.hero-facts { list-style: none; margin-top: 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero-facts li { background: rgba(20,24,30,0.78); border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px; font-size: 0.78rem; color: var(--muted); line-height: 1.35; }
.hero-facts strong { display: block; font-family: var(--f-race); font-style: italic; font-size: 1.02rem; color: var(--text); }

/* 계산기 */
.calc { padding-block: 8px 48px; scroll-margin-top: 70px; }
.calc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 18px; position: relative; overflow: hidden; }
.calc-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: repeating-linear-gradient(90deg, var(--lime) 0 18px, transparent 18px 26px); }
.calc-head h2 { font-family: var(--f-display); font-weight: 400; font-size: 1.7rem; letter-spacing: 0.01em; }
.calc-head p { color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.calc-form { margin-top: 18px; display: grid; gap: 16px; }
.route { display: grid; gap: 8px; position: relative; }
.route::before { content: ""; position: absolute; left: 31px; top: 30px; bottom: 30px; border-left: 2px dashed var(--line); }
.addr-box { position: relative; }
.addr { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; min-height: 56px; cursor: text; position: relative; }
.addr:focus-within { border-color: var(--lime); }
.addr-tag { flex: 0 0 40px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; background: var(--lime); color: var(--lime-ink); position: relative; z-index: 1; }
.addr-tag.is-end { background: var(--text); }
.addr input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; font-size: 1rem; text-overflow: ellipsis; }
.addr input.picked { color: var(--lime); font-weight: 700; }
.ac { position: relative; z-index: 2; margin: 6px 0 0; padding: 6px; list-style: none; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,0.55); max-height: 320px; overflow-y: auto; }
.ac li { display: flex; align-items: baseline; gap: 8px; padding: 11px 12px; border-radius: 8px; cursor: pointer; min-width: 0; }
.ac li[aria-selected="true"], .ac li:hover { background: var(--surface-2); }
.ac b { font-weight: 700; color: var(--text); white-space: nowrap; }
.ac b mark { background: none; color: var(--lime); }
.ac small { color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ac .ac-empty { color: var(--muted); cursor: default; display: block; line-height: 1.5; }
.ac .ac-empty:hover { background: none; }
.addr input::placeholder { color: var(--muted); }
.cc { border: 0; }
.cc legend { font-size: 0.86rem; color: var(--muted); margin-bottom: 8px; }
.cc-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cc-opt { position: relative; }
.cc-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.cc-opt span { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); font-weight: 700; font-size: 0.95rem; transition: 0.12s; }
.cc-opt input:checked + span { border-color: var(--lime); color: var(--lime); background: rgba(200,245,58,0.08); }
.cc-opt input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }
.form-msg { min-height: 1.3em; font-size: 0.9rem; font-weight: 500; color: var(--danger); }
.form-msg.ok { color: var(--ok); }

/* 결과: 번호판 */
.result { margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 20px; }
.plate { display: flex; flex-direction: column; align-items: flex-start; background: var(--lime); color: var(--lime-ink); border-radius: 16px; padding: 14px 18px 12px; transform: skewX(-6deg); }
.plate-label { font-size: 0.82rem; font-weight: 700; transform: skewX(6deg); }
.plate-num { font-family: var(--f-race); font-style: italic; font-weight: 700; font-size: clamp(2.3rem, 11vw, 3.2rem); line-height: 1.05; font-variant-numeric: tabular-nums; transform: skewX(6deg); }
.route-meta { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.route-meta div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.route-meta dt { font-size: 0.74rem; color: var(--muted); }
.route-meta dd { font-weight: 700; font-size: 0.95rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result-note { margin-top: 10px; font-size: 0.84rem; color: var(--muted); }

/* 접수 */
.lead { margin-top: 20px; background: var(--surface-2); border-radius: 16px; padding: 18px 14px; display: grid; gap: 14px; }
.lead h3 { font-size: 1.1rem; font-weight: 900; }
.lead-grid { display: grid; gap: 12px; }
.fld { display: grid; gap: 6px; border: 0; min-width: 0; }
.fld > span, .fld legend { font-size: 0.84rem; color: var(--muted); }
.fld em { font-style: normal; font-size: 0.75rem; opacity: 0.8; }
.fld input, .fld textarea { width: 100%; background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; font-size: 1rem; outline: 0; }
.fld input:focus, .fld textarea:focus { border-color: var(--lime); }
.fld textarea { resize: vertical; }
.phone { display: flex; gap: 6px; }
.phone-pre { flex: 0 0 60px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--bg); border: 1.5px solid var(--line); font-weight: 700; }
.phone input { flex: 1; min-width: 0; letter-spacing: 0.04em; }
.mode { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.mode legend { width: 100%; margin-bottom: 4px; }
.mode label { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.mode input, .agree input { accent-color: var(--lime); width: 18px; height: 18px; }
.agree { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.88rem; }
.agree a { color: var(--muted); text-decoration: underline; }
.bad { border-color: var(--danger) !important; }

/* 섹션 공통 */
.sec-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.2; margin-bottom: 18px; text-wrap: balance; }
.why, .steps, .notes { padding-block: 44px; border-top: 1px solid var(--line); }
.why-grid { display: grid; gap: 12px; }
.why-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.why-grid h3 { font-size: 1.15rem; font-weight: 900; color: var(--lime); margin-bottom: 4px; }
.why-grid p { color: #c9d0d8; font-size: 0.95rem; }
.step-list { list-style: none; display: grid; gap: 4px; counter-reset: s; }
.step-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.step-list li:last-child { border-bottom: 0; }
.step-n { flex: 0 0 auto; font-family: var(--f-race); font-style: italic; font-weight: 700; font-size: 1.7rem; line-height: 1; color: var(--lime); min-width: 44px; }
.step-list h3 { font-size: 1.05rem; font-weight: 900; }
.step-list p { color: var(--muted); font-size: 0.93rem; }
.note-list { list-style: none; display: grid; gap: 10px; }
.note-list li { background: var(--surface); border-radius: 12px; padding: 14px 16px; font-size: 0.93rem; color: #c9d0d8; }
.note-list strong { display: block; color: var(--text); font-weight: 900; margin-bottom: 2px; }
.notes-cta { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.notes-cta .btn { flex: 1 1 180px; }

/* 문서 페이지 */
.doc { padding-block: 32px 48px; }
.doc-in { max-width: 820px; }
.doc-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 6vw, 2.3rem); line-height: 1.25; margin-bottom: 20px; }
.doc-body { color: #d3d9df; font-size: 0.97rem; }
.doc-body h1, .doc-body h2, .doc-body h3, .doc-body h4 { color: var(--text); margin: 26px 0 8px; line-height: 1.4; font-weight: 900; }
.doc-body h2 { font-size: 1.2rem; } .doc-body h3 { font-size: 1.08rem; }
.doc-body p, .doc-body ul, .doc-body ol { margin-bottom: 12px; }
.doc-body ul, .doc-body ol { padding-left: 20px; }
.doc-body strong { color: var(--text); }
.doc-body table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 0.9rem; display: block; overflow-x: auto; }
.doc-body th, .doc-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.doc-back { margin-top: 28px; }

/* 푸터 */
.ft { border-top: 1px solid var(--line); padding-block: 32px 24px; color: var(--muted); font-size: 0.84rem; }
.ft-brand { color: var(--text); font-weight: 700; margin-bottom: 6px; }
.ft-brand .logo-mark { font-size: 1.15rem; }
.ft-call a { color: var(--text); font-weight: 700; }
.ft-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0; }
.ft-links a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.ft-biz, .ft-note, .ft-copy { margin-top: 8px; line-height: 1.6; }
.ft-note { font-size: 0.76rem; opacity: 0.8; }

/* 하단 고정 문의 바 */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); background: rgba(11,13,16,0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.dock a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border-radius: 12px; font-weight: 900; font-size: 1rem; white-space: nowrap; }
.dock-call { background: var(--lime); color: var(--lime-ink); flex: 1.4 !important; }
.dock-kakao { background: #fee500; color: #191600; }

/* 주소 검색 창 */

/* 넓은 화면 */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .dock { display: none; }
  .hero-in { padding-block: 96px 64px; max-width: 1120px; }
  .hero-in > * { max-width: 560px; }
  .hero::after { background: linear-gradient(90deg, rgba(11,13,16,0.92) 0%, rgba(11,13,16,0.6) 45%, rgba(11,13,16,0.2) 70%, rgba(11,13,16,0.5) 100%), linear-gradient(180deg, transparent 70%, var(--bg) 100%); }
  .calc { margin-top: -40px; position: relative; z-index: 2; }
  .calc-card { max-width: 760px; margin: 0 auto; padding: 30px 32px; }
  .cc-row { grid-template-columns: repeat(4, 1fr); }
  .lead-grid { grid-template-columns: 1fr 1fr; }
  .fld-wide { grid-column: 1 / -1; }
  .why-grid { grid-template-columns: repeat(3, 1fr); }
  .step-list { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .step-list li { flex-direction: column; border-bottom: 0; border-top: 2px solid var(--lime); padding-top: 16px; }
  .note-list { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
