/* ============================================================
   FONTS — Helvetica Neue (system), Arial as Windows fallback
   ============================================================ */
@font-face {
  font-family: 'Avenir';
  src: local('Helvetica Neue'), local('HelveticaNeue'), local('Helvetica'), local('Arial');
}
@font-face {
  font-family: 'Avenir-bold';
  src: local('Helvetica Neue Bold'), local('HelveticaNeue-Bold'), local('Helvetica-Bold'), local('Arial Bold'), local('Arial');
}
@font-face {
  font-family: 'Avenir-heavy';
  src: local('Helvetica Neue Heavy'), local('HelveticaNeue-Heavy'), local('Helvetica Neue Bold'), local('HelveticaNeue-Bold'), local('Arial Bold'), local('Arial');
}
@font-face {
  font-family: 'Avenir-light';
  src: local('Helvetica Neue Light'), local('HelveticaNeue-Light'), local('Helvetica Neue'), local('HelveticaNeue'), local('Arial');
}

/* ============================================================
   CSS VARIABLES — edit these to restyle the entire flow
   ============================================================ */
:root {
  /* Colors */
  --color-primary:         #c41230;
  --color-primary-hover:   #a30e27;
  --color-primary-dark:    #830b1f;
  --color-success:         #2fbf22;
  --color-error:           #e00054;
  --color-text:            #000000;
  --color-text-muted:      #666666;
  --color-text-on-primary: #ffffff;
  --color-surface:         #ffffff;
  --color-background:      #f5f5f5;
  --color-input-border:    #aaaaaa;
  --color-camera-bg:       #e1e1e1;
  --color-disabled:        #b9b9b9;

  /* Typography */
  --font-regular: 'Avenir',       'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-bold:    'Avenir-bold',  'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-heavy:   'Avenir-heavy', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-light:   'Avenir-light', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --font-size-sm:     16px;
  --font-size-base:   18px;
  --font-size-label:  22px;
  --font-size-input:  24px;
  --font-size-btn:    28px;
  --font-size-header: 52px;

  /* Shape */
  --radius-btn:   10px;
  --radius-input: 8px;

  /* Elevation */
  --shadow-btn: 0 2px 8px rgba(0, 0, 0, 0.18);

  /* Layout */
  --header-height: 18%;

  /* Timing */
  --transition: 180ms ease;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-regular);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background-color: var(--color-background);
  position: relative;
}

/* ============================================================
   UTILITY
   ============================================================ */
.hidden {
  display: none !important;
}

/* ============================================================
   STEPS — full-screen, only .active is visible
   ============================================================ */
.step {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-background);
}

.step.active {
  display: flex;
}

/* ============================================================
   LOGO — modals 1 & 2 only
   ============================================================ */
.step-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}

/* Modal 1 — large, anchored near top of field */
.step-1-logo {
  top: 6%;
  width: clamp(150px, 44vw, 320px);
  position: initial;
  transform: none;
  margin: 0 auto;
}

/* Modal 2 & 3 — smaller, anchored near top */
.step-2-logo {
  top: 6%;
  width: clamp(100px, 25vw, 210px);
}
.step-3-logo {
  top: 6%;
  width: clamp(100px, 25vw, 210px);
}

/* Modal 4 — same size as modal 1, anchored near top */
.step-4-logo {
  top: 6%;
  /* width: clamp(150px, 44vw, 320px); */
  width: clamp(100px, 25vw, 210px);
}

/* Step 1 shows the background image (no section header) */
.step-1 {
  background-image: url('assets/soccer_lines_simple.png'), url('assets/background.jpg');
  background-size: 100% 102%, cover;
  background-position: center;
}

/* ============================================================
   SECTION HEADER — blue top bar on steps 2, 3, 4
   ============================================================ */
