/* ==========================================================================
   Stamora — design system
   Fresh sea-turquoise, modern, mobile-first; scales up to desktop.
   Always light (owner: "we deliver happiness", no dark UI).
   ========================================================================== */

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

:root {
  /* palette — light, fresh, sea-green/turquoise (owner picked over orange) */
  --bg: #f3fbf9;
  --bg-glow-1: rgba(69, 224, 192, 0.20);
  --bg-glow-2: rgba(56, 189, 248, 0.13);
  --surface: #ffffff;
  --surface-2: #e9f7f2;
  --text: #1e3a37;
  --muted: #5f7a72;
  --border: #daeee8;
  --border-strong: #bfe0d7;

  /* brand */
  --brand: #14b8a6;
  --brand-soft: #d6f7ef;
  --brand-grad: linear-gradient(135deg, #45e0c0 0%, #14b8a6 52%, #0e96c0 100%);
  --brand-text: #ffffff;
  --ring: rgba(20, 184, 166, 0.35);

  --good: #15803d;
  --good-soft: #ecfdf3;
  --good-border: #bbe7c9;
  --bad: #dc2626;
  --bad-soft: #fef2f2;
  --bad-border: #fecaca;

  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(30, 58, 55, 0.05);
  --shadow: 0 1px 2px rgba(30, 58, 55, 0.05), 0 10px 30px -18px rgba(30, 58, 55, 0.25);
  --shadow-brand: 0 6px 20px -8px rgba(20, 184, 166, 0.5);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ambient brand glow behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(560px 420px at 85% -8%, var(--bg-glow-1), transparent 65%),
    radial-gradient(640px 480px at -12% 30%, var(--bg-glow-2), transparent 65%);
  pointer-events: none;
}

.wrap {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: 20px 18px 32px;
  flex: 1;
}
.wrap.wide { max-width: 960px; }

h1 {
  font-size: clamp(1.45rem, 1.2rem + 1.4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  font-weight: 800;
}
h2 {
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin: 28px 0 10px;
}
p { margin: 8px 0; }
a { color: inherit; }
.muted { color: var(--muted); font-size: 0.9rem; }
.muted a { color: inherit; }
.center { text-align: center; }

::selection { background: var(--brand); color: var(--brand-text); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark .mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--brand-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: var(--shadow-brand);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions form { margin: 0; }

/* --------------------------------------------------------------------------
   Cards & banners
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 14px 0;
  box-shadow: var(--shadow-sm);
}
.card > h2:first-child { margin-top: 0; }

.banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-radius: var(--radius);
  padding: 12px 15px;
  margin: 14px 0;
  font-size: 0.93rem;
  font-weight: 500;
  animation: rise 0.35s ease both;
}
.banner.ok  { background: var(--good-soft); border: 1px solid var(--good-border); color: var(--good); }
.banner.err { background: var(--bad-soft);  border: 1px solid var(--bad-border);  color: var(--bad); }
.banner a { color: inherit; font-weight: 700; }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Earn celebration (dashboard after a scan): dancing emoji + confetti
   -------------------------------------------------------------------------- */
.celebrate {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin: 14px 0;
  animation: rise 0.35s ease both;
}
.celebrate .dancer {
  font-size: 2.7rem;
  line-height: 1;
  display: inline-block;
  transform-origin: 50% 85%;
  animation: dance 0.5s ease-in-out 0.15s 8 alternate;
}
.celebrate-title { margin: 0; font-weight: 800; font-size: 1.05rem; }
.celebrate-sub { margin: 2px 0 0; font-size: 0.92rem; color: var(--muted); }

@keyframes dance {
  0%   { transform: rotate(-12deg) translateY(0); }
  50%  { transform: rotate(0deg) translateY(-7px) scale(1.1); }
  100% { transform: rotate(12deg) translateY(0); }
}

.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.confetti i {
  position: absolute;
  top: -14px;
  width: 8px;
  height: 13px;
  border-radius: 2px;
  animation: confetti-fall linear both;
}
@keyframes confetti-fall {
  0%   { transform: translate3d(0, -14px, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate3d(var(--drift, 0px), 105vh, 0) rotate(540deg); opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  .celebrate .dancer { animation: none; }
  .confetti { display: none; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: block;
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: var(--radius);
  background: var(--brand-grad);
  color: var(--brand-text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-brand);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease,
              background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 8px 24px -8px rgba(234, 88, 12, 0.6); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.99); filter: brightness(0.97); }

.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn.secondary:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn.small {
  display: inline-block;
  width: auto;
  padding: 8px 15px;
  font-size: 0.85rem;
  border-radius: 999px;
}

.btn.danger {
  background: var(--bad);
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(220, 38, 38, 0.55);
}
.btn.danger:hover { box-shadow: 0 8px 22px -8px rgba(220, 38, 38, 0.6); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 650;
  margin: 16px 0 6px;
}
input, select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}
input[type="file"] {
  padding: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}
input[type="file"]::file-selector-button {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 13px;
  margin-right: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

/* toggle switch (checkbox) */
.switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}
.switch input {
  appearance: none;
  -webkit-appearance: none;
  width: 46px;
  height: 27px;
  flex: 0 0 46px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-2);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}
.switch input:checked {
  background: var(--brand-grad);
  border-color: transparent;
}
.switch input:checked::after { transform: translateX(19px); }

/* --------------------------------------------------------------------------
   Stamp card
   -------------------------------------------------------------------------- */
.loyalty-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin: 14px 0;
}
.loyalty-card .card-top {
  background: var(--brand-grad);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.loyalty-card .card-top img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.loyalty-card .card-top .reward-line {
  font-size: 0.85rem;
  opacity: 0.92;
  font-weight: 500;
}
.loyalty-card .card-top strong {
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  display: block;
}
.loyalty-card .card-body { padding: 18px 20px 20px; }

.stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 14px;
}
.stamp {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px dashed var(--border-strong);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}
.stamp.filled {
  border: none;
  background: var(--brand-grad);
  color: #fff;
  font-size: 1.15rem;
  box-shadow: var(--shadow-brand);
  animation: stamp-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.stamps .stamp.filled:nth-child(2) { animation-delay: 0.04s; }
.stamps .stamp.filled:nth-child(3) { animation-delay: 0.08s; }
.stamps .stamp.filled:nth-child(4) { animation-delay: 0.12s; }
.stamps .stamp.filled:nth-child(5) { animation-delay: 0.16s; }
.stamps .stamp.filled:nth-child(6) { animation-delay: 0.20s; }
.stamps .stamp.filled:nth-child(7) { animation-delay: 0.24s; }
.stamps .stamp.filled:nth-child(8) { animation-delay: 0.28s; }
.stamps .stamp.filled:nth-child(9) { animation-delay: 0.32s; }
.stamps .stamp.filled:nth-child(10) { animation-delay: 0.36s; }

@keyframes stamp-pop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.progress {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
  margin: 4px 0 12px;
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-grad);
  transition: width 0.5s ease;
}

.brand-header { display: flex; align-items: center; gap: 13px; margin: 4px 0 10px; }
.brand-header img {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   Navigation (admin / backoffice)
   -------------------------------------------------------------------------- */
.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 14px 0 22px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
}
.nav a {
  padding: 8px 15px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 650;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active {
  background: var(--brand-grad);
  color: var(--brand-text);
  box-shadow: var(--shadow-brand);
}

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--brand-grad);
  opacity: 0.85;
}
.stat .num {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stat .lbl {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 14px 0;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
th {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  background: var(--surface-2);
  white-space: nowrap;
}
th:first-child { border-top-left-radius: var(--radius-lg); }
th:last-child { border-top-right-radius: var(--radius-lg); }
tbody tr, table tr { transition: background 0.12s ease; }
table tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
td form { margin: 0; }

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: 1px;
}
.dot.on {
  background: var(--good);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
.dot.off { background: var(--border-strong); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
  50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--good) 10%, transparent); }
}

