/* ─── TOKENS ─────────────────────────────────────────────────── */
:root {
  --bg:            #F8F9FA;
  --card:          #FFFFFF;
  --primary:       #1E3A5F;
  --primary-h:     #2A4F7E;
  --accent:        #00C9A7;
  --accent-h:      #00B394;
  --text:          #0F1923;
  --text-2:        #3D4F61;
  --muted:         #64748B;
  --border:        rgba(30, 58, 95, 0.08);
  --border-focus:  rgba(0, 201, 167, 0.4);
  --shadow-xs:     0 1px 3px rgba(0,0,0,.04);
  --shadow-sm:     0 2px 8px rgba(0,0,0,.06);
  --shadow-md:     0 8px 32px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
  --shadow-lg:     0 24px 64px rgba(0,0,0,.10), 0 8px 20px rgba(0,0,0,.05);
  --r:             20px;
  --r-sm:          12px;
  --ease:          cubic-bezier(.4, 0, .2, 1);
  --ease-spring:   cubic-bezier(.34, 1.56, .64, 1);
}

/* ─── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ─── CONFETTI CANVAS ────────────────────────────────────────── */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  display: none;
}

/* ─── HERO ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  background: linear-gradient(145deg, #0D2240 0%, #1E3A5F 50%, #1a4570 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 120px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  pointer-events: none;
}

.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 24px 32px;
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -.01em;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 680px;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.8);
  font-size: .78rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
  letter-spacing: .04em;
  text-transform: uppercase;
  animation: fadeDown .6s var(--ease) both;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.1;
  color: white;
  letter-spacing: -.03em;
  animation: fadeUp .7s var(--ease) .1s both;
}

.hero-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #00e5c5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  margin-top: 20px;
  color: rgba(255,255,255,.65);
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 300;
  animation: fadeUp .7s var(--ease) .2s both;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  background: var(--accent);
  color: #0D2240;
  font-weight: 600;
  font-size: .95rem;
  padding: 14px 28px;
  border-radius: 100px;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms;
  animation: fadeUp .7s var(--ease) .3s both;
  box-shadow: 0 4px 20px rgba(0,201,167,.35);
}
.hero-cta:hover {
  background: var(--accent-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,201,167,.45);
}
.hero-cta:active { transform: translateY(0); }

.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  animation: fadeUp .7s var(--ease) .6s both;
}
.scroll-dot { animation: scrollBounce 2s ease infinite; }

/* ─── HOW IT WORKS ───────────────────────────────────────────── */
.how-section {
  padding: 96px 24px;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}

.section-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -.025em;
  margin-bottom: 56px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.step-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 32px 28px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
  animation: fadeUp .6s var(--ease) calc(var(--i) * 80ms) both;
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.step-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 200ms;
}
.step-card:hover::before { opacity: 1; }

.step-num {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  color: rgba(30, 58, 95, .06);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -.04em;
}

.step-icon {
  width: 48px;
  height: 48px;
  background: rgba(30, 58, 95, .05);
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.step-card h3 {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: -.01em;
}

.step-card p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 400;
}

/* ─── REGISTER SECTION ───────────────────────────────────────── */
.register-section {
  padding: 0 24px 96px;
  display: flex;
  justify-content: center;
}

.register-card {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  position: relative;
}

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

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  transition: all 250ms var(--ease);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  background: var(--card);
}
.step-dot.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #0D2240;
}
.step-dot.done {
  border-color: var(--accent);
  background: var(--accent);
  color: #0D2240;
}
.step-dot.done span { display: none; }
.step-dot.done::after {
  content: '';
  display: block;
  width: 10px;
  height: 6px;
  border-left: 2px solid #0D2240;
  border-bottom: 2px solid #0D2240;
  transform: rotate(-45deg) translate(1px, -1px);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background 400ms var(--ease);
  margin: 0 4px;
}
.step-line.active { background: var(--accent); }

/* ─── CARD PANELS ────────────────────────────────────────────── */
.card-panel {
  padding: 28px 32px 36px;
  animation: panelIn .35s var(--ease-spring) both;
}
.card-panel.hidden { display: none; }

.panel-header {
  margin-bottom: 28px;
}
.panel-header h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--primary);
  letter-spacing: -.025em;
  margin-bottom: 6px;
}
.panel-header p {
  font-size: .875rem;
  color: var(--muted);
}