.section-header {
  height: var(--header-height);
  flex-shrink: 0;
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
  font-family: var(--font-bold);
  font-size: var(--font-size-header);
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* ============================================================
   STEP CONTENT — centered area (below header, or full-height on step 1)
   ============================================================ */
.step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
}

/* ============================================================
   STEP 1 — Welcome
   ============================================================ */

/* Push content to bottom portion of screen */
.step-1-content {
  justify-content: flex-start;
  /* padding-bottom: 30%; */
  gap: 0.75rem;
  padding-top: 3rem;
}

/* Show Your Love image between logo and start button */
.show-your-love {
  /* width: clamp(180px, 55vw, 420px); */
  width: 100%;
  max-width: 500px;
  object-fit: contain;
  pointer-events: none;
}

/* Wide, nearly full-width start button */
.btn-start-welcome {
  width: 85%;
  max-width: 600px;
  height: 12vw;
  max-height: 80px;
  min-height: 54px;
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 5px;
  font-family: var(--font-bold);
  font-size: clamp(16px, 5vw, 32px);
  letter-spacing: 2px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: background-color var(--transition), transform var(--transition);
}

.btn-start-welcome:hover {
  background-color: var(--color-primary-hover);
}

.btn-start-welcome:active {
  transform: scale(0.97);
}

/* Disclaimer text below start button */
.welcome-disclaimer {
  width: 85%;
  max-width: 600px;
  text-align: center;
  font-family: var(--font-regular);
  font-size: clamp(16px, 3.2vw, 20px);
  color: #ffffff;
  line-height: 1.55;
}

/* ============================================================
   STEP 2 — Contact Form
   ============================================================ */

.step-2 {
  background-image: url('assets/soccer_lines_simple.png'), url('assets/background.jpg');
  background-size: 100% 102%, cover;
  background-position: center;
}

.step-2-content {
  justify-content: flex-end;
  padding: 0 8% 7%;
  gap: clamp(10px, 2.5vw, 18px);
}

.step-2-intro {
  width: 100%;
  color: #ffffff;
  font-family: var(--font-regular);
  font-size: clamp(14px, 2.5vw, 20px);
  text-align: center;
  line-height: 1.55;
  margin-bottom: clamp(4px, 1vw, 8px);
}

.form-fields-2 {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2.5vw, 16px);
  width: 100%;
}

.form-input-2 {
  width: 100%;
  height: clamp(46px, 12vw, 64px);
  background: #ffffff;
  border: none;
  border-radius: 2px;
  font-family: var(--font-bold);
  font-size: clamp(16px, 3.2vw, 18px);
  letter-spacing: 1.5px;
  text-align: center;
  color: #666666;
  padding: 0 1rem;
  outline: none;
  -webkit-appearance: none;
}

.form-input-2::placeholder {
  color: #aaaaaa;
  letter-spacing: 1.5px;
}

/* State dropdown */
.form-select-2 {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaaaaa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.2rem;
  padding-right: 2.5rem;
  text-align-last: center;
  cursor: pointer;
}

.form-select-2.is-placeholder {
  color: #aaaaaa;
}

.form-select-2 option {
  color: #666666;
  letter-spacing: normal;
  text-align: left;
}

/* ============================================================
   intlTelInput — phone field overrides
   ============================================================ */

/* Fix flag sprite path (CSS references ../img/ but flags live in assets/img/) */
.iti__flag {
  background-image: url('assets/img/flags.png') !important;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .iti__flag {
    background-image: url('assets/img/flags@2x.png') !important;
  }
}

/* Make the iti wrapper fill the grid slot like every other field */
.form-fields-2 .iti {
  width: 100%;
  display: block;
}

/* Phone input: left-align text (flag on left makes centering awkward) */
#input-phone {
  text-align: center;
  padding: 0 1rem !important;
}

/* Keep the selected-flag panel white, vertically centered */
.form-fields-2 .iti__selected-flag {
  background-color: #ffffff;
  border-right: 1px solid #e0e0e0;
  padding: 0 8px 0 10px;
}