/* --------------------------------------------------------------------------
   Misc layout
   -------------------------------------------------------------------------- */
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 4px;
  flex-wrap: wrap;
}
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-head .actions form { margin: 0; }

footer {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-inner > * + *::before {
  content: "·";
  margin-right: 10px;
  opacity: 0.6;
}
footer a { color: var(--muted); text-decoration-color: color-mix(in srgb, var(--muted) 45%, transparent); }
footer a:hover { color: var(--text); }

/* segmented switcher (multi-business chips) */
.switcher {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin: 6px 0 4px;
  scrollbar-width: none;
}
.switcher::-webkit-scrollbar { display: none; }
.switcher a {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  transition: all 0.15s ease;
}
.switcher a:hover { color: var(--text); }
.switcher a.active {
  background: var(--brand-grad);
  color: var(--brand-text);
  border-color: transparent;
  box-shadow: var(--shadow-brand);
}

/* auth tabs */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 10px;
}
.auth-tabs button {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  padding: 9px 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.auth-tabs button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* big icon for status/result pages */
.big-icon {
  font-size: 3.4rem;
  line-height: 1;
  margin-bottom: 14px;
  display: inline-block;
  animation: stamp-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* --------------------------------------------------------------------------
   Landing hero
   -------------------------------------------------------------------------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 4vh 0 8px;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.hero h1 {
  font-size: clamp(1.9rem, 1.4rem + 3vw, 3rem);
  letter-spacing: -0.03em;
  max-width: 17ch;
}
.hero h1 em {
  font-style: normal;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub { max-width: 42ch; font-size: 1.02rem; }
.hero-cta { width: 100%; max-width: 360px; margin-top: 18px; display: grid; gap: 10px; }

/* "how it works" steps (landing) */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 560px;
  margin: 26px auto 4px;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 16px 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.step strong { font-size: 0.95rem; letter-spacing: -0.01em; }
.step .muted { font-size: 0.78rem; line-height: 1.35; }
.step-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 8px;
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}
.step:nth-child(2) .step-icon {
  background: var(--brand-grad);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-brand);
  font-weight: 800;
}

/* --------------------------------------------------------------------------
   Camera scanner
   -------------------------------------------------------------------------- */
#video-box {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
  margin: 14px 0;
}
#video-box video { width: 100%; height: 100%; object-fit: cover; }
#scan-frame {
  position: absolute;
  inset: 15%;
  pointer-events: none;
  --c: rgba(255, 255, 255, 0.95);
  background:
    linear-gradient(var(--c), var(--c)) top left    / 34px 3px,
    linear-gradient(var(--c), var(--c)) top left    / 3px 34px,
    linear-gradient(var(--c), var(--c)) top right   / 34px 3px,
    linear-gradient(var(--c), var(--c)) top right   / 3px 34px,
    linear-gradient(var(--c), var(--c)) bottom left / 34px 3px,
    linear-gradient(var(--c), var(--c)) bottom left / 3px 34px,
    linear-gradient(var(--c), var(--c)) bottom right/ 34px 3px,
    linear-gradient(var(--c), var(--c)) bottom right/ 3px 34px;
  background-repeat: no-repeat;
  border-radius: 18px;
}
#scan-frame::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  animation: scanline 2.2s ease-in-out infinite;
}

@keyframes scanline {
  0%, 100% { top: 6%; opacity: 0.4; }
  50% { top: 92%; opacity: 1; }
}

/* --------------------------------------------------------------------------
   Desktop
   -------------------------------------------------------------------------- */
@media (min-width: 720px) {
  .wrap { padding: 32px 24px 40px; }
  .card { padding: 26px 28px; }
  .hero { padding-top: 6vh; }
  .hero-cta { grid-template-columns: 1fr; }
  .stats { gap: 14px; }
  .stat .num { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
