/* ============================================================
   RIZZO'S FOLLOW GIFT - styles
   Aesthetic: vintage Chicago tavern, but flipped from the Stamp
   Book. Deep brick-red room, one glowing cream ticket in the
   middle. Gold foil accents. Mobile-first throughout.
   ============================================================ */

/* ---------- Brand variables (sampled from the Rizzo's logo) -- */
:root {
  --red: #a3271e;
  --red-dark: #7c1a13;
  --red-deep: #5e120d;
  --cream: #f7f1e3;
  --cream-dark: #ece1c9;
  --ink: #2b1a14;
  --ink-soft: #6b5448;
  --gold: #c9a227;
  --gold-soft: #e3c96a;

  /* Headlines use Rokkitt: still a vintage slab serif, but much
     easier to read than Alfa Slab One (which stays for the small
     accent pieces: stamp, step numbers, countdown) */
  --font-headline: 'Rokkitt', serif;
  --font-display: 'Alfa Slab One', serif;
  --font-label: 'Oswald', sans-serif;
  --font-body: 'Lora', serif;
}

/* ---------- Reset & base ------------------------------------ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  /* The "room": deep red with a soft spotlight behind the ticket */
  background-color: var(--red-dark);
  background-image:
    radial-gradient(ellipse 120% 60% at 50% 0%, rgba(247, 241, 227, 0.10), transparent 60%),
    repeating-linear-gradient(-45deg, transparent 0 16px, rgba(0, 0, 0, 0.05) 16px 17px),
    linear-gradient(180deg, var(--red-dark), var(--red-deep));
  min-height: 100vh;
  min-height: 100dvh;
}

img { display: block; max-width: 100%; height: auto; }
button { font-family: var(--font-label); cursor: pointer; border: none; background: none; }
input { font-family: var(--font-label); }
[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

/* ---------- The ticket card --------------------------------- */
.screen { position: relative; }

.ticket-card {
  background: var(--cream);
  border-radius: 18px;
  padding: 34px 26px 30px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.35),
    0 2px 0 rgba(255, 255, 255, 0.25) inset;
  /* Little page-load rise, like the ticket being set on the bar */
  animation: card-in 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.05) both;
  overflow: hidden;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Header / type ----------------------------------- */
.brand-head { text-align: center; margin-bottom: 18px; }

.wordmark { margin: 0 auto 10px; width: 220px; }
.wordmark-sm { width: 160px; }

.kicker {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--red);
  text-align: center;
}

.headline {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(2.2rem, 10vw, 2.9rem);
  line-height: 1.08;
  text-align: center;
  color: var(--ink);
  margin: 10px 0 8px;
}

.subhead {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 26px;
}

/* ---------- Steps ------------------------------------------- */
.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 0;
  border-top: 2px dashed var(--cream-dark);
  transition: opacity 0.4s ease, filter 0.4s ease;
}

.step-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--cream);
  background: var(--red);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 3px 0 var(--red-deep);
}

.step-body { flex: 1; min-width: 0; }

.step-title {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Step 2 is dimmed until they tap the follow button */
.step-locked { opacity: 0.35; filter: grayscale(0.6); pointer-events: none; }

/* ---------- Buttons ----------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 12px;
  padding: 15px 22px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  color: var(--cream);
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  box-shadow: 0 5px 0 var(--red-deep), 0 12px 22px rgba(94, 18, 13, 0.35);
}

.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--red-deep); }

.btn-block { width: 100%; }

/* Follow button after it has been tapped */
.btn-followed {
  color: var(--red);
  background: transparent;
  border: 2px solid var(--red);
  box-shadow: none;
}

.ig-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Form fields ------------------------------------- */
.field { display: block; margin-bottom: 14px; }

.field-label {
  display: block;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  font-size: 1rem;
  padding: 13px 14px;
  border: 2px solid var(--cream-dark);
  border-radius: 10px;
  background: #fffdf7;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease;
}

.field input:focus { border-color: var(--red); }

/* The "how did you hear about us" dropdown, dressed to match
   the text inputs, with our own red chevron arrow */
.field select {
  width: 100%;
  font-family: var(--font-label);
  font-size: 1rem;
  padding: 13px 40px 13px 14px;
  border: 2px solid var(--cream-dark);
  border-radius: 10px;
  background-color: #fffdf7;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
  /* Hide the browser's default arrow and draw our own */
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%23a3271e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.5 7 7l5.5-5.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.field select:focus { border-color: var(--red); }

/* The @ prefix on the handle input */
.handle-input {
  display: flex;
  align-items: center;
  border: 2px solid var(--cream-dark);
  border-radius: 10px;
  background: #fffdf7;
  transition: border-color 0.15s ease;
}
.handle-input:focus-within { border-color: var(--red); }
.handle-input .at {
  font-family: var(--font-label);
  font-weight: 600;
  color: var(--red);
  padding: 0 4px 0 14px;
  font-size: 1.05rem;
}
.handle-input input {
  flex: 1;
  min-width: 0;
  border: none !important;
  background: transparent;
  padding-left: 4px !important;
}

/* Email opt-in checkbox */
.optin {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 4px 0 16px;
  line-height: 1.4;
  cursor: pointer;
}
.optin input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); flex-shrink: 0; }

