/* ─── RESET & BASE ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange:       #ff6a00;
  --orange-dim:   #cc5500;
  --orange-glow:  rgba(255, 106, 0, 0.18);
  --bg:           #0a0a0a;
  --bg2:          #111111;
  --bg3:          #1a1a1a;
  --bg4:          #222222;
  --border:       rgba(255, 255, 255, 0.07);
  --border-focus: rgba(255, 106, 0, 0.5);
  --text:         #e8e8e8;
  --text-muted:   #777;
  --text-dim:     #555;
  --green:        #3ddc84;
  --red:          #ff4d4d;
  --yellow:       #f5a623;
  --radius:       14px;
  --radius-sm:    8px;
  --shadow-card:  0 8px 48px rgba(0,0,0,0.6), 0 0 0 1px var(--border);
  --transition:   0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }
.accent { color: var(--orange); }

/* ─── HEADER / NAV ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ─── HERO ─────────────────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 60px 24px;
  position: relative;
  overflow: hidden;
}

/* subtle radial glow behind card */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 500px at 50% 60%, rgba(255,106,0,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-copy {
  text-align: center;
  position: relative;
}

.hero-logo-link { display: inline-block; }

.hero-logo {
  width: min(420px, 85vw);
  height: auto;
  display: block;
  margin: 0 auto 20px;
  filter: drop-shadow(0 0 40px rgba(255,106,0,0.25));
}

.hero-sub {
  color: var(--text-muted);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── SWAP CARD ────────────────────────────────────────────────────── */
.swap-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg3);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 32px;
  position: relative;
  z-index: 1;
}

/* ─── STEP INDICATOR ───────────────────────────────────────────────── */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
}

.si-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.si-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--bg4);
  transition: all var(--transition);
}

.si-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  transition: color var(--transition);
}

.si-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
  margin-bottom: 20px;
  transition: background var(--transition);
}

.si-step.active .si-num {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-glow);
  box-shadow: 0 0 12px var(--orange-glow);
}
.si-step.active .si-label { color: var(--orange); }

.si-step.done .si-num {
  border-color: var(--green);
  color: var(--green);
  background: rgba(61, 220, 132, 0.1);
}
.si-step.done .si-label { color: var(--green); }

.si-line.done { background: var(--green); }
.si-line.active { background: var(--orange-dim); }

/* ─── STEP PANELS ──────────────────────────────────────────────────── */
.step-panel { animation: fadeIn 0.25s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.panel-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* ─── SWAP FIELDS ──────────────────────────────────────────────────── */
.swap-field { margin-bottom: 12px; }

.swap-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.swap-field-input {
  display: flex;
  align-items: center;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.swap-field-input:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255,106,0,0.08);
}

.swap-field-input input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 600;
  padding: 14px 16px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.swap-field-input input::placeholder { color: var(--text-dim); }

.currency-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  border-left: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  height: 100%;
  min-height: 54px;
}

.currency-icon {
  font-size: 1rem;
  color: var(--orange);
}

/* ─── SWAP FLIP ────────────────────────────────────────────────────── */
.swap-arrow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0;
}

.swap-flip-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg4);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.swap-flip-btn svg {
  width: 16px;
  height: 16px;
}
.swap-flip-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-glow);
  transform: rotate(180deg);
}

/* ─── RATE ROW ─────────────────────────────────────────────────────── */
.rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 4px;
  font-size: 0.82rem;
}

.rate-val {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.rate-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  flex-shrink: 0;
}

.rate-dot.pulse {
  animation: pulse 1.6s infinite;
  background: var(--orange);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.rate-fee {
  color: var(--text-dim);
  font-size: 0.78rem;
}

.limits-row {
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-bottom: 8px;
  min-height: 18px;
}

/* ─── ERRORS ───────────────────────────────────────────────────────── */
.error-msg {
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.3);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 0.82rem;
  padding: 10px 14px;
  margin-bottom: 12px;
}

/* ─── BUTTONS ──────────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--orange);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover:not(:disabled) {
  background: #ff8c00;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255,106,0,0.4);
}
.btn-primary:disabled {
  background: var(--bg4);
  color: var(--text-dim);
  cursor: not-allowed;
}

.btn-arrow { transition: transform var(--transition); }
.btn-primary:hover:not(:disabled) .btn-arrow { transform: translateX(4px); }

.btn-secondary {
  padding: 13px 20px;
  background: var(--bg4);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-secondary:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

.step-buttons {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.step-buttons .btn-primary { margin-top: 0; flex: 1; }

/* ─── ORDER SUMMARY (step 2) ───────────────────────────────────────── */
.order-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.summary-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.summary-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.summary-val   { font-size: 1rem; font-weight: 700; }
.summary-arrow { color: var(--orange); font-size: 1.2rem; }

/* ─── FORM FIELDS (step 2) ─────────────────────────────────────────── */
.form-field { margin-bottom: 16px; }

.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.tag-optional {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg4);
  color: var(--text-dim);
  font-weight: 400;
  border: 1px solid var(--border);
}

