/* =========================================================================
   페이백데스크 (CoinBack) - Binance KR futures referral / fee-payback site
   Aesthetic: "trading-terminal trust" - calm, precise, dark fintech.
   Mobile-first. Korean: Pretendard. Figures: IBM Plex Mono (tabular).
   ========================================================================= */

:root {
  /* color - terminal dark */
  --bg:            #0a0d11;
  --bg-grid:       #11161d;
  --panel:         #11161d;
  --panel-2:       #161c24;
  --line:          #232c37;
  --line-soft:     #1b222b;
  --text:          #e7eef6;
  --text-dim:      #97a4b2;
  --text-faint:    #66727f;
  /* accent - confident gold (deliberately NOT Binance #F0B90B) */
  --gold:          #f4be4e;
  --gold-deep:     #d99e2b;
  --gold-ink:      #2a1f06;
  /* semantic */
  --green:         #2ec16b;
  --green-soft:    #1d7a47;
  --red:           #ef5350;
  --red-soft:      #6e2624;
  /* type */
  --kr: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  /* space + radius */
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-pill: 999px;
  --maxw: 1120px;
  --shadow: 0 8px 30px rgba(0,0,0,.45);
  --shadow-gold: 0 8px 30px rgba(244,190,78,.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--kr);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  /* subtle terminal grid + a single gold glow behind the hero */
  background-image:
    radial-gradient(900px 480px at 78% -8%, rgba(244,190,78,.10), transparent 60%),
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 100% 100%, 46px 46px, 46px 46px;
  background-position: 0 0, 0 0, 0 0;
  min-height: 100vh;
}

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

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}
.lead { color: var(--text-dim); font-size: 17px; max-width: 60ch; }
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.green { color: var(--green); }
.gold  { color: var(--gold); }
.mono  { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.center { text-align: center; }

/* ---------- type ---------- */
h1, h2, h3 { font-weight: 800; line-height: 1.18; letter-spacing: -0.025em; }
h1 { font-size: clamp(28px, 6.4vw, 52px); }
h2 { font-size: clamp(23px, 4vw, 34px); }
h3 { font-size: clamp(18px, 2.6vw, 22px); }
.section h2 { margin-bottom: 10px; }
.section > .wrap > .lead { margin-bottom: 32px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: var(--r);
  font-family: var(--kr); font-size: 16px; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--gold), var(--gold-deep)); color: var(--gold-ink); box-shadow: var(--shadow-gold); }
.btn-primary:hover { box-shadow: 0 10px 36px rgba(244,190,78,.28); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; font-size: 14px; padding: 0 14px; }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.dest { display:block; font-family: var(--mono); font-size: 11px; color: var(--text-faint); margin-top: 8px; letter-spacing: .02em; }

/* ---------- header (JS-injected into #site-header) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(10,13,17,.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -.03em; }
.brand .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.brand small { font-family: var(--mono); font-weight: 500; font-size: 10px; color: var(--text-faint); letter-spacing:.1em; }
.nav { display: none; gap: 22px; margin-left: 8px; }
.nav a { font-size: 14.5px; color: var(--text-dim); transition: color .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.header-cta { margin-left: auto; display: none; }
.menu-btn { margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); width: 44px; height: 40px; border-radius: var(--r-sm); font-size: 18px; cursor: pointer; }
.mobile-nav { display: none; flex-direction: column; padding: 8px 20px 16px; border-bottom: 1px solid var(--line-soft); background: var(--bg); }
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 12px 0; border-bottom: 1px solid var(--line-soft); color: var(--text-dim); }

@media (min-width: 940px) {
  .nav { display: flex; }
  .menu-btn { display: none; }
  .header-cta { display: inline-flex; }
}

/* ---------- hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; gap: 28px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.badge {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 12px;
  display: inline-flex; align-items: center; gap: 6px; letter-spacing: .02em;
}
.badge .b-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.hero h1 { margin-bottom: 16px; }
.hero h1 .hl { color: var(--gold); }
.hero-sub { color: var(--text-dim); font-size: 17px; max-width: 52ch; margin-bottom: 22px; }

/* offer chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.chip {
  display: flex; align-items: baseline; gap: 8px; padding: 12px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
}
.chip .pct { font-family: var(--mono); font-weight: 600; font-size: 22px; color: var(--gold); font-variant-numeric: tabular-nums; }
.chip .lbl { font-size: 13.5px; color: var(--text-dim); }

/* code chip */
.code-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.code-card .k { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; display:flex; align-items:center; gap:8px; }
.code-row { display: flex; gap: 10px; align-items: stretch; }
.code-box {
  flex: 1; font-family: var(--mono); font-size: clamp(20px,5vw,26px); font-weight: 600;
  letter-spacing: .14em; color: var(--gold); background: var(--bg); border: 1px dashed var(--gold-deep);
  border-radius: var(--r); display: flex; align-items: center; justify-content: center; padding: 12px;
}
.cta-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

