/* ── Gift Card Countdown — flash-sale adrenaline ────────────────────
   Near-black slate, electric-lime amount, amber flip-clock tiles,
   caution-tape stripes, tight geometric sans. */

:root {
  --slate: #101216;
  --slate-2: #181b21;
  --lime: #c8f542;
  --lime-deep: #9ac812;
  --amber: #ffb020;
  --white: #f4f5f2;
  --muted: #8b9099;
  --line: rgba(244, 245, 242, 0.12);
  --err: #ff5d5d;
  --font-display: 'Archivo Black', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-body: 'Archivo', sans-serif;
}

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

.hidden { display: none !important; }

body {
  font-family: var(--font-body);
  background: var(--slate);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.page { display: flex; flex-direction: column; min-height: 100vh; }

.wrap { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 20px; }

main { flex: 1 0 auto; padding-bottom: 70px; }

/* ── Caution tape ─────────────────────────────────────────────────── */
.tape {
  height: 14px;
  background: repeating-linear-gradient(
    -45deg,
    var(--lime) 0 22px,
    var(--slate) 22px 44px
  );
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 54px 0 26px; }

.brand-line {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 9vw, 3.8rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.amount {
  display: inline-block;
  font-size: clamp(4rem, 18vw, 7rem);
  color: var(--lime);
  text-shadow: 0 0 50px rgba(200, 245, 66, 0.35);
  line-height: 1;
}

.hero .sub { max-width: 420px; margin: 16px auto 0; color: var(--muted); font-size: 1.02rem; }

/* ── Countdown ────────────────────────────────────────────────────── */
.countdown-section { text-align: center; margin: 12px 0 26px; }

.count-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}

.timer { display: flex; justify-content: center; gap: 10px; }

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, var(--slate-2) 0 50%, #14161b 50% 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 8px 10px;
  min-width: 82px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.digits {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 2.3rem;
  line-height: 1;
  color: var(--amber);
  text-shadow: 0 0 20px rgba(255, 176, 32, 0.35);
  font-variant-numeric: tabular-nums;
}

.unit {
  margin-top: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Notes ────────────────────────────────────────────────────────── */
.note {
  margin: 18px 0;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--slate-2);
  border: 1px solid var(--line);
  text-align: center;
}

/* ── Card ─────────────────────────────────────────────────────────── */
.card {
  background: var(--slate-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 26px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.field { margin-bottom: 16px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

label {
  display: block;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--white);
  background: var(--slate);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(200, 245, 66, 0.12);
}

input.error { border-color: var(--err); }
input::placeholder { color: var(--muted); opacity: 0.7; }

.fine { margin-top: 14px; text-align: center; color: var(--muted); font-size: 0.84rem; }

.rules-link {
  background: none;
  border: none;
  color: var(--lime);
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.form-error { color: var(--err); font-weight: 700; text-align: center; margin-top: 12px; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 16px 30px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  line-height: 1.2;
  margin-top: 6px;
}

.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(200, 245, 66, 0.28); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.btn-primary {
  background: linear-gradient(120deg, var(--lime), var(--lime-deep));
  color: var(--slate);
  box-shadow: 0 14px 34px rgba(200, 245, 66, 0.22);
}

.btn-block { width: 100%; }

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(16, 18, 22, 0.35);
  border-top-color: var(--slate);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Done ─────────────────────────────────────────────────────────── */
.done-card { text-align: center; }

.stamp {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.3em;
  color: var(--lime);
  border: 3px solid var(--lime);
  border-radius: 8px;
  padding: 6px 22px;
  transform: rotate(-5deg);
  margin-bottom: 16px;
}

.done-card h2 { font-family: var(--font-display); font-size: 1.7rem; text-transform: uppercase; }

.card-sub { color: var(--muted); margin-top: 8px; max-width: 380px; margin-left: auto; margin-right: auto; }

/* ── Rules modal ──────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(16, 18, 22, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: var(--slate-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--white);
  max-width: 620px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 { font-family: var(--font-display); font-size: 1.15rem; text-transform: uppercase; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  font-size: 0.92rem;
  white-space: pre-wrap;
}

/* ── Toast ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--err);
  color: #fff;
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 700;
  z-index: 400;
  max-width: 92vw;
  text-align: center;
}

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 24px 20px;
  color: var(--muted);
  font-size: 0.85rem;
}

#wbx-powered-by-slot { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .field-grid { grid-template-columns: 1fr; }
  .tile { min-width: 0; flex: 1; }
  .digits { font-size: 1.7rem; }
  .timer { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
