/* Fonts */
@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-Book.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo Black";
  src: url("../fonts/Archivo-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Tokens */
:root {
  --red: #e1061a;
  --yellow: #f4c969;
  --cream: #eadfbe;
  --lavender: #b8b6cb;
  --input-bg: #d9d9db;
  --form-card-bg: #ececee;
  --black: #000000;
  --text: #1a1a1a;
  --white: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Gotham", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
}

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

/* --- Header --- */
.header {
  background: var(--cream);
  border-top: 22px solid var(--yellow);
  padding: 0 16px 12px;
  text-align: center;
}

.logo {
  display: inline-block;
  background: transparent;
  padding: 0;
  min-width: 0;
  box-shadow: none;
  margin-top: -22px;
  margin-bottom: 30px;
}

.logo img {
  width: min(180px, 64vw);
  height: auto;
}

.logo__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.logo__name {
  font-family: "Gotham", sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.05;
}

.logo__name--white {
  font-size: 1.5rem;
  color: #fff;
}

.logo__name--yellow {
  font-size: 1.85rem;
  color: var(--yellow);
}

.logo__years {
  font-family: "Gotham", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: #fff;
  letter-spacing: 0.14em;
  margin-top: 12px;
  align-self: flex-end;
}

/* --- Hero --- */
.hero {
  background: var(--cream);
  text-align: center;
}

.hero__sorteamos {
  font-family: "Archivo Black", "Gotham", sans-serif;
  font-weight: 900;
  font-size: clamp(2.325rem, 6.5625vw, 3.975rem);
  color: var(--red);
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.hero__subtitle {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0 28px;
  margin: 0 auto 8px;
  max-width: 90%;
}

.hero__subtitle-part {
  font-family: "Gotham", sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 3.4rem);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hero__subtitle-part--outline {
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.25px #1a1a1a;
  paint-order: stroke fill;
}

.hero__subtitle-part--main {
  color: var(--red);
  -webkit-text-stroke: 0 transparent;
  font-size: clamp(2.9rem, 7vw, 3.9rem);
}

.hero__visual {
  margin-top: 8px;
  overflow-x: hidden;
  /* Crema -> dorado -> oliva oscuro del boceto */
  background: linear-gradient(
    180deg,
    #eadfbe 0%,
    #e2d6b3 20%,
    #c8b47f 52%,
    #857742 78%,
    #4f492f 100%
  );
}

.hero__cars {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-end;
  margin: 0 auto;
  max-width: min(1100px, 100%);
  padding: 0 6px;
}

.hero__car {
  position: relative;
  flex: 0 0 auto;
  width: clamp(345px, 46.5vw, 570px);
  max-width: none;
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.45));
}

/* Superposición: el de la izquierda delante; cada uno “detrás” hacia la derecha */
.hero__car--left {
  z-index: 2;
}

.hero__car--mid {
  z-index: 3;
  margin-left: clamp(-220px, -34vw, -165px);
}

.hero__car--right {
  z-index: 4;
  margin-left: clamp(-220px, -34vw, -165px);
}

.hero__mascot {
  position: absolute;
  left: calc(52% + 65px);
  bottom: calc(42% - 140px);
  transform: translateX(-50%);
  width: clamp(96px, 10.4vw, 152px);
  height: auto;
  z-index: 6;
  pointer-events: none;
}

