/* ================================================================
   FlightHub – Football vs Soccer Predictions
   Shared stylesheet (EN + FR)
   ================================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

/* ---------- Custom font: Akira Expanded ---------- */
@font-face {
  font-family: 'Akira Expanded';
  src: url('../assets/fonts/AkiraSuperBold.woff2') format('woff2'),
       url('../assets/fonts/AkiraSuperBold.woff')  format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Google Fonts (Inter) ---------- */
/* Loaded via <link> in each HTML file */

/* ---------- Design tokens ---------- */
:root {
  --charcoal:        #2b2f33;
  --white:           #ffffff;
  --gray-border:     #636363;
  --gray-placeholder:#9c9c9c;
  --fh-blue:         #2cb8e2;
  --max-w:           1600px;
  --font-akira:      'Akira Expanded', 'Arial Black', 'Impact', sans-serif;
  --font-inter:      'Inter', 'Helvetica Neue', Arial, sans-serif;
  /* Logo wing colours */
  --fill-0:          var(--charcoal);
}

body {
  background-color: var(--charcoal);
  color: var(--white);
  font-family: var(--font-inter);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  width: 100%;
  padding: 24px 0 48px;
  border-radius: 0 0 42px 42px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 101%;       /* slight oversize matches Figma */
  height: 220%;
  top: -81%;
  left: -0.16%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}

/* Logo */
.logo {
  display: block;
  position: relative;
  z-index: 1;
  width: 220px;
  flex-shrink: 0;
  text-decoration: none;
  margin-bottom: 24px;
}

.logo__img {
  display: block;
  width: 100%;
  height: auto;
}

/* Headline block */
.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
  padding: 0 48px;
}

.hero__title + .hero__subtitle {
  margin-top: 8px;
}

.hero__ball + .hero__subtitle {
  margin-top: 8px;
}

.hero__subtitle + .hero__body {
  margin-top: -10px;
}

.hero__ball {
  display: none;
  width: 70px;
  height: auto;
}

.hero__title {
  font-family: var(--font-akira);
  font-weight: 700;
  font-size: clamp(20px, 5.5vw, 60px);
  line-height: 1;
  color: var(--charcoal);
  margin-bottom: 12px;
}

.step-label {
  font-family: var(--font-akira);
  font-weight: 700;
  margin-right: 8px;
}

.hero__subtitle {
  font-weight: 400;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.2;
  color: var(--charcoal);
}

.hero__body {
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
  color: var(--charcoal);
}


/* ================================================================
   PLINTH BUTTONS
   ================================================================ */
/* ================================================================
   VOTE VISUAL (bars + plinths)
   ================================================================ */
.hero__vote-visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  /* Responsive gap: at narrow/mid widths a fixed 200px pushed the outer bars
     past the viewport edges. Scale with width so the cluster always fits. */
  gap: clamp(16px, 9vw, 200px);
  width: 100%;
  max-width: 100%;
  margin-top: 4px;
  pointer-events: none;
}

/* ---- Vote bars ---- */
.vote-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  margin-bottom: 20px;
  gap: 24px;
}

.vote-bar {
  position: relative;
  width: min(110px, 8vw);
  height: calc(min(280px, 22vw) * 1.5);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}