.form-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
}

a{
  color: #ffffff;
  text-decoration: underline;
  cursor: pointer;
}

.form-checkbox {
  width: clamp(16px, 4vw, 22px);
  height: clamp(16px, 4vw, 22px);
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.form-checkbox-text {
  font-family: var(--font-regular);
  font-size: clamp(9px, 3.3vw, 16px);
  color: #ffffff;
  line-height: 1.5;
  cursor: pointer;
}

.error-msg {
  font-size: var(--font-size-sm);
  color: var(--color-error);
  min-height: 1.25em;
}

.btn-capture {
  width: 85%;
  max-width: 600px;
  height: clamp(46px, 11vw, 72px);
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 5px;
  font-family: var(--font-bold);
  font-size: clamp(14px, 4vw, 26px);
  letter-spacing: 2px;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-btn);
  transition: background-color var(--transition), transform var(--transition);
}

.btn-capture:hover {
  background-color: var(--color-primary-hover);
}

.btn-capture:active {
  transform: scale(0.97);
}

.btn-capture:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-submitting-dots {
  display: inline-block;
  overflow: hidden;
  width: 0;
  vertical-align: bottom;
  animation: btn-submitting-dots 1.2s steps(3, end) infinite;
}

@keyframes btn-submitting-dots {
  to { width: 1.5em; }
}

/* ============================================================
   STEP 3 — Camera
   ============================================================ */

.step-3 {
  background-image: url('assets/soccer_lines_simple.png'), url('assets/background.jpg');
  background-size: 100% 102%, cover;
  background-position: center;
}

.step-3-content {
  justify-content: flex-start;
  padding: 40% 8% 8%;
  gap: clamp(10px, 2.5vw, 16px);
}

.camera-instruction {
  width: 100%;
  color: #ffffff;
  font-family: var(--font-regular);
  font-size: clamp(13px, 3.5vw, 20px);
  text-align: center;
}

.camera-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--color-camera-bg);
  flex-shrink: 0;
  overflow: hidden;
}

.camera-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 2vw, 12px);
  width: 100%;
}

.btn-retake,
.btn-upload {
  width: 85%;
  max-width: 600px;
  height: clamp(46px, 11vw, 72px);
  background-color: #666666;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  font-family: var(--font-bold);
  font-size: clamp(14px, 4vw, 26px);
  letter-spacing: 2px;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-btn);
  transition: background-color var(--transition), transform var(--transition);
}

.btn-retake:hover,
.btn-upload:hover {
  background-color: #555555;
}

.btn-retake:active,
.btn-upload:active {
  transform: scale(0.97);
}

.camera-feed,
.photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Flip-camera button — top-right corner of camera wrapper */
.btn-flip-camera {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.55);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background var(--transition);
}

.btn-flip-camera:hover  { background: rgba(0, 0, 0, 0.78); }
.btn-flip-camera:active { transform: scale(0.93); }

/* 3-second countdown — black circle, bottom-right (matches faceswap) */
.countdown-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 100px;
  height: 100px;
  background: #000000;
  color: #ffffff;
  font-family: var(--font-bold);
  font-size: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.camera-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
}

/* ============================================================
   STEP 4 — Success
   ============================================================ */

.step-4 {
  background-image: url('assets/soccer_lines_simple.png'), url('assets/background.jpg');
  background-size: 100% 102%, cover;
  background-position: center;
}

.step-4-content {
  justify-content: center;
  padding: 12% 10% 5%;
  gap: clamp(10px, 2.5vw, 18px);
  text-align: center;
}

.thankyou-heading {
  font-family: var(--font-bold);
  font-size: clamp(58px, 15vw, 100px);
  line-height: 1.05;
  color: #ffffff;
  letter-spacing: 2px;
  margin: 0;
}

