/* Self-hosted Plus Jakarta Sans (variable, latin subset). Same font Google
   serves, but from our own edge — faster, and no visitor IPs sent to Google. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(./assets/fonts/plus-jakarta-sans-latin.woff2) format('woff2');
}

:root {
  --navy: #002949;        /* primary brand */
  --navy-deep: #051c40;
  --teal: #50BCBA;        /* brand accent */
  --teal-deep: #2f9b99;
  --teal-pale: #EAF4F4;   /* pale background */
  --teal-mist: #DEEAE9;
  --slate: #475569;       /* body text */
  --slate-light: #64748b;
  --ink: #0f2237;
  --white: #ffffff;
  --line: #dbe7ea;
  --shadow: 0 20px 50px -24px rgba(0, 41, 73, 0.45);
  --radius: 22px;
}

* { box-sizing: border-box; }

/* Make the hidden attribute always win over later display rules. */
[hidden] { display: none !important; }

/* The gate paints straight from HTML/CSS (no JS needed) so it shows instantly.
   Returning visitors get it hidden before first paint via the head script. */
html.va-returning #stage-gate { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 50% -8%, var(--teal-pale), transparent 60%),
    linear-gradient(180deg, #f6fbfb 0%, #ffffff 100%);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2 { font-weight: 800; line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
em { font-style: normal; color: var(--teal-deep); }

/* ---------- demo banner ---------- */
.demo-banner {
  background: var(--navy);
  color: #cfe9e8;
  font-size: 13px;
  text-align: center;
  padding: 8px 14px;
}
.demo-banner code { color: var(--teal); }

/* ---------- topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 16px 8px;
}
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo { height: 62px; width: auto; display: block; }

/* ---------- dev reset (preview only) ---------- */
.dev-reset {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 80;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 41, 73, 0.82);
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(0, 41, 73, 0.6);
}
.dev-reset:hover { background: var(--navy); }

/* ---------- generic stage ---------- */
main {
  max-width: 540px;
  margin: 0 auto;
  padding: 8px 18px 40px;
}
.stage { animation: fade-up 0.5s ease both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= STAGE 1: GATE ================= */
.stage-gate {
  min-height: calc(100dvh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gate-card { text-align: center; padding: 8px 6px; }
.kicker {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-deep);
  margin: 0 0 14px;
}
.gate-title { font-size: clamp(30px, 8vw, 44px); color: var(--navy); margin-bottom: 16px; }
.gate-sub {
  color: var(--slate);
  font-size: 16px;
  max-width: 360px;
  margin: 0 auto 38px;
  line-height: 1.5;
}

/* hold button */
.hold-btn {
  position: relative;
  width: 168px;
  height: 168px;
  border: none;
  background: transparent;
  cursor: pointer;
  margin: 0 auto;
  display: block;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  user-select: none;
}
.hold-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--teal) calc(var(--p, 0) * 360deg), rgba(0, 41, 73, 0.1) 0deg);
  transition: background 0.05s linear;
}
.hold-ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #f6fbfb;
}
.hold-core {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px -8px rgba(0, 41, 73, 0.6), inset 0 2px 6px rgba(255, 255, 255, 0.2);
  transition: transform 0.12s ease;
}
.hold-label { font-weight: 700; font-size: 19px; letter-spacing: 0.5px; }
.hold-btn.holding .hold-core { transform: scale(0.94); }
.hold-btn:not(.holding) .hold-core { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.hold-hint { margin-top: 20px; color: var(--slate-light); font-size: 14px; letter-spacing: 0.3px; }

/* ================= WINGS OVERLAY ================= */
.wings-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(900px 600px at 50% 40%, #ffffff, var(--teal-pale) 72%);
  overflow: hidden;
}
.wings-stage { text-align: center; width: min(86vw, 460px); }

/* ----- Visiting Angels brand wing (the logo), animated in ----- */
.wings-wrap { display: block; }
.wings-svg {
  display: block;
  width: min(58vw, 216px);
  margin: 0 auto;
  opacity: 0;
  transform-origin: 50% 68%;
  filter: drop-shadow(0 18px 30px rgba(80, 188, 186, 0.30));
}
/* Reveal: the wing settles in (fade + gentle scale/rise with a soft flutter),
   then floats forever. Entrance is on the img, float is on the wrapper —
   separate elements, so the two transforms never collide. */
.wings-overlay.play .wings-svg {
  animation: wings-in 0.9s cubic-bezier(0.18, 0.84, 0.28, 1) both;
}
.wings-overlay.play .wings-wrap {
  animation: wing-float 3.8s ease-in-out 0.9s infinite;
}
@keyframes wings-in {
  0%   { opacity: 0; transform: scale(0.6) translateY(12px) rotate(-7deg); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1) translateY(0) rotate(0); }
}
@keyframes wing-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-9px) rotate(-1.6deg); }
}
.wings-headline { margin-top: 4px; opacity: 0; }
.wings-overlay.play .wings-headline { animation: fade-up 0.6s ease 1s both; }
.wings-headline h2 { font-size: clamp(28px, 7vw, 40px); color: var(--navy); }
.wings-headline p { color: var(--slate); margin: 6px 0 0; font-size: 17px; }
.wings-spark { font-size: 26px; display: block; margin-bottom: 4px; }