/* hero calculator card (signature element) */
.hero-calc { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.hero-calc .hc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.hero-calc .tag { font-family: var(--mono); font-size: 11px; color: var(--text-faint); letter-spacing:.1em; }

/* ---------- calculator ---------- */
.calc-field { margin: 14px 0; }
.calc-field label { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-dim); margin-bottom: 7px; }
.calc-field label .unit { font-family: var(--mono); color: var(--text-faint); font-size: 12px; }
.calc-input {
  width: 100%; height: 48px; padding: 0 14px; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-sm); font-family: var(--mono);
  font-size: 16px; font-variant-numeric: tabular-nums;
}
.calc-input:focus { outline: none; border-color: var(--gold); }
input[type=range] { -webkit-appearance: none; appearance:none; height: 6px; background: var(--line); border-radius: 4px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance:none; width:20px; height:20px; border-radius:50%; background: var(--gold); cursor:pointer; box-shadow:0 0 0 4px rgba(244,190,78,.18); }
.calc-result { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.calc-line { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; font-size: 14px; color: var(--text-dim); }
.calc-line .v { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.calc-big { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding: 14px; background: rgba(46,193,107,.08); border: 1px solid var(--green-soft); border-radius: var(--r); }
.calc-big .lbl { font-size: 14px; color: var(--text); }
.calc-big .amt { font-family: var(--mono); font-weight: 600; font-size: clamp(24px,6vw,32px); color: var(--green); font-variant-numeric: tabular-nums; }
.calc-note { font-size: 11.5px; color: var(--text-faint); margin-top: 12px; line-height: 1.6; }

/* ---------- cards / panels ---------- */
.grid { display: grid; gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 14.5px; }
.icon { width: 38px; height: 38px; border-radius: 10px; background: var(--panel-2); border:1px solid var(--line); display:grid; place-items:center; margin-bottom: 14px; color: var(--gold); font-family: var(--mono); }

/* two-column explainer */
.split { display: grid; gap: 18px; }
.vs-card { background: var(--panel); border:1px solid var(--line); border-radius: var(--r); padding: 18px; }
.vs-card .h { font-family: var(--mono); font-size: 12px; letter-spacing:.08em; color: var(--text-faint); margin-bottom: 8px; }

/* ---------- steps ---------- */
.steps { display: grid; gap: 14px; counter-reset: s; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 14px; background: var(--panel); border:1px solid var(--line); border-radius: var(--r); padding: 18px; }
.step .n { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; font-family: var(--mono); font-weight: 700; }
.step h3 { font-size: 16.5px; margin-bottom: 4px; }
.step p { color: var(--text-dim); font-size: 14px; }
.shot { margin-top: 12px; border:1px dashed var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--text-faint); font-family: var(--mono); font-size: 12px; padding: 22px; text-align:center; }

/* ---------- comparison table ---------- */
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; overflow: hidden; border-radius: var(--r); }
.cmp th, .cmp td { padding: 13px 14px; text-align: right; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.cmp th:first-child, .cmp td:first-child { text-align: left; }
.cmp thead th { font-family: var(--mono); font-size: 12px; color: var(--text-faint); letter-spacing:.04em; background: var(--panel); }
.cmp .me td { background: rgba(244,190,78,.07); }
.cmp .me td:first-child { color: var(--gold); font-weight: 700; }
.cmp .mono { font-family: var(--mono); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 17px 18px; font-weight: 600; font-size: 15.5px; display: flex; justify-content: space-between; gap: 12px; align-items:center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--gold); font-size: 20px; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 18px 18px; color: var(--text-dim); font-size: 14.5px; }