.form-error {
  font-family: var(--font-label);
  font-size: 0.85rem;
  color: var(--red);
  background: rgba(163, 39, 30, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

/* Consent line under the claim button linking to the legal pages */
.legal-consent {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--ink-soft);
  margin-top: 12px;
  line-height: 1.5;
}
.legal-consent a { color: var(--red); font-weight: 600; }

.fine-print {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px dashed var(--cream-dark);
  font-size: 0.75rem;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.5;
}
.fine-print a { color: var(--red); font-weight: 600; }

/* ---------- The live gift ticket ---------------------------- */
.ticket-live { border: 3px solid var(--gold); text-align: center; }

.perf-line {
  border-top: 2px dashed var(--cream-dark);
  margin: 18px -26px;
  position: relative;
}
/* Punched notches on the ticket edges */
.perf-line::before,
.perf-line::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red-dark);
}
.perf-line::before { left: -12px; }
.perf-line::after { right: -12px; }

.ticket-title {
  text-align: center;
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(1.9rem, 9vw, 2.5rem);
  line-height: 1.1;
  color: var(--ink);
  margin: 8px 0 14px;
}

.seal { display: flex; justify-content: center; margin: 6px 0 14px; }
.seal img { width: 72px; filter: drop-shadow(0 6px 12px rgba(94, 18, 13, 0.3)); }

.ticket-note { text-align: center; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; margin-bottom: 10px; }

.countdown-box { margin: 14px 0 4px; }

.countdown-label {
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.countdown {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

/* Countdown turns urgent under a minute */
.countdown.urgent { animation: pulse 1s ease infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

/* ---------- Staff redeem zone ------------------------------- */
.staff-zone { margin-top: 4px; }

.staff-label {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

/* Press-and-hold button: the gold fill sweeps left to right while held */
.btn-hold {
  position: relative;
  width: 100%;
  overflow: hidden;
  color: var(--ink);
  background: var(--cream-dark);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 15px 22px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.hold-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  transition: none;
}

/* While held, the fill animates to full over 1.2 seconds */
.btn-hold.holding .hold-fill { width: 100%; transition: width 1.2s linear; }

.hold-text { position: relative; z-index: 1; }

/* ---------- The REDEEMED rubber stamp ----------------------- */
.stamp {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.stamp span {
  font-family: var(--font-display);
  font-size: 3rem;
  text-transform: uppercase;
  color: var(--red);
  border: 6px solid var(--red);
  border-radius: 14px;
  padding: 8px 26px;
  transform: rotate(-14deg);
  opacity: 0.9;
  /* Slam: starts huge and invisible, crashes down into place */
  animation: stamp-slam 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
  box-shadow: 0 0 0 4px rgba(163, 39, 30, 0.12);
}

@keyframes stamp-slam {
  0%   { opacity: 0; transform: rotate(-14deg) scale(3.2); }
  60%  { opacity: 1; transform: rotate(-14deg) scale(0.92); }
  100% { opacity: 0.9; transform: rotate(-14deg) scale(1); }
}

/* Gentle shake of the whole card when the stamp lands */
.card-shake { animation: shake 0.4s ease 0.15s; }
@keyframes shake {
  20% { transform: translate(2px, -1px) rotate(0.4deg); }
  50% { transform: translate(-2px, 1px) rotate(-0.4deg); }
  80% { transform: translate(1px, 0) rotate(0.2deg); }
}

/* ---------- Legal pages (terms.html + privacy.html) --------- */
/* Same cream ticket card, but left-aligned reading layout */
.legal-card { padding: 34px 26px 38px; }

.legal-card .kicker { margin-bottom: 4px; }

.legal-title {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(1.8rem, 8vw, 2.3rem);
  line-height: 1.1;
  text-align: center;
  color: var(--ink);
  margin: 6px 0 4px;
}

.legal-updated {
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.legal-card h2 {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin: 24px 0 8px;
  padding-top: 18px;
  border-top: 2px dashed var(--cream-dark);
}

.legal-card p,
.legal-card li {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 10px;
}

.legal-card ul { padding-left: 20px; margin-bottom: 10px; }
.legal-card li { margin-bottom: 6px; }

.legal-card a { color: var(--red); font-weight: 600; }

/* "Back to the gift" button at the top and bottom of legal pages */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--red);
  margin-bottom: 6px;
}

/* ---------- Reduced motion respect -------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