.vote-bar__fill {
  position: relative;
  width: 100%;
  height: var(--bar-pct);
  overflow: visible;
  background: var(--charcoal);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.vote-bar__labels {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

/* Full-height track stroke */
.vote-bar--football::after {
  content: '';
  position: absolute;
  right: -12px;
  top: -12px;
  bottom: -1px;
  width: calc(min(110px, 8vw) + 24px);
  border: 1px solid var(--charcoal);
  background: rgba(43, 47, 51, 0.15);
  pointer-events: none;
  z-index: 0;
}

.vote-bar--soccer::after {
  content: '';
  position: absolute;
  left: -12px;
  top: -12px;
  bottom: -1px;
  width: calc(min(110px, 8vw) + 24px);
  border: 1px solid var(--charcoal);
  background: rgba(43, 47, 51, 0.15);
  pointer-events: none;
  z-index: 0;
}

.vote-bar__pct {
  font-family: var(--font-akira);
  font-weight: 700;
  font-size: clamp(20px, 2.8vw, 44px);
  line-height: 1;
  color: var(--charcoal);
  text-align: center;
}

.vote-bar__count {
  font-size: clamp(10px, 0.9vw, 13px);
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}


.hero__plinths {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 25px;
}

.click-to-vote {
  display: block;
  width: min(200px, 15vw);
  height: auto;
  pointer-events: none;
}

/* ---- Plinth popup ---- */
.plinth-popup {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, 85%);
  background: linear-gradient(135deg, #ff8a00 0%, #ffd000 100%);
  border-radius: 8px;
  padding: 32px 40px;
  text-align: center;
  z-index: 10;
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.plinth-popup.visible {
  display: block;
}

.plinth-popup__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--charcoal);
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.plinth-popup__close:hover { opacity: 1; }

.plinth-popup__title {
  font-family: var(--font-inter);
  font-weight: 800;
  font-size: clamp(16px, 2vw, 22px);
  color: var(--charcoal);
  margin-bottom: 12px;
}

.plinth-popup__body {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: clamp(13px, 1.2vw, 16px);
  color: var(--charcoal);
  line-height: 1.5;
}

.plinth-button {
  position: relative;
  width: min(280px, 22vw);
  height: calc(min(280px, 22vw) * 2.011);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  pointer-events: auto;
}

.plinth-button::before {
  content: '';
  position: absolute;
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
  width: 180%;
  height: 4%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0.9) 30%, rgba(0,0,0,0.5) 60%, transparent 60%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.plinth-button--soccer {
  margin-left: 0;
}

.plinth-button img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.layer-back  { z-index: 1; }
.layer-ball  { z-index: 2; }
.layer-front { z-index: 3; pointer-events: none; }

@keyframes plinth-press {
  0%   { transform: translateY(0); }
  100% { transform: translateY(63px); }
}

.plinth-button.pressing .layer-ball {
  animation: plinth-press 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.plinth-button.selected .layer-ball {
  transform: translateY(63px);
}

.plinth-button:not(.selected) .layer-ball {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.success-message {
  font-family: var(--font-inter);
  font-weight: 700;
  font-size: clamp(14px, 1.6vw, 22px);
  color: var(--charcoal);
  text-align: center;
  padding: 48px;
  line-height: 1.4;
}

.form-intro {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 48px;
  width: 100%;
  max-width: var(--max-w);
  margin-top: 80px;
  margin-bottom: -8px;
}

/* ================================================================
   FORM SECTION
   ================================================================ */
.form-section {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 23px;
  width: 100%;
  max-width: var(--max-w);
  padding: 32px;
  flex-shrink: 0;
  margin-top: 40px;
}

.form-row {
  display: flex;
  gap: 32px;
  align-items: flex-end;
  width: 100%;
}

.form-inputs {
  display: flex;
  gap: 16px;
  flex: 1 0 0;
  min-width: 0;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 0 0;
  min-width: 0;
}

.input-field label {
  font-weight: 500;
  font-size: 18px;
  line-height: 28px;
  color: var(--charcoal);
}

.input-field input {
  background: transparent;
  border: 2px solid var(--charcoal);
  border-radius: 0;
  padding: 12px;
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  color: var(--charcoal);
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

/* ---- Inline validation ---- */
.input-field input.invalid {
  border-color: #d32d2d;
}
.field-error {
  display: none;
  color: #d32d2d;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  margin-top: 2px;
}
.field-error.show {
  display: block;
}
.vote-buttons .field-error {
  margin-top: 8px;
}
.form-error {
  display: none;
  color: #d32d2d;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.form-error.show {
  display: block;
}

.input-field input::placeholder { color: rgba(43, 47, 51, 0.45); }
.input-field input:focus        { border-color: var(--charcoal); outline: none; box-shadow: none; }

.input-field input:-webkit-autofill,
.input-field input:-webkit-autofill:hover,
.input-field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px transparent inset;
  -webkit-text-fill-color: var(--charcoal);
  transition: background-color 5000s ease-in-out 0s;
}

/* ---- Vote buttons ---- */
.vote-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
/* Keep the vote error below the button without widening the row. */
.vote-buttons .field-error {
  max-width: 300px;
  text-align: center;
}

.vote-btn {
  width: 300px;
  flex-shrink: 0;
  height: 92px;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 24px;
  transition: filter 0.2s, transform 0.1s;
  text-align: center;
}

.vote-btn:hover  { filter: brightness(1.06); }
.vote-btn:active { transform: scale(0.98); }

.vote-btn--football {
  background: linear-gradient(180deg, var(--charcoal) 0%, #000000 100%);
}

.vote-btn--soccer {
  background: linear-gradient(90deg, #7bcfe9 0%, #ff8a53 100%);
}

.vote-btn__eyebrow {
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: none;
}

.vote-btn.selected .vote-btn__eyebrow {
  display: block;
}

.vote-btn__label {
  font-family: var(--font-inter);
  font-weight: 400;
  font-style: italic;
  font-size: 14px;
  line-height: 1.3;
  color: var(--white);
  text-transform: none;
  min-height: 1em;
  opacity: 0.7;
}

.vote-btn__label.selected {
  font-family: var(--font-akira);
  font-weight: 700;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ff8a00 0%, #ffd000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 1;
}

/* ---- Bottom row: checkbox + legal ---- */
.form-meta {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.checkbox-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-wrap input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1px solid var(--charcoal);
  border-radius: 3px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}

.checkbox-wrap input[type="checkbox"]:checked {
  background: transparent;
}

.checkbox-wrap input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 7px;
  height: 12px;
  border-bottom: 2px solid var(--charcoal);
  border-right: 2px solid var(--charcoal);
  transform: rotate(45deg);
}

.checkbox-wrap span {
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: var(--charcoal);
}

.legal {
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: var(--charcoal);
}

.legal a {
  color: var(--charcoal);
  text-decoration: underline;
}

.checkbox-wrap a {
  color: var(--charcoal);
  text-decoration: underline;
}

.legal a:hover { text-decoration: underline; }

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  padding: 48px 48px;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--white);
  overflow: hidden;
  margin-top: auto;
  flex-shrink: 0;
}

.site-footer a {
  color: var(--white);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

.footer-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switcher__item {
  font-weight: 400;
  font-size: 16px;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.lang-switcher__item--active {
  font-weight: 600;
  cursor: default;
}

.lang-switcher__item:not(.lang-switcher__item--active) {
  opacity: 0.5;
}

.lang-switcher__item:not(.lang-switcher__item--active):hover {
  opacity: 1;
  text-decoration: underline;
}

.lang-switcher__divider {
  color: var(--gray-border);
  user-select: none;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* --- Tablet / small desktop --- */
@media (max-width: 960px) {
  .form-section { padding: 0 24px; }
  /* Stack the row so the vote button doesn't crush the inputs at tablet widths. */
  .form-row { flex-direction: column; align-items: stretch; gap: 24px; }
  .vote-buttons { width: 100%; }
  .vote-btn { width: 100%; }
  .vote-buttons .field-error { max-width: none; }
  .site-footer {
    padding: 40px 24px;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    font-size: 14px;
  }

  .footer-right {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 16px;
  }
}

/* --- Mobile (≤ 700px) --- */
@media (max-width: 700px) {
  body { gap: 40px; }

  /* Hero chrome */
  .hero         { padding: 16px 0 32px; border-radius: 0 0 24px 24px; }
  .hero__content { gap: 10px; padding: 0 20px; }
  .hero__ball + .hero__subtitle { margin-top: 0px; }
  .logo { width: 120px; }

  /* Vote visual on mobile */
  .hero__vote-visual { gap: 16px; }
  .plinth-button.selected .layer-ball { transform: translateY(28px); }
  @keyframes plinth-press { 0% { transform: translateY(0); } 100% { transform: translateY(28px); } }
  .plinth-popup { width: 90vw; }
  .vote-bar       { width: min(40px, 8vw); height: calc(14vw * 2.011); }
  .vote-bar--football::after { right: -6px; top: -6px; bottom: -1px; width: calc(min(40px, 8vw) + 12px); }
  .vote-bar--soccer::after  { left: -6px;  top: -6px; bottom: -1px; width: calc(min(40px, 8vw) + 12px); }
  .hero__plinths  { gap: 6px; }
  .plinth-button  { width: 28vw; height: calc(28vw * 2.011); }
  .click-to-vote  { width: min(140px, 30vw); }
  .vote-bar__pct  { font-size: clamp(12px, 3.5vw, 18px); }
  .vote-bar-wrap  { gap: 10px; }
  .form-intro     { margin-top: 32px; }
  .vote-bar__count { font-size: clamp(6px, 1.8vw, 10px); white-space: normal; word-break: break-word; }

  /* Headline */
  .hero__ball     { display: none; }
  .hero__title    { font-size: clamp(22px, 7vw, 40px); }
  .hero__subtitle { font-size: clamp(12px, 3.5vw, 17px); }
  .hero__body     { font-size: clamp(13px, 3.8vw, 18px); }

  /* Form */
  .form-inputs  { flex-direction: column; }
  .form-row     { flex-direction: column; align-items: stretch; gap: 20px; }
  .form-meta    { flex-direction: column; align-items: flex-start; }
  .vote-buttons { flex-direction: column; }
  .vote-btn     { width: 100%; }
  .input-field label { font-size: 14px; line-height: 1.4; }
  .input-field input { font-size: 14px; }
}

/* --- Small mobile (≤ 460px) --- */
@media (max-width: 460px) {
  .hero         { padding: 16px 0 32px; }
  .hero__content { padding: 0 16px; }
  .hero__ball   { display: none; }
}