.success-upload-msg {
  font-family: var(--font-bold);
  font-size: clamp(18px, 5vw, 32px);
  color: #ffffff;
  line-height: 1.3;
  margin: 0;
}

.success-reveal-date {
  font-family: var(--font-regular);
  font-size: clamp(11px, 2.8vw, 16px);
  color: #ffffff;
  line-height: 1.4;
  margin: 0;
}

.step-4-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  width: 80%;
  margin: clamp(2px, 0.5vw, 6px) auto;
}

.step-4-progress-label {
  font-family: var(--font-regular);
  font-size: clamp(13px, 3.5vw, 22px);
  color: #ffffff;
  line-height: 1.4;
  margin: 0;
}

.btn-live-updates {
  width: 85%;
  max-width: 400px;
  height: clamp(38px, 9vw, 56px);
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 5px;
  font-family: var(--font-bold);
  font-size: clamp(12px, 3.2vw, 20px);
  letter-spacing: 2px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: background-color var(--transition);
}

.btn-live-updates:hover { background-color: var(--color-primary-hover); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  width: 295px;
  height: 72px;
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-bold);
  font-size: var(--font-size-btn);
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: background-color var(--transition), transform var(--transition);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-primary:disabled {
  background-color: var(--color-disabled);
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  width: 295px;
  height: 72px;
  background-color: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-btn);
  font-family: var(--font-bold);
  font-size: var(--font-size-btn);
  letter-spacing: 1px;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition);
}

.btn-secondary:hover {
  background-color: #ebebeb;
  border-color: var(--color-text-muted);
}

.btn-secondary:active {
  transform: scale(0.97);
}

/* ============================================================
   WIDE / DESKTOP — min-width 600px
   Logo switches from absolute to in-flow so it never overlaps
   content. Step content capped at 560px and centered.
   ============================================================ */
@media (min-width: 600px) {

  /* Allow scrolling on wider viewports */
  html, body {
    height: auto;
    overflow-y: auto;
  }

  /* Steps: natural height, min full viewport, no longer fixed-position overlay */
  .step {
    position: relative;
    height: auto;
    min-height: 100vh;
  }

  /* Background fixed to viewport so it fills the screen even when content scrolls */
  .step-1, .step-2, .step-3, .step-4 {
    background-attachment: fixed;
    background-repeat: no-repeat;
  }

  /* Logo: in-flow, centered — override all absolute positioning */
  .step-logo {
    position: relative;
    left: auto;
    transform: none;
    top: auto;
    display: block;
    margin: 4vh auto 0;
    flex-shrink: 0;
  }

  .step-1-logo {
    width: clamp(160px, 16vw, 240px);
  }

  .step-2-logo,
  .step-3-logo {
    width: clamp(90px, 10vw, 160px);
  }

  .step-4-logo {
    width: clamp(160px, 16vw, 240px);
  }

  /* Content: cap width and center in the step */
  .step-content {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  /* Step 1: smaller bottom padding — no need for 30% on a wide screen */
  .step-1-content {
    padding-bottom: 6vh;
  }

  /* Step 2: logo is now above, drop the horizontal % padding */
  .step-2-content {
    padding: 0 0 4vh;
  }

  /* Step 3: logo is in-flow, remove the 65% top padding hack */
  .step-3-content {
    padding: 0 0 5vh;
  }

  /* Step 4: reset mobile top-padding (logo is in-flow on desktop), center block */
  .step-4-content {
    padding-top: 4vh;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  :root {
    --font-size-header: 7vw;
    --header-height:    15%;
  }

  .btn-primary,
  .btn-secondary {
    width: auto;
    min-width: 200px;
    height: auto;
    padding: 0.875rem 1.75rem;
    font-size: 22px;
  }

  .camera-wrapper {
    width: 80vw;
    height: 80vw;
  }

  .countdown-overlay {
    width: 67px;
    height: 67px;
    font-size: 45px;
  }
}
