/* =========================
   RESET / BASE
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-body);
  color: var(--text-strong);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

/* =========================
   TOKENS
========================= */
:root {
  --blue-deep: #000838;
  --blue-main: #003573;
  --blue-mid: #0047a0;
  --yellow: #F7D300;
  --yellow-dark: #d4b400;
  --white: #ffffff;

  --text-strong: rgba(255, 255, 255, 0.96);
  --text-soft: rgba(255, 255, 255, 0.72);
  --text-faint: rgba(255, 255, 255, 0.48);

  --danger: #dc3232;
  --warning: #d79b09;
  --success: #1d9b58;

  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.16);

  --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.22);
  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.24);

  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --content-max: 1100px;

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
}

/* =========================
   PAGE BACKGROUNDS
========================= */
body.theme-shell,
body.theme-survey,
body.theme-thanks,
body.theme-coupon,
body.theme-state {
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0, 53, 115, 0.70) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 90%, rgba(0, 71, 160, 0.35) 0%, transparent 60%),
    linear-gradient(160deg, #000838 0%, #001a4d 50%, #000d2a 100%);
}

.page-shell {
  position: relative;
  min-height: 100vh;
  z-index: 1;
}

.container {
  width: min(var(--content-max), calc(100% - 32px));
  margin-inline: auto;
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
}

/* =========================
   HEADER
========================= */
.site-header {
  position: relative;
  z-index: 10;
  padding: 20px 16px 0;
}

.site-header__inner {
  width: min(var(--content-max), 100%);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.site-brand__logo {
  width: auto;
  height: 46px;
  max-width: min(220px, 70vw);
  object-fit: contain;
  filter: none;
}

/* =========================
   TYPOGRAPHY
========================= */
.display-title,
.section-title,
.state-title,
.hero-title,
.card-title,
.step-title,
.step1-question,
.club-title {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.2px;
}

.lead,
.card-body,
.hero-sub,
.state-text {
  color: var(--text-soft);
  line-height: 1.6;
}

.text-faint {
  color: var(--text-faint);
}

.text-center {
  text-align: center;
}

/* =========================
   BUTTONS
========================= */
.btn,
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-block,
.btn-call,
.btn-wsp,
.btn-club,
.btn-skip,
.btn-reveal,
#mainBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover,
.btn-call:hover,
.btn-wsp:hover,
.btn-club:hover,
.btn-skip:hover,
.btn-reveal:hover,
#mainBtn:hover {
  transform: translateY(-1px);
}

.btn-primary,
#mainBtn,
.btn-reveal,
.btn-club {
  background: var(--yellow);
  color: #11203f;
  border: none;
  box-shadow: 0 10px 24px rgba(247, 211, 0, 0.22);
}

.btn-secondary,
.btn-skip,
.btn-call {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 1px solid var(--line);
}

.btn-wsp {
  background: #15b34a;
  color: var(--white);
  border: none;
}

/* =========================
   SHARED UI PIECES
========================= */
.surface-card,
.state-card,
.panel-card,
.main-card,
.survey-card,
.info-card,
.tyc-section,
.club-card-inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
}

.badge,
.score-badge,
.hero-badge,
.club-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.progress-bar-wrap {
  height: 4px;
  background: rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 33%;
  background: linear-gradient(90deg, var(--yellow), #ffec60);
  transition: width 0.45s ease;
}

.callout {
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.callout.detractor {
  background: rgba(220, 50, 50, 0.06);
  border-color: rgba(220, 50, 50, 0.25);
}

.callout.passive {
  background: rgba(215, 155, 9, 0.06);
  border-color: rgba(215, 155, 9, 0.25);
}

.callout.promoter {
  background: rgba(29, 155, 88, 0.07);
  border-color: rgba(29, 155, 88, 0.25);
}

.callout .icon {
  font-size: 28px;
  text-align: center;
  margin-bottom: 8px;
}

.callout p {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.check-grid,
.yn-grid,
.share-btns,
.actions {
  display: grid;
  gap: 10px;
}

.check-item input[type='checkbox'],
.yn input[type='radio'] {
  display: none;
}

.check-item label,
.yn label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  line-height: 1.3;
  transition: all 0.2s ease;
}

.check-item label .icon {
  font-size: 20px;
  flex-shrink: 0;
}

.check-item input:checked + label,
.yn input:checked + label {
  border-color: var(--yellow);
  background: rgba(247, 211, 0, 0.10);
  color: var(--white);
}

.check-item label:hover,
.yn label:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.free-text-area {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  outline: none;
  transition: border-color 0.2s ease;
}

.free-text-area::placeholder {
  color: rgba(255, 255, 255, 0.30);
}

.free-text-area:focus {
  border-color: rgba(247, 211, 0, 0.45);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* =========================
   STATE PAGES
========================= */
.state-page {
  min-height: calc(100vh - 86px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
}

.state-card {
  width: min(720px, 100%);
  padding: 28px 20px 24px;
  text-align: center;
}

.state-title {
  font-size: clamp(28px, 6vw, 44px);
  margin: 18px 0 10px;
}

.state-text {
  max-width: 56ch;
  margin: 0 auto;
  font-size: 15px;
}

.state-image {
  width: min(360px, 100%);
  max-height: 260px;
  object-fit: contain;
  margin: 0 auto;
}

.state-actions {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================
   MOTION / FX
========================= */
.bg-particles,
.stars-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bg-particles span,
.stars-bg span {
  position: absolute;
  display: block;
  border-radius: 50%;
}

.bg-particles span {
  background: rgba(247, 211, 0, 0.06);
  animation: floatUp linear infinite;
}

.stars-bg span {
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  animation: twinkle ease-in-out infinite;
}

.confetti-piece {
  position: fixed;
  top: -10px;
  pointer-events: none;
  z-index: 9999;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

@keyframes floatUp {
  0% {
    transform: translateY(110vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-10vh) scale(1.2);
    opacity: 0;
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.1;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.4);
  }
}

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

@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes confettiFall {
  to {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 640px) {
  .site-header {
    padding-top: 16px;
  }

  .site-brand__logo {
    height: 42px;
  }

  .state-page {
    min-height: calc(100vh - 74px);
    padding-top: 12px;
  }

  .state-card {
    padding: 22px 16px 20px;
    border-radius: 20px;
  }

  .state-title {
    font-size: clamp(24px, 9vw, 34px);
  }

  .state-text {
    font-size: 14px;
  }
}

@media (min-width: 900px) {
  .site-header {
    padding-top: 24px;
  }

  .site-brand__logo {
    height: 52px;
  }
}