/* ---------- trust / badges ---------- */
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; color: var(--text-faint); font-size: 13px; }
.trust-row .t { display:flex; align-items:center; gap: 7px; }

/* ---------- disclosure / risk ---------- */
.disclosure { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold-deep); border-radius: var(--r); padding: 18px; font-size: 13px; color: var(--text-dim); line-height: 1.75; }
.risk { background: rgba(239,83,80,.06); border: 1px solid var(--red-soft); border-radius: var(--r); padding: 14px 16px; font-size: 13px; color: #f3b1b0; display:flex; gap:10px; }
.risk b { color: var(--red); }
.risk-inline { font-size: 12.5px; color: var(--text-faint); margin-top: 14px; display:flex; gap:8px; align-items:flex-start; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 40px; background: #080b0e; }
.site-footer .wrap { padding: 40px 20px; }
.foot-grid { display: grid; gap: 26px; }
.foot-col h4 { font-size: 13px; color: var(--text-faint); font-family: var(--mono); letter-spacing:.06em; margin-bottom: 12px; text-transform: uppercase; }
.foot-col a { display: block; color: var(--text-dim); font-size: 14px; padding: 5px 0; }
.foot-col a:hover { color: var(--text); }
.foot-bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line-soft); color: var(--text-faint); font-size: 12px; line-height: 1.7; }

/* ---------- sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: flex; gap: 8px; align-items: center; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(10,13,17,.94); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.sticky-cta .sc-code { font-family: var(--mono); color: var(--gold); font-weight: 600; letter-spacing: .08em; font-size: 15px; }
.sticky-cta .btn { flex: 1; min-height: 46px; }
.sticky-cta .copy-mini { background: var(--panel-2); border:1px solid var(--line); color: var(--text); border-radius: var(--r-sm); height: 46px; padding: 0 12px; font-size: 13px; cursor:pointer; }
@media (min-width: 940px) { .sticky-cta { display: none; } }
body { padding-bottom: 76px; }
@media (min-width: 940px) { body { padding-bottom: 0; } }

/* ---------- Kakao floating CS ---------- */
.kakao-fab {
  position: fixed; right: 16px; bottom: 88px; z-index: 65;
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 15px;
  background: #FEE500; color: #191600; border-radius: var(--r-pill); font-weight: 700; font-size: 14px;
  box-shadow: 0 6px 22px rgba(0,0,0,.4); border: none; cursor: pointer;
}
@media (min-width: 940px) { .kakao-fab { bottom: 24px; } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(12px);
  background: var(--green); color: #04130a; font-weight: 700; font-size: 14px; padding: 11px 18px;
  border-radius: var(--r-pill); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- page header (interior pages) ---------- */
.page-head { padding: 48px 0 8px; }
.page-head .crumb { font-family: var(--mono); font-size: 12px; color: var(--text-faint); margin-bottom: 14px; }
.page-head .crumb a:hover { color: var(--gold); }
.prose { max-width: 72ch; }
.prose p { color: var(--text-dim); margin: 14px 0; }
.prose h2 { margin: 36px 0 8px; }
.prose h3 { margin: 24px 0 6px; color: var(--text); }
.prose ul { margin: 12px 0 12px 2px; color: var(--text-dim); }
.prose li { margin: 8px 0 8px 18px; }
.prose strong { color: var(--text); }
.callout { background: var(--panel); border:1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin: 18px 0; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (min-width: 720px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: start; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3,1fr); }
  .grid-4 { grid-template-columns: repeat(4,1fr); }
  .split { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .section { padding: 80px 0; }
}