.field-input,
.field-textarea {
  width: 100%;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.88rem;
  padding: 12px 14px;
  outline: none;
  resize: none;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field-input:focus,
.field-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255,106,0,0.08);
}
.field-textarea { font-family: "SFMono-Regular", "Consolas", monospace; font-size: 0.82rem; }

.field-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 5px;
  display: block;
}

/* ─── CHECKBOX ─────────────────────────────────────────────────────── */
.tos-row { margin-bottom: 4px; }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.checkbox-label input[type=checkbox] { position: absolute; opacity: 0; }

.checkbox-custom {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--border);
  background: var(--bg4);
  flex-shrink: 0;
  margin-top: 1px;
  transition: all var(--transition);
  position: relative;
}
.checkbox-label input:checked + .checkbox-custom {
  background: var(--orange);
  border-color: var(--orange);
}
.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 6px; height: 10px;
  border: 2px solid #000;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.inline-link { color: var(--orange); }

/* ─── STEP 3: DEPOSIT ──────────────────────────────────────────────── */
.deposit-block {
  background: linear-gradient(135deg, rgba(255,106,0,0.08), rgba(255,106,0,0.03));
  border: 1px solid rgba(255,106,0,0.25);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 12px;
}

.deposit-block-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange);
  margin-bottom: 8px;
}

.deposit-amount-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deposit-amount {
  font-size: 1.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.deposit-currency {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: auto;
}

.address-block {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.address-block-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.address-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deposit-addr {
  font-family: "SFMono-Regular", "Consolas", monospace;
  font-size: 0.78rem;
  color: var(--text);
  word-break: break-all;
  flex: 1;
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 7px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn:hover { border-color: var(--orange); color: var(--orange); }

/* ─── META BLOCK ───────────────────────────────────────────────────── */
.meta-block {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
}

.meta-label { color: var(--text-muted); flex-shrink: 0; }

.meta-val {
  font-family: "SFMono-Regular", "Consolas", monospace;
  font-size: 0.75rem;
  color: var(--text);
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  display: inline-block;
}

/* ─── COUNTDOWN ────────────────────────────────────────────────────── */
.countdown-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 0.82rem;
}

.countdown-label { color: var(--text-muted); }

.countdown-timer {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--yellow);
  letter-spacing: 0.04em;
}
.countdown-timer.urgent { color: var(--red); animation: pulse 1s infinite; }

/* ─── STATUS ───────────────────────────────────────────────────────── */
.status-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.status-indicator { display: flex; align-items: center; gap: 8px; }

.status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.awaiting  { background: var(--yellow); animation: pulse 1.5s infinite; }
.status-dot.confirming { background: var(--orange); animation: pulse 1.2s infinite; }
.status-dot.sending   { background: var(--orange); animation: pulse 1s infinite; }
.status-dot.complete  { background: var(--green); }
.status-dot.expired   { background: var(--red); }
.status-dot.refunded  { background: var(--yellow); }

.confirmations { font-size: 0.78rem; color: var(--text-muted); }

/* ─── WARNING ──────────────────────────────────────────────────────── */
.warn-block {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(245,166,35,0.06);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.warn-icon {
  width: 15px; height: 15px;
  flex-shrink: 0;
  color: var(--yellow);
  margin-top: 1px;
}

/* ─── HOW IT WORKS ─────────────────────────────────────────────────── */
.hiw {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

.hiw-grid {
  display: flex;
  align-items: flex-start;
  gap: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.hiw-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  flex: 1;
  min-width: 180px;
  max-width: 220px;
  transition: border-color var(--transition), transform var(--transition);
}
.hiw-card:hover {
  border-color: rgba(255,106,0,0.3);
  transform: translateY(-4px);
}

.hiw-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
  filter: drop-shadow(0 0 8px var(--orange-glow));
}

.hiw-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.hiw-card p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.hiw-connector {
  color: var(--orange-dim);
  font-size: 1.4rem;
  align-self: center;
  padding: 0 8px;
  opacity: 0.5;
  flex-shrink: 0;
}

/* ─── FAQ ──────────────────────────────────────────────────────────── */
.faq {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.faq-inner { max-width: 720px; }

.faq-list { display: flex; flex-direction: column; gap: 8px; }

.faq-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:hover { border-color: rgba(255,106,0,0.25); }
.faq-item[open] { border-color: rgba(255,106,0,0.35); }

.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  color: var(--orange);
  font-size: 1.2rem;
  font-weight: 400;
  transition: transform var(--transition);
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-body {
  padding: 0 20px 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ─── FOOTER ───────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  background: var(--bg2);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-logo { opacity: 0.7; }

.footer-tag {
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-links a:hover { color: var(--text); }

.footer-disclaimer {
  color: var(--text-dim);
  font-size: 0.72rem;
  max-width: 560px;
  line-height: 1.6;
}

/* ─── TOAST ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--green);
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 999;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .swap-card { padding: 24px 18px; }
  .hero { padding: 40px 16px; gap: 36px; }
  .hiw-connector { display: none; }
  .hiw-grid { gap: 12px; }
  .hiw-card { max-width: 100%; min-width: 100%; }
  .summary-arrow { display: none; }
  .order-summary { flex-direction: column; gap: 8px; }
  .truncate { max-width: 140px; }
}
