@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@500;600;700;800&family=Wix+Madefor+Display:wght@600;700;800&display=swap');

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

:root {
  --background: 0 0% 100%;
  --foreground: 230 25% 10%;
  --card: 0 0% 100%;
  --primary: 241 100% 50%;
  --primary-hex: #0500FF;
  --primary-light: #3333FF;
  --primary-foreground: #ffffff;
  --secondary: 230 60% 97%;
  --muted-foreground: 229 11% 45%;
  --border: 225 20% 88%;
  --success: #18c463;
  --success-bg: rgba(24, 196, 99, 0.08);
  --error: #ff4444;
  --error-bg: rgba(255, 68, 68, 0.08);
  --warning: #FFB800;
  --shadow-button: 0 18px 40px -14px hsl(var(--primary) / 0.65);
  --font-display: 'Wix Madefor Display', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-ui: Manrope, Inter, system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  overflow-x: hidden;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-display);
  line-height: 1.5;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button, input, textarea { font: inherit; }
button { cursor: pointer; border: none; background: none; }

.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid hsl(var(--border) / 0.4);
  background: hsl(var(--background) / 0.92);
  backdrop-filter: blur(18px);
}
.site-header .container {
  display: flex; min-height: 80px; align-items: center; justify-content: space-between; gap: 20px;
}
.logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  line-height: 0;
}
.logo img {
  display: block;
  width: auto;
  height: 43px;
  max-height: 43px;
  object-fit: contain;
  object-position: left center;
}
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 14px 26px; border-radius: 16px;
  background: hsl(var(--primary)); color: var(--primary-foreground);
  font-size: 16px; font-weight: 700; box-shadow: var(--shadow-button);
  transition: transform 0.2s ease;
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary.btn-full { width: 100%; min-height: 52px; border-radius: 999px; font-size: 18px; font-weight: 800; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 14px 26px; border-radius: 16px;
  border: 1px solid hsl(var(--border)); background: hsl(var(--card));
  color: hsl(var(--foreground)); font-size: 16px; font-weight: 700;
}
.btn-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Landing */
.landing-page { min-height: 100vh; }
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at center, hsl(var(--primary) / 0.07) 0, transparent 58%);
}
.hero-pattern {
  position: absolute; inset: 0; opacity: 0.7;
  background-image: radial-gradient(circle, hsl(var(--border)) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 64px; align-items: center; padding: 80px 0 128px;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid hsl(var(--primary) / 0.2); border-radius: 999px;
  background: hsl(var(--card) / 0.82); padding: 8px 18px;
  color: var(--primary-hex); font-size: 15px; font-weight: 750;
  box-shadow: 0 18px 40px hsl(var(--primary) / 0.1);
  line-height: 1;
}
.badge svg { flex-shrink: 0; display: block; }
.hero h1 {
  display: flex; flex-direction: column; margin-top: 28px;
  font-size: clamp(44px, 6vw, 68px); font-weight: 760; line-height: 1.07;
}
.hero h1 strong { color: var(--primary-hex); font-weight: inherit; }
.hero-copy > p {
  max-width: 580px; margin-top: 26px; font-size: 20px;
  color: hsl(var(--muted-foreground)); line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.hero-checks {
  display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 38px;
  color: hsl(var(--muted-foreground)); font-size: 18px;
}
.hero-checks span { display: inline-flex; align-items: center; gap: 10px; }
.check-icon { width: 20px; height: 20px; color: var(--success); }
.hero-media { display: flex; align-items: center; justify-content: center; }
.hero-cards-showcase {
  position: relative; width: min(100%, 480px); aspect-ratio: 1.05;
}
.showcase-card {
  position: absolute; width: 78%; aspect-ratio: 1.586/1; border-radius: 18px;
  padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 30px 60px rgba(5, 0, 255, 0.25);
  font-family: var(--font-ui);
}
.showcase-card.classic {
  top: 8%; left: 0; z-index: 1;
  background: linear-gradient(135deg, #f5f3ff, #d7d3ff); color: #020099;
  transform: rotate(-8deg);
}
.showcase-card.gold {
  top: 22%; right: 0; z-index: 2;
  background: linear-gradient(135deg, #f5e6a8, #c9a227 45%, #8b6914);
  color: #fff; transform: rotate(6deg);
}
.showcase-card.platinum {
  bottom: 0; left: 18%; z-index: 3;
  background: linear-gradient(135deg, #111, #363636 55%, #555);
  color: #fff; transform: rotate(-2deg);
}
.showcase-card .card-brand { font-size: 11px; font-weight: 900; letter-spacing: 0.04em; }
.showcase-card .card-tier { font-size: 8px; font-weight: 700; letter-spacing: 0.12em; opacity: 0.72; }
.showcase-card .card-chip {
  width: 34px; height: 24px; border-radius: 4px;
  background: currentColor; opacity: 0.35;
}
.showcase-card .card-number {
  font-family: ui-monospace, monospace; font-size: 10px; letter-spacing: 0.08em; opacity: 0.85;
}

.features-strip {
  border-bottom: 1px solid hsl(var(--border) / 0.5);
  padding: 48px 0; background: hsl(var(--secondary) / 0.42);
}
.features-strip .container {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-mini {
  text-align: center; padding: 24px;
  border: 1px solid hsl(var(--border) / 0.6); border-radius: 24px;
  background: hsl(var(--card) / 0.9);
}
.feature-mini h3 { margin-top: 12px; font-size: 18px; font-weight: 760; }
.feature-mini p { margin-top: 8px; color: hsl(var(--muted-foreground)); font-size: 14px; }
.feature-mini-icon {
  width: 48px; height: 48px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px; background: hsl(var(--secondary)); color: var(--primary-hex);
}

/* Flow pages */
.flow-page {
  min-height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, hsl(var(--secondary) / 0.5) 0%, hsl(var(--background)) 40%);
}
.flow-header {
  padding: 20px 0; border-bottom: 1px solid hsl(var(--border) / 0.4);
  background: hsl(var(--background) / 0.92); backdrop-filter: blur(18px);
}
.flow-header .container {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.flow-header .logo img {
  height: 36px;
  max-height: 36px;
}
.flow-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: hsl(var(--muted-foreground)); font-family: var(--font-ui);
  font-size: 14px; font-weight: 700;
}
.flow-back:hover { color: var(--primary-hex); }
.flow-main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 16px 64px;
}
.flow-card {
  width: min(100%, 480px);
  border: 1px solid hsl(var(--border) / 0.8);
  border-radius: 20px; background: hsl(var(--background));
  padding: 32px 28px 28px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.08);
  font-family: var(--font-ui);
}
.flow-card h1 {
  font-size: 24px; font-weight: 800; line-height: 1.2; text-align: center;
}
.flow-card .lead {
  margin-top: 10px; color: hsl(var(--muted-foreground));
  font-size: 15px; font-weight: 600; line-height: 1.45; text-align: center;
}

/* Step tabs */
.step-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 24px 0 28px;
}
.step-tabs span {
  overflow: hidden; border-radius: 10px; background: hsl(var(--secondary) / 0.65);
  padding: 10px 9px; color: hsl(var(--muted-foreground));
  font-size: 12px; font-weight: 800; text-align: center;
  white-space: nowrap; text-overflow: ellipsis;
}
.step-tabs span::before {
  display: inline-block; width: 6px; height: 6px; margin-right: 6px;
  border-radius: 999px; background: hsl(var(--muted-foreground) / 0.28);
  content: ""; vertical-align: middle;
}
.step-tabs .active {
  border: 1px solid var(--primary-hex); background: rgba(5, 0, 255, 0.08); color: var(--primary-hex);
}
.step-tabs .active::before, .step-tabs .done::before { background: var(--primary-hex); }
.step-tabs .done { color: var(--primary-hex); }

/* Card selection */
.card-list { display: grid; gap: 12px; margin-top: 8px; }
.card-option {
  display: grid; grid-template-columns: 88px minmax(0, 1fr) 28px;
  gap: 16px; align-items: center; width: 100%; text-align: left;
  border: 1px solid hsl(var(--border) / 0.75); border-radius: 16px;
  background: hsl(var(--secondary) / 0.34); padding: 12px 14px;
  transition: border-color 0.2s, background 0.2s;
}
.card-option:hover { border-color: rgba(5, 0, 255, 0.3); }
.card-option.selected { border-color: var(--primary-hex); background: rgba(5, 0, 255, 0.04); }
.mini-card {
  display: flex; width: 88px; aspect-ratio: 1.586/1; flex-direction: column;
  justify-content: space-between; overflow: hidden; border-radius: 10px;
  padding: 9px; box-shadow: 0 9px 18px rgba(0, 0, 0, 0.18);
}
.mini-card.classic { background: linear-gradient(135deg, #f5f3ff, #d7d3ff); color: #020099; }
.mini-card.gold { background: linear-gradient(135deg, #f5e6a8, #c9a227 45%, #8b6914); color: #fff; }
.mini-card.platinum { background: linear-gradient(135deg, #111, #363636); color: #fff; }
.mini-card-top, .mini-card-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.mini-card-top span:first-child { font-size: 8px; font-weight: 900; letter-spacing: 0.04em; }
.mini-card-top span:last-child { font-size: 6px; font-weight: 700; letter-spacing: 0.12em; opacity: 0.72; }
.mini-card-bottom { align-items: flex-end; }
.mini-card-bottom i { width: 14px; height: 10px; border-radius: 2px; background: currentColor; opacity: 0.35; }
.mini-card-bottom span { font-family: ui-monospace, monospace; font-size: 7px; letter-spacing: 0.08em; }
.card-option-text strong {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
  font-size: 19px; font-weight: 850; line-height: 1.1;
}
.card-option-text em { color: var(--primary-hex); font-size: 12px; font-style: normal; font-weight: 850; }
.card-option-text small {
  display: block; margin-top: 5px; color: hsl(var(--muted-foreground));
  font-size: 11px; font-weight: 500; line-height: 1.3;
}
.radio-mark {
  display: flex; width: 24px; height: 24px; align-items: center; justify-content: center;
  border: 2px solid hsl(var(--muted-foreground) / 0.28); border-radius: 999px;
}
.card-option.selected .radio-mark { border-color: var(--primary-hex); background: var(--primary-hex); color: #fff; }

/* Form fields */
.field { margin-top: 20px; }
.field label {
  display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800;
  color: hsl(var(--foreground)); letter-spacing: 0.02em;
}
.field input {
  width: 100%; min-height: 52px; padding: 14px 16px;
  border: 1px solid hsl(var(--border)); border-radius: 14px;
  background: hsl(var(--secondary) / 0.35); color: hsl(var(--foreground));
  font-size: 16px; font-weight: 600;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus {
  outline: none; border-color: var(--primary-hex);
  box-shadow: 0 0 0 3px rgba(5, 0, 255, 0.12);
}
.field input::placeholder { color: hsl(var(--muted-foreground) / 0.7); font-weight: 500; }
.field-hint {
  margin-top: 10px; color: hsl(var(--muted-foreground));
  font-size: 13px; font-weight: 600; line-height: 1.5;
}
.field-hint svg { display: inline; vertical-align: -3px; margin-right: 6px; color: var(--primary-hex); }

.email-preview {
  margin-top: 16px; padding: 14px 16px; border-radius: 14px;
  border: 1px dashed hsl(var(--border)); background: hsl(var(--secondary) / 0.3);
  font-size: 13px; color: hsl(var(--muted-foreground)); font-weight: 600; line-height: 1.55;
}
.email-preview strong { color: var(--primary-hex); font-weight: 800; }

/* Seed phrase */
.wallet-illustration {
  position: relative; width: 110px; height: 110px; margin: 24px auto 16px;
}
.wallet-illustration > div {
  display: flex; width: 104px; height: 104px; align-items: center; justify-content: center;
  border: 3px solid rgba(5, 0, 255, 0.14); border-radius: 22px;
  background: rgba(5, 0, 255, 0.13); color: var(--primary-hex);
}
.wallet-illustration > span {
  position: absolute; top: -5px; right: -7px;
  display: flex; width: 36px; height: 36px; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--primary-hex); color: #fff;
}
.seed-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px;
}
.seed-field { position: relative; }
.seed-field label {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 800; color: hsl(var(--muted-foreground)); pointer-events: none;
}
.seed-field input {
  width: 100%; min-height: 46px; padding: 10px 10px 10px 28px;
  border: 1px solid hsl(var(--border)); border-radius: 12px;
  background: hsl(var(--secondary) / 0.35); font-size: 13px; font-weight: 700;
  text-transform: lowercase;
}
.seed-field input:focus {
  outline: none; border-color: var(--primary-hex);
  box-shadow: 0 0 0 3px rgba(5, 0, 255, 0.1);
}

/* Alert banners */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 20px; padding: 14px 16px; border-radius: 14px;
  font-size: 14px; font-weight: 600; line-height: 1.45;
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-error { border: 1px solid rgba(255, 68, 68, 0.35); background: var(--error-bg); color: #c62828; }
.alert-error svg { color: var(--error); }
.alert-success { border: 1px solid rgba(24, 196, 99, 0.35); background: var(--success-bg); color: #0d7a3f; }
.alert-success svg { color: var(--success); }
.alert-info { border: 1px solid rgba(5, 0, 255, 0.2); background: rgba(5, 0, 255, 0.06); color: #333; }

/* Seed states */
.seed-grid.is-error .seed-field input {
  border-color: rgba(255, 68, 68, 0.55); background: rgba(255, 68, 68, 0.04);
}
.seed-grid.is-success .seed-field input {
  border-color: rgba(24, 196, 99, 0.55); background: rgba(24, 196, 99, 0.06);
}

.security-note {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid hsl(var(--border) / 0.6);
  color: hsl(var(--muted-foreground)); font-size: 12px; font-weight: 700; text-align: center; line-height: 1.5;
}

/* Confirmation */
.success-icon {
  width: 88px; height: 88px; margin: 8px auto 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--success-bg); color: var(--success);
}
.confirmation-details {
  margin-top: 24px; display: grid; gap: 14px;
  border: 1px solid hsl(var(--border) / 0.75); border-radius: 16px;
  background: hsl(var(--secondary) / 0.3); padding: 18px 16px;
}
.confirmation-details div {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 14px; font-weight: 600; color: hsl(var(--muted-foreground));
}
.confirmation-details strong { color: hsl(var(--foreground)); font-weight: 850; text-align: right; }
.timeline {
  margin-top: 24px; display: grid; gap: 16px;
}
.timeline-item {
  display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start;
}
.timeline-dot {
  width: 36px; height: 36px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 0, 255, 0.1); color: var(--primary-hex); font-size: 14px; font-weight: 800;
}
.timeline-dot.done { background: var(--success-bg); color: var(--success); }
.timeline-item h4 { font-size: 15px; font-weight: 800; }
.timeline-item p { margin-top: 4px; font-size: 13px; color: hsl(var(--muted-foreground)); font-weight: 600; line-height: 1.45; }

/* Design preview nav */
.preview-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  padding: 10px 16px; background: #12131A; color: #fff;
  font-family: var(--font-ui); font-size: 12px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px;
}
.preview-bar a {
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.1); font-weight: 700;
}
.preview-bar a:hover, .preview-bar a.current { background: var(--primary-hex); }
.preview-bar .label { opacity: 0.6; font-weight: 600; }
body.has-preview { padding-bottom: 52px; }

/* Language selector */
.lang-selector { position: relative; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 14px;
  border: 1px solid hsl(var(--border) / 0.65); border-radius: 16px;
  background: hsl(var(--card) / 0.8); color: hsl(var(--foreground));
  font-family: var(--font-ui); font-size: 14px; font-weight: 700;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.lang-trigger:hover, .lang-trigger[aria-expanded="true"] {
  border-color: rgba(5, 0, 255, 0.35); background: rgba(5, 0, 255, 0.05);
  box-shadow: 0 8px 24px rgba(5, 0, 255, 0.1);
}
.lang-flag { font-size: 18px; line-height: 1; }
.lang-code { font-weight: 800; letter-spacing: 0.04em; }
.lang-chevron { opacity: 0.55; transition: transform 0.2s; }
.lang-trigger[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }
.lang-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 200;
  min-width: 220px; max-height: 320px; overflow-y: auto;
  padding: 6px; border: 1px solid hsl(var(--border) / 0.65);
  border-radius: 18px; background: hsl(var(--card) / 0.98);
  box-shadow: 0 16px 40px rgba(5, 0, 255, 0.12);
  backdrop-filter: blur(8px);
}
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
.lang-option {
  display: flex; width: 100%; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  font-family: var(--font-ui); font-size: 14px; font-weight: 600;
  color: hsl(var(--foreground)); text-align: start;
  transition: background 0.15s;
}
.lang-option:hover { background: hsl(var(--secondary)); }
.lang-option.is-active { background: rgba(5, 0, 255, 0.08); color: var(--primary-hex); }
.lang-name { flex: 1; }
.lang-code-sm {
  font-size: 11px; font-weight: 800; color: hsl(var(--muted-foreground));
  letter-spacing: 0.06em;
}
.flow-header .container { gap: 12px; }
.flow-header .header-right {
  display: flex; align-items: center; gap: 12px; margin-left: auto;
}
[dir="rtl"] .flow-header .header-right { margin-left: 0; margin-right: auto; }

/* Page transitions */
body.page-enter { animation: pageIn 0.35s ease; }
body.page-leave { animation: pageOut 0.18s ease forwards; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pageOut {
  to { opacity: 0; transform: translateY(-8px); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; padding: 56px 0 80px; text-align: center; }
  .hero-copy > p { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-checks { justify-content: center; }
  .features-strip .container { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .site-header .container { min-height: 68px; }
  .logo img { height: 28px; max-height: 28px; }
  .flow-header .logo img { height: 28px; max-height: 28px; }
  .hero h1 { font-size: 40px; }
  .hero-copy > p { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; }
  .flow-card { padding: 24px 20px 20px; }
  .seed-grid { grid-template-columns: repeat(2, 1fr); }
  .card-option { grid-template-columns: 76px minmax(0, 1fr) 24px; gap: 10px; }
  .mini-card { width: 76px; }
}
