:root {
  --bg0: #070b14;
  --bg1: #0b1220;
  --bg2: #121a2b;
  --line: rgba(148, 163, 184, 0.16);
  --text: #e8eef7;
  --muted: #8fa0b8;
  --accent: #26A17B;
  --accent-2: #1f8f6b;
  --accent-soft: rgba(38, 161, 123, 0.14);
  --danger: #e35d6a;
  --radius: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font: "Pretendard Variable", Pretendard, "Noto Sans KR", sans-serif;
  --max: 1120px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(38, 161, 123, 0.14), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(100, 130, 180, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg1), var(--bg0) 48%, #060a12);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible {
  outline: 2px solid rgba(38, 161, 123, 0.75);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #04110c;
  padding: 8px 12px;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

.container {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 18, 32, 0.82);
  backdrop-filter: blur(12px);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 12px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.15;
}
.brand-text strong {
  font-size: 1.22rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.brand-text small {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.brand-footer .brand-mark { width: 32px; height: 32px; }
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--muted);
  border-radius: 10px;
  transition: color .18s ease, background .18s ease;
}
.nav-link i { font-size: 1.05rem; }
.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.nav-link.nav-cta {
  color: #04110c;
  background: var(--accent);
  font-weight: 650;
}
.nav-link.nav-cta:hover { background: var(--accent-2); color: #04110c; }
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 650;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #04110c;
}
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: rgba(38, 161, 123, 0.45);
  background: var(--accent-soft);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Hero — compact first section */
.hero {
  position: relative;
  min-height: 0;
  display: block;
  padding: 28px 0 32px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -8% auto auto;
  width: min(280px, 48vw);
  height: min(280px, 48vw);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(38, 161, 123, 0.18), transparent 58%),
    repeating-linear-gradient(
      -18deg,
      transparent 0 14px,
      rgba(255, 255, 255, 0.015) 14px 15px
    );
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}
.hero-panel {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0;
  margin-right: auto;
  text-align: left;
}
.hero-brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  opacity: 0;
  animation: rise .7s ease forwards .05s;
}
.hero h1,
.hero-lead {
  text-align: left;
}
.hero .cta-row {
  justify-content: flex-start;
}
.hero-brand .brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}
.hero-brand .brand-text strong {
  font-size: 1.35rem;
}
.hero-brand .brand-text small {
  font-size: 0.78rem;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3.4vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.04em;
  font-weight: 750;
  opacity: 0;
  animation: rise .7s ease forwards .18s;
}
.hero-lead {
  margin: 0 0 18px;
  max-width: 36em;
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  opacity: 0;
  animation: rise .7s ease forwards .32s;
}
.hero .cta-row {
  opacity: 0;
  animation: rise .7s ease forwards .46s;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-18px, 22px, 0) scale(1.04); }
}

/* Sections */
.section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
.section-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.section-hd i {
  color: var(--accent);
  font-size: 1.25rem;
}
.section-hd h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  letter-spacing: -0.03em;
}
.section-sub {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 40em;
}

/* Steps — not cards: connected timeline */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(18, 26, 43, 0.55);
}
.step {
  padding: 22px 20px 24px;
  border-right: 1px solid var(--line);
  position: relative;
}
.step:last-child { border-right: 0; }
.step-num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}
.step h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Preview list rows */
.preview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.preview-head a {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}
.list-table {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(12, 18, 30, 0.65);
}
.list-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 0.9fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; }
.list-row.is-head {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}
.coin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}
.coin-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #04110c;
  display: inline-grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 650;
  background: var(--accent-soft);
  color: #9fe0c8;
  border: 1px solid rgba(38, 161, 123, 0.28);
}
.list-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}
.list-empty i {
  display: block;
  margin-bottom: 8px;
  font-size: 1.4rem;
  color: var(--accent);
}

/* Trade page shell */
.page-hd {
  padding: 36px 0 18px;
}
.page-hd h1 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -0.03em;
}
.page-hd h1 i { color: var(--accent); }
.page-hd p { margin: 0; color: var(--muted); }
.tabs {
  display: flex;
  gap: 6px;
  margin: 18px 0 20px;
  border-bottom: 1px solid var(--line);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 650;
}
.tab.is-on {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.panel-note {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: rgba(18, 26, 43, 0.55);
  color: var(--muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Auth stub */
.auth-wrap {
  width: min(420px, calc(100% - 32px));
  margin: 48px auto 72px;
}
.auth-wrap h1 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.45rem;
}
.auth-wrap h1 i { color: var(--accent); }
.auth-wrap p { color: var(--muted); margin: 0 0 20px; }
.auth-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: rgba(12, 18, 30, 0.7);
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}
.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg0);
}
.field input:disabled { opacity: 0.7; }
.auth-actions { display: grid; gap: 10px; margin-top: 8px; }
.auth-foot {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}
.auth-foot a { color: var(--accent); font-weight: 600; }

/* Switch */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 12, 22, 0.35);
}
.switch-row strong { display: block; font-size: 0.95rem; }
.switch-hint { margin: 4px 0 0; color: var(--muted); font-size: 0.82rem; }
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.switch-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #2a3548;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: background .18s ease;
}
.switch-slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #e8eef7;
  transition: transform .18s ease;
}
.switch input:checked + .switch-slider {
  background: var(--accent);
  border-color: rgba(38, 161, 123, 0.5);
}
.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}
.switch input:focus-visible + .switch-slider {
  outline: 2px solid rgba(38, 161, 123, 0.75);
  outline-offset: 2px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
  background: rgba(0, 0, 0, 0.18);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
}
.footer-brand p,
.footer-meta p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-meta .muted { opacity: 0.8; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
  .list-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }
  .list-row.is-head { display: none; }
  .list-row > :nth-child(1) { grid-column: 1 / -1; }
  .list-row > :nth-child(5) { grid-column: 1 / -1; justify-self: stretch; }
  .list-row .btn { width: 100%; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px 16px;
    background: rgba(11, 18, 32, 0.97);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .nav-link { width: 100%; }
  .hero { padding: 22px 0 26px; }
  .section { padding: 52px 0; }
}