/* ================= STAGE 2: ENTER ================= */
.enter-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px 28px;
  margin-top: 14px;
  border: 1px solid var(--line);
}
.prize-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, var(--teal-pale), var(--teal-mist));
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.prize-emoji { font-size: 32px; }
.prize-kicker {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 11px;
  font-weight: 800;
  color: var(--teal-deep);
  margin: 0 0 2px;
}
.prize-title { font-size: 24px; color: var(--navy); }
.enter-lead { color: var(--slate); font-size: 15px; line-height: 1.55; margin: 0 0 22px; }

.enter-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 14px; font-weight: 700; color: var(--navy); }
.optional { color: var(--slate-light); font-weight: 400; }
.field input {
  font-family: inherit;
  font-size: 16px;
  padding: 14px 15px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: #fbfdfd;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(80, 188, 186, 0.18);
}
.consent {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--slate);
  line-height: 1.45;
  cursor: pointer;
}
.consent input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--teal-deep); flex: none; }

.form-error {
  background: #fdecea;
  color: #a3261d;
  font-size: 14px;
  padding: 11px 13px;
  border-radius: 11px;
  margin: 0;
}

/* shared CTA button */
.cta-btn {
  position: relative;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  padding: 16px 22px;
  border-radius: 14px;
  box-shadow: 0 14px 26px -12px rgba(0, 41, 73, 0.7);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.cta-btn:hover { transform: translateY(-1px); }
.cta-btn:active { transform: translateY(1px); }
.cta-btn:disabled { opacity: 0.7; cursor: default; transform: none; }
.cta-share {
  width: 100%;
  background: linear-gradient(160deg, var(--teal) 0%, var(--teal-deep) 100%);
  box-shadow: 0 14px 26px -12px rgba(80, 188, 186, 0.75);
}
.cta-btn-spinner {
  display: inline-block;
  width: 17px; height: 17px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -3px;
  margin-left: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.fineprint { font-size: 12px; color: var(--slate-light); text-align: center; margin: 2px 0 0; line-height: 1.5; }
.fineprint a, .about-link { color: var(--teal-deep); }

/* ================= STAGE 3: DASHBOARD ================= */
.dash-hero { text-align: center; padding: 26px 16px 6px; }
.dash-kicker { font-size: 17px; font-weight: 700; color: var(--navy); margin: 0 0 6px; }
.entries-count { display: inline-flex; align-items: center; gap: 14px; margin: 10px 0 6px; }
.entries-num {
  font-weight: 800;
  font-size: 88px;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(160deg, var(--teal-deep), var(--navy));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.entries-num.bump { animation: bump 0.5s ease; }
@keyframes bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.18); } }
.entries-label { text-align: left; font-weight: 700; font-size: 16px; color: var(--navy); line-height: 1.1; }
.entries-note { color: var(--slate-light); font-size: 13.5px; margin: 8px 0 0; }

.share-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 24px 22px;
  margin-top: 12px;
  text-align: center;
}
.share-title { font-size: 24px; color: var(--navy); margin-bottom: 8px; }
.share-lead { color: var(--slate); font-size: 15px; line-height: 1.55; margin: 0 0 20px; }
.share-lead strong { color: var(--navy); }

.share-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin: 14px 0 16px;
}
.share-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  padding: 12px 4px;
  border-radius: 12px;
  cursor: pointer;
  border: 1.5px solid var(--line);
  background: #fbfdfd;
  color: var(--navy);
  font-family: inherit;
  transition: transform 0.1s ease, border-color 0.1s ease;
}
.share-chip:hover { transform: translateY(-1px); border-color: var(--teal); }

.share-link-box { display: flex; margin-top: 4px; }
.share-link-box input {
  flex: 1;
  font-family: inherit;
  font-size: 13px;
  padding: 12px 13px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--teal-pale);
  color: var(--slate);
  text-align: center;
}
.copied-toast { color: var(--teal-deep); font-size: 13px; font-weight: 700; margin: 10px 0 0; }

/* about */
.about-card {
  background: linear-gradient(180deg, #fff 0%, #f7fcfc 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 26px 22px 24px;
  margin-top: 16px;
  text-align: center;
}
.about-mark { display: flex; justify-content: center; margin-bottom: 6px; }
.about-wings {
  display: block;
  width: 104px;
  filter: drop-shadow(0 10px 18px rgba(80, 188, 186, 0.22));
}
.about-card h2 { font-size: 23px; color: var(--navy); margin-bottom: 12px; }
.about-card p { color: var(--slate); font-size: 15px; line-height: 1.6; margin: 0 0 12px; }
.about-tagline { font-style: italic; color: var(--teal-deep) !important; font-weight: 600; }
.about-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 16px;
}
.about-contact:empty { display: none; }
.about-contact a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  background: var(--teal-pale);
  border: 1px solid var(--teal-mist);
  border-radius: 999px;
  padding: 8px 14px;
}
.about-contact a:hover { border-color: var(--teal); }
.about-link { display: inline-block; margin: 4px 0 18px; font-weight: 700; text-decoration: none; }
.terms {
  font-size: 11.5px !important;
  color: #7e92a3 !important;
  line-height: 1.55;
  text-align: left;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 8px !important;
}

/* footer */
.site-footer { text-align: center; color: var(--slate-light); font-size: 13px; padding: 10px 0 28px; }

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