/* ─── FORM ───────────────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 18px; margin-bottom: 24px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .01em;
}

.field input,
.phone-wrap {
  background: #F8FAFC;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .95rem;
  color: var(--text);
  transition: border-color 180ms, box-shadow 180ms;
  outline: none;
  width: 100%;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--border-focus);
}
.field input::placeholder { color: #B0BAC6; }
.field.error input,
.field.error .phone-wrap { border-color: #EF4444; }

.phone-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  cursor: text;
}
.phone-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--border-focus);
}
.phone-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  color: var(--text-2);
  font-weight: 500;
  flex-shrink: 0;
  padding-right: 10px;
  border-right: 1.5px solid var(--border);
}
.phone-wrap input {
  background: transparent;
  border: none;
  padding: 12px 0;
  box-shadow: none;
  flex: 1;
  min-width: 0;
}
.phone-wrap input:focus { box-shadow: none; border-color: transparent; }

.field-error {
  font-size: .78rem;
  color: #EF4444;
  font-weight: 500;
  min-height: 1em;
  display: block;
}

/* ─── BUTTON ─────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 14px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--r-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 180ms var(--ease), transform 120ms var(--ease), box-shadow 180ms var(--ease);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.06));
}
.btn-primary:hover { background: var(--primary-h); box-shadow: 0 4px 16px rgba(30,58,95,.3); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-primary:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.btn-loader .spinner-svg { animation: spin .8s linear infinite; }

.form-footer {
  margin-top: 16px;
  font-size: .75rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

/* ─── QR STATES ──────────────────────────────────────────────── */
.qr-state { animation: panelIn .35s var(--ease-spring) both; }
.qr-state.hidden { display: none; }

#qr-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 48px 0;
  min-height: 240px;
}

.pulse-ring {
  position: relative;
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
}
.pulse-ring::before,
.pulse-ring::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: ringPulse 2s ease infinite;
}
.pulse-ring::after { animation-delay: 1s; }
.pulse-ring svg { animation: spin 3s linear infinite; opacity: .4; }

.state-text {
  font-size: .9rem;
  color: var(--muted);
  font-weight: 500;
}

.qr-frame {
  position: relative;
  display: inline-block;
  margin: 4px auto 20px;
  display: flex;
  justify-content: center;
}
.qr-frame img {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  animation: scaleIn .4s var(--ease-spring) both;
}
.qr-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--accent);
  border-style: solid;
}
.qr-corner.tl { top: -4px; left: calc(50% - 110px - 4px); border-width: 2.5px 0 0 2.5px; border-radius: 3px 0 0 0; }
.qr-corner.tr { top: -4px; right: calc(50% - 110px - 4px); border-width: 2.5px 2.5px 0 0; border-radius: 0 3px 0 0; }
.qr-corner.bl { bottom: -4px; left: calc(50% - 110px - 4px); border-width: 0 0 2.5px 2.5px; border-radius: 0 0 0 3px; }
.qr-corner.br { bottom: -4px; right: calc(50% - 110px - 4px); border-width: 0 2.5px 2.5px 0; border-radius: 0 0 3px 0; }

.instructions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: step;
}
.instructions-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: .875rem;
  color: var(--text-2);
  line-height: 1.5;
  counter-increment: step;
}
.instructions-list li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: rgba(30,58,95,.07);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 1px;
}

.qr-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--muted);
  margin-top: 16px;
  justify-content: center;
}

/* ─── SUCCESS ────────────────────────────────────────────────── */
.success-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 0 8px;
  gap: 12px;
}

.success-circle {
  width: 88px;
  height: 88px;
  background: rgba(0,201,167,.06);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.checkmark { overflow: visible; }
.check-circle {
  stroke-dasharray: 164;
  stroke-dashoffset: 164;
  animation: drawCircle .6s var(--ease) .1s both;
}
.check-path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: drawCheck .4s var(--ease) .65s both;
}

.success-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--primary);
  letter-spacing: -.025em;
}

.success-sub {
  font-size: .9rem;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.6;
}

.bot-number-card {
  background: #F0FDF9;
  border: 1.5px solid rgba(0,201,167,.25);
  border-radius: var(--r-sm);
  padding: 16px 20px;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}

.bot-number-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent-h);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.bot-number-value {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary);
  letter-spacing: .02em;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,201,167,.12);
  border: none;
  border-radius: 100px;
  padding: 6px 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent-h);
  cursor: pointer;
  transition: background 160ms;
  margin-top: 2px;
}
.copy-btn:hover { background: rgba(0,201,167,.22); }
.copy-btn.copied { background: var(--accent); color: #0D2240; }

.success-hint {
  font-size: .85rem;
  color: var(--muted);
  max-width: 300px;
  line-height: 1.65;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 32px 24px;
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ─── KEYFRAMES ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.8); }
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50%       { transform: translateY(8px); opacity: 1; }
}
@keyframes ringPulse {
  0%   { transform: scale(.8); opacity: .8; }
  100% { transform: scale(1.6); opacity: 0; }
}
@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}
@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
.break-desktop { display: none; }

@media (min-width: 640px) {
  .break-desktop { display: block; }
}

@media (max-width: 480px) {
  .nav { padding: 20px; }
  .card-panel { padding: 24px 20px 28px; }
  .step-indicator { padding: 24px 20px 0; }
  .hero { padding: 80px 20px 100px; }
  .how-section { padding: 64px 20px; }
  .register-section { padding: 0 16px 64px; }
  .hero-title { font-size: 2.2rem; }
  .qr-frame img { width: 190px; height: 190px; }
  .qr-corner.tl, .qr-corner.bl { left: calc(50% - 95px - 4px); }
  .qr-corner.tr, .qr-corner.br { right: calc(50% - 95px - 4px); }
}
