:root {
  --bg: #050507;
  --surface: #0c0c12;
  --modal-bg: #0e0e14;
  --text: #f4f5fa;
  --text-soft: #e4e6f2;
  --muted: #a9adc4;
  --muted-2: #9a9fb8;
  --muted-3: #80859e;
  --blue: #5C67FA;
  --blue-light: #6f79ff;
  --blue-dark: #4a54e0;
  --blue-text: #c9ccff;
  --blue-link: #aab0ff;
  --blue-eyebrow: #8d95ff;
  --coral: #e35c49;
  --coral-hover: #cf3120;
  --coral-text: #f08a7a;
  --gutter: clamp(20px, 5vw, 64px);
}

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

body {
  margin: 0;
  background: var(--bg);
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-link); }
a:hover { color: var(--coral); }

button { font: inherit; }

.accent { color: var(--coral); -webkit-text-fill-color: var(--coral); }

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(92,103,250,.28), rgba(92,103,250,0) 70%),
    var(--bg);
  overflow: hidden;
}

.container { max-width: 1160px; margin: 0 auto; }

/* Header */
.header { padding: 24px var(--gutter); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-harbiz { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.brand-x { color: #6a6f88; font-size: 18px; }
.brand-garmin { font-weight: 700; font-size: 17px; letter-spacing: 0.08em; }

/* Buttons */
.btn {
  border: 0;
  cursor: pointer;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  padding: 18px 32px;
  border-radius: 999px;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible,
.icon-btn:focus-visible,
.copy-btn:focus-visible,
.btn-ghost:focus-visible,
.btn-link:focus-visible { outline: 2px solid var(--blue-link); outline-offset: 3px; }

.btn-primary {
  background: linear-gradient(180deg, var(--blue-light), var(--blue) 60%, var(--blue-dark));
  box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 12px 40px rgba(92,103,250,.45);
}
.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(255,255,255,.18) inset, 0 16px 50px rgba(92,103,250,.6);
}

.btn-coral {
  background: var(--coral);
  box-shadow: 0 12px 36px rgba(227,92,73,.35);
}
.btn-coral:hover { background: var(--coral-hover); }

/* Hero */
.hero { padding: clamp(40px,6vw,88px) var(--gutter) clamp(56px,8vw,112px); }
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(40px,5vw,72px);
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(92,103,250,.1);
  color: var(--blue-text);
  border: 1px solid rgba(92,103,250,.35);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}
.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 10px var(--coral);
}

.hero-title {
  margin: 0;
  font-size: clamp(40px,5.6vw,68px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 800;
  text-wrap: balance;
  background: linear-gradient(180deg, #ffffff 30%, #b9bdf5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  margin: 0;
  font-size: clamp(17px,1.6vw,20px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 520px;
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.hero-note { font-size: 15px; color: var(--muted-2); }

.hero-media { position: relative; width: 100%; max-width: 560px; justify-self: center; }
.hero-glow {
  position: absolute;
  inset: 8% -4% -8%;
  background: radial-gradient(closest-side, rgba(92,103,250,.45), rgba(92,103,250,0));
  filter: blur(40px);
  pointer-events: none;
}
.hero-frame {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 40px 120px rgba(0,0,0,.6);
}
.hero-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-badge {
  position: absolute;
  left: -16px;
  bottom: 28px;
  background: rgba(10,10,16,.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}
.hero-badge-value { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; color: var(--coral); }
.hero-badge-label { font-size: 14px; line-height: 1.35; font-weight: 600; color: var(--text-soft); }

/* Benefits */
.benefits { padding: clamp(40px,6vw,88px) var(--gutter) clamp(72px,9vw,128px); }
.benefits-inner { display: flex; flex-direction: column; gap: 48px; }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 680px; }
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-eyebrow);
}
.section-title {
  margin: 0;
  font-size: clamp(30px,3.6vw,46px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 20px;
}
.card {
  position: relative;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 28px;
  padding: clamp(28px,3vw,40px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.card-left { background: linear-gradient(160deg, rgba(92,103,250,.16), rgba(92,103,250,0) 55%), var(--surface); }
.card-right { background: linear-gradient(200deg, rgba(92,103,250,.16), rgba(92,103,250,0) 55%), var(--surface); }
.card-head { display: flex; flex-direction: column; gap: 12px; }
.card-title { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
.card-text { margin: 0; font-size: 17px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }

.tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 6px 10px;
  border-radius: 8px;
}
.tag-coral { background: rgba(227,92,73,.12); color: var(--coral-text); border: 1px solid rgba(227,92,73,.3); }
.tag-blue { background: rgba(92,103,250,.14); color: var(--blue-text); border: 1px solid rgba(92,103,250,.35); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(92,103,250,.18);
  border: 1px solid rgba(92,103,250,.5);
  color: var(--blue-text);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
}
.step-text { font-size: 17px; line-height: 1.5; padding-top: 6px; color: var(--text-soft); }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-soft);
}

/* Final CTA */
.final { padding: 0 var(--gutter) clamp(56px,8vw,104px); }
.final-box {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(92,103,250,.4), rgba(92,103,250,0)),
    linear-gradient(135deg, #10112a, #07070b);
  border: 1px solid rgba(92,103,250,.3);
  border-radius: 32px;
  padding: clamp(36px,5vw,64px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.final-copy { display: flex; flex-direction: column; gap: 10px; max-width: 620px; }
.final-title {
  margin: 0;
  font-size: clamp(28px,3.2vw,42px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}
.final-text { margin: 0; font-size: 18px; line-height: 1.5; color: var(--muted); }

/* Footer */
.footer { margin-top: auto; padding: 28px var(--gutter); border-top: 1px solid rgba(255,255,255,.07); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted-3);
}

/* Modal */
.modal {
  width: calc(100% - 40px);
  max-width: 440px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.modal::backdrop {
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-panel {
  background: linear-gradient(180deg, rgba(92,103,250,.14), rgba(92,103,250,0) 40%), var(--modal-bg);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  padding: 20px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.modal-heading { font-size: 16px; font-weight: 600; }
.icon-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
}
.icon-btn:hover { background: rgba(255,255,255,.08); }

.modal-body {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 22px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.modal-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(92,103,250,.14);
  border: 1px solid rgba(92,103,250,.4);
  display: grid;
  place-items: center;
  color: var(--blue-link);
}
.modal-title { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.modal-text { font-size: 15px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }

.code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 4px;
}
.code { font-size: 19px; font-weight: 700; letter-spacing: .02em; user-select: all; color: var(--coral); }
.copy-btn {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  font-size: 15px;
  color: var(--text);
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.copy-btn:hover { background: rgba(255,255,255,.1); }

.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 0 8px; }
.btn-ghost {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  color: var(--text);
  padding: 12px 16px;
  border-radius: 999px;
}
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-link {
  text-decoration: none;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 6px 20px 6px 6px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.btn-link:hover { background: var(--blue-light); color: #fff; }
.btn-link-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: grid;
  place-items: center;
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* Modal states: only the block matching the dialog's data-state is shown */
.modal [data-when] { display: none; }
.modal[data-state="loading"] [data-when="loading"],
.modal[data-state="code"] [data-when="code"],
.modal[data-state="sold-out"] [data-when="sold-out"],
.modal[data-state="error"] [data-when="error"] { display: flex; }
.modal-state { flex-direction: column; align-items: center; gap: 14px; }
.modal-icon-coral {
  background: rgba(227,92,73,.12);
  border-color: rgba(227,92,73,.35);
  color: var(--coral-text);
}
.spinner {
  width: 40px;
  height: 40px;
  margin: 24px 0 4px;
  border-radius: 50%;
  border: 3px solid rgba(92,103,250,.2);
  border-top-color: var(--blue);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