.hero__divider-stack {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.hero__divider-black {
  height: min(48px, 8vw);
  min-height: 36px;
  background: var(--black);
  width: 100%;
}

.hero__divider-red {
  height: min(22px, 3.5vw);
  min-height: 16px;
  background: var(--red);
  width: 100%;
}

.scroll-hint {
  margin: -6px auto 10px;
  padding: 8px 16px 10px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.scroll-hint__text {
  font-family: "Gotham", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
}

.scroll-hint__arrow {
  font-size: 1.3rem;
  line-height: 1;
  animation: scrollBounce 1.1s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* --- Premios --- */
.prizes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: 100%;
}

.prizes__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 16px 12px;
}

.prizes__cell img {
  max-height: 148px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.prizes__cell--1 {
  background: #f1c96b;
}

.prizes__cell--2 {
  background: #d3d3d3;
}

.prizes__cell--3 {
  background: var(--red);
}

.prizes__cell--3 img {
  max-height: 195px;
}

.prizes__cell--4 {
  background: var(--yellow);
}

.prizes__cell--5 {
  background: #c7c5d8;
}

.prizes__cell--6 {
  background: var(--red);
}

.prizes__divider {
  height: 15px;
  background: var(--white);
  width: 100%;
}

/* --- Form section --- */
.form-section {
  background: var(--lavender);
  padding: 48px 16px 56px;
}

.form-section__headline {
  text-align: center;
  margin: 0;
  padding: 12px 16px 10px;
  background: #fff;
}

.form-section__headline-main {
  margin: 0;
  font-family: "Gotham", sans-serif;
  font-weight: 700;
  font-size: clamp(2.325rem, 4.8vw, 3rem);
  color: #111;
  line-height: 1.1;
}

.form-section__headline-sub {
  margin: 8px 0 0;
  font-family: "Gotham", sans-serif;
  font-weight: 500;
  font-size: clamp(1.425rem, 2.85vw, 1.65rem);
  color: #111;
  line-height: 1.2;
}

.form-card {
  max-width: 920px;
  margin: 0 auto;
  background: var(--form-card-bg);
  border-radius: 28px;
  padding: 40px 40px 36px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.form-card__intro {
  text-align: center;
  font-family: "Gotham", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 32px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.form-card__intro strong {
  font-weight: 700;
}

.form__precinto-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px 15px;
  margin-bottom: 28px;
}

.form__precinto-visual {
  flex: 0 0 auto;
  width: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form__precinto-visual img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.form__precinto-field {
  flex: 1 1 220px;
  min-width: 0;
}

.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 28px;
}

.form__field label {
  display: block;
  font-family: "Gotham", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 8px;
  color: var(--text);
}

.form__field label .label-note {
  font-weight: 400;
}

.form__field input,
.form__field select {
  width: 100%;
  font-family: "Gotham", sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid #333;
  background: var(--input-bg);
  border-radius: 2px;
  color: var(--text);
}

.form__field select {
  appearance: none;
  background-color: var(--input-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231a1a1a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form__field--error input,
.form__field--error select {
  border-color: #b00020;
}

.form__error-msg {
  display: block;
  margin-top: 6px;
  font-family: "Gotham", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #b00020;
  line-height: 1.3;
}

.form__error-msg--checkbox {
  margin-top: 8px;
  flex-basis: 100%;
}

.form__status {
  margin: 14px 0 0;
  font-family: "Gotham", sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text);
}

.form__status--success {
  font-weight: 700;
  font-size: 18px;
  color: #0a7a0a;
}

.form__status--error {
  color: #b00020;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.modal--open {
  display: block;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal__dialog {
  position: relative;
  width: min(92vw, 420px);
  margin: 12vh auto 0;
  background: #fff;
  border-radius: 8px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

.modal__close-x {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-family: Arial, sans-serif;
  font-size: 28px;
  line-height: 1;
  color: #555;
  cursor: pointer;
}

.modal__close-x:hover {
  color: #111;
}

.modal__close-x:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.modal__title {
  margin: 0 0 10px;
  font-family: "Gotham", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.modal__text {
  margin: 0 0 18px;
  font-family: "Gotham", sans-serif;
  font-size: 0.95rem;
  color: var(--text);
}

.modal__button {
  font-family: "Gotham", sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  border: none;
  border-radius: 4px;
  padding: 10px 22px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
}

.modal__button:hover {
  background: var(--yellow);
  color: #000;
}

.modal__button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.form__checkbox-wrap--error label {
  color: #b00020;
}

.form__checkbox-wrap {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.form__checkbox-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.form__checkbox-wrap label {
  font-family: "Gotham", sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.4;
}

.form__terms-link-wrap {
  margin: 8px 0 0;
}

.form__terms-link {
  font-family: "Gotham", sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: underline;
}

.form__terms-link:hover {
  color: var(--red);
}

.form__submit-wrap {
  margin-top: 28px;
  text-align: center;
}

.form__submit {
  font-family: "Gotham", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 52px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: var(--red);
  color: #fff;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.form__submit:hover {
  background: var(--yellow);
  color: #000;
}

.form__submit:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.form-card__footer {
  margin-top: 28px;
  padding-top: 8px;
}

.form-card__footer-note {
  font-family: "Gotham", sans-serif;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--red);
  margin: 0 0 6px;
}

.form-card__footer-precinto {
  font-family: "Gotham", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--red);
  letter-spacing: 0.02em;
  margin: 0;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .scroll-hint {
    margin: 22px auto 10px;
  }

  .hero__mascot {
    left: calc(52% + 30px);
    bottom: calc(42% - 110px);
    width: clamp(88px, 11vw, 128px);
  }

  .prizes {
    grid-template-columns: repeat(3, 1fr);
  }

  .prizes__cell {
    min-height: 160px;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .scroll-hint {
    margin: 26px auto 12px;
  }

  .hero__mascot {
    left: calc(52% + 24px);
    bottom: calc(42% - 96px);
    transform: translate(-70%, 5%);
    width: clamp(97px, 11.5vw, 140px);
  }
}

@media (max-width: 640px) {
  .hero__visual {
    padding-bottom: 5px;
  }

  .logo {
    padding: 0;
  }

  .logo img {
    width: min(150px, 62vw);
  }

  .hero__subtitle {
    gap: 8px 16px;
    max-width: 100%;
    padding: 0 12px;
  }

  .scroll-hint {
    margin: 50px auto 10px;
  }

  .hero__subtitle-part {
    white-space: normal;
    text-align: center;
    font-size: clamp(1.5rem, 8vw, 2.2rem);
  }

  .hero__subtitle-part--main {
    font-size: clamp(1.75rem, 9vw, 2.5rem);
  }

  .hero__cars {
    position: relative;
    left: 50%;
    width: max-content;
    max-width: none;
    padding: 0;
    transform: translateX(-50%) scale(0.9);
    transform-origin: center bottom;
    margin-bottom: clamp(-36px, -6vw, -12px);
  }

  .hero__car {
    width: clamp(210px, 56vw, 320px);
  }

  .hero__car--mid,
  .hero__car--right {
    margin-left: clamp(-118px, -28vw, -84px);
  }

  .hero__mascot {
    transform: translate(-75%, calc(-25% - 25px));
    width: clamp(90px, 9.75vw, 142.5px);
  }

  .hero__divider-black {
    min-height: 28px;
    height: min(40px, 10vw);
  }

  .hero__divider-red {
    min-height: 15px;
    height: min(15px, 4.5vw);
  }

  .prizes {
    grid-template-columns: repeat(2, 1fr);
  }

  .prizes__cell {
    min-height: 140px;
    padding: 12px 8px;
  }

  .prizes__cell img {
    max-height: 120px;
  }

  .form-card {
    padding: 28px 20px 28px;
    border-radius: 20px;
  }

  .form__grid {
    grid-template-columns: 1fr;
  }

  .form__precinto-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .form__precinto-field {
    width: 100%;
    text-align: left;
    flex: 0;
  }

  .form__precinto-visual {
    width: 130px;
  }
}

@media (max-width: 380px) {
  .logo__name--white {
    font-size: 1.25rem;
  }

  .logo__name--yellow {
    font-size: 1.45rem;
  }
}
