:root {
  color-scheme: dark;
  font-family: Inter, sans-serif;
  background: #260006;
  color: #fff;
}

* { box-sizing: border-box; }

body { margin: 0; overflow-x: hidden; }

.hero {
  min-height: 100svh;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 900px) minmax(400px, 500px);
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 80px);
  isolation: isolate;
  background: #5c0008 url("assets/hero-tires-desktop-v1.webp") center / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(20, 0, 3, .78) 0%, rgba(28, 0, 4, .45) 38%, rgba(28, 0, 4, .08) 62%, rgba(28, 0, 4, .72) 100%),
    linear-gradient(0deg, rgba(28, 0, 4, .5), transparent 50%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .018;
  background: url("assets/noise.gif") center / cover no-repeat;
  mix-blend-mode: screen;
}

.brand-logo {
  width: 180px;
  height: 50px;
  margin: 0 0 16px;
  position: relative;
  overflow: hidden;
}

.brand-logo img {
  width: 180px;
  height: 180px;
  position: absolute;
  top: -61px;
  left: 0;
  display: block;
  filter: brightness(0) invert(1);
}

.hero-copy {
  width: fit-content;
  max-width: 940px;
  align-self: center;
  position: relative;
  z-index: 1;
  padding: 0;
  text-shadow: 0 4px 28px rgba(20, 0, 3, .4);
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: -34px -52px -38px -100vw;
  z-index: -1;
  background: linear-gradient(90deg, rgba(21, 0, 3, .42), rgba(21, 0, 3, .2) 70%, transparent);
  border-radius: 0 34px 34px 0;
}

.campaign-label {
  width: fit-content;
  margin: 0 0 20px;
  padding: 9px 15px;
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 999px;
  color: #fff;
  background: #d40b25;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.campaign-label span {
  display: none;
}

.hero-copy h2 {
  max-width: 940px;
  margin: 0;
  font: 900 clamp(54px, 4.55vw, 88px)/.92 Montserrat, sans-serif;
  letter-spacing: -.055em;
  text-transform: uppercase;
}

.hero-copy h2 span,
.hero-copy h2 em { display: block; }

.hero-copy h2 span,
.hero-copy h2 em { white-space: nowrap; }

.hero-copy h2 em {
  margin-top: .14em;
  color: #fff1e6;
  font-style: italic;
}

.campaign-description {
  width: fit-content;
  max-width: 640px;
  margin: 28px 0 0;
  padding: 12px 18px;
  border-left: 4px solid #f21c35;
  border-radius: 0 10px 10px 0;
  color: #fff;
  background: rgba(20, 0, 3, .58);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .025em;
  line-height: 1.45;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(20, 0, 3, .16);
}

.guess-card {
  width: min(100%, 500px);
  min-height: 560px;
  position: relative;
  z-index: 2;
  padding: clamp(38px, 4vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 28px;
  color: #17171d;
  background: rgba(255, 248, 240, .94);
  box-shadow: 0 28px 70px rgba(31,0,4,.35);
  backdrop-filter: blur(14px);
  text-align: center;
}

.guess-card > form { width: 100%; }

.form-step,
.form-step[hidden],
.form-step[aria-hidden="true"] { display: none !important; }
.form-step.is-active { display: block !important; animation: step-in .3s ease both; }
.form-step.is-active[aria-hidden="false"] { display: block !important; }

@keyframes step-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  margin: 0 0 14px;
  color: #d40b25;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1 {
  max-width: none;
  margin: 0 auto;
  font: 900 clamp(27px, 2.4vw, 35px)/1 Montserrat, sans-serif;
  letter-spacing: -.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.subtitle {
  width: fit-content;
  margin: 16px auto 30px;
  padding: 9px 16px;
  border: 1px solid #d40b25;
  border-radius: 999px;
  color: #fff;
  background: #d40b25;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
}

.score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 13px;
}

.score label { text-align: center; }

.score .team-icon {
  width: 60px;
  height: 40px;
  margin: 0 auto 12px;
  display: block;
  overflow: visible;
}

.score .team-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.score .team-name {
  display: block;
  margin-bottom: 11px;
  color: #25252c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.score input {
  width: 100%;
  height: 96px;
  border: 2px solid rgba(18,18,24,.14);
  border-radius: 14px;
  outline: 0;
  background: #fff;
  color: #17171d;
  font: 900 46px/1 Inter, sans-serif;
  text-align: center;
  appearance: textfield;
  transition: border-color .2s, transform .2s;
}

.score input::-webkit-inner-spin-button { appearance: none; }
.score input:focus { border-color: #e40b25; transform: translateY(-2px); }
.score input.invalid { border-color: #e40b25; }

.divider {
  padding-bottom: 36px;
  color: #d40b25;
  font-size: 24px;
  font-weight: 900;
}

button {
  width: 100%;
  min-height: 60px;
  margin-top: 26px;
  border: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: linear-gradient(135deg, #f72426 0%, #d40720 55%, #990014 100%);
  box-shadow: 0 12px 28px rgba(205, 3, 31, .24);
  color: #fff;
  font: 900 12px/1 Inter, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s, filter .2s, box-shadow .2s;
}

button:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 15px 32px rgba(205,3,31,.34); }
button:focus-visible { outline: 3px solid #17171d; outline-offset: 3px; }
button span { font-size: 20px; }

.back-button {
  width: fit-content;
  min-height: 0;
  margin: -8px auto 12px;
  padding: 4px 7px;
  gap: 5px;
  border-radius: 6px;
  color: rgba(18,18,24,.56);
  background: transparent;
  box-shadow: none;
  font-size: 9px;
  letter-spacing: .04em;
}

.back-button span { font-size: 13px; }
.back-button:hover { color: #d40b25; background: rgba(212,11,37,.06); box-shadow: none; transform: none; }
.back-button:focus-visible { outline: 2px solid #d40b25; outline-offset: 2px; }

.form-message {
  min-height: 18px;
  margin: 13px 0 -10px;
  text-align: center;
  color: rgba(18,18,24,.62);
  font-size: 11px;
}

.form-message.error { color: #b4001d; }
.form-message.success { color: #08853e; }

.contact-title {
  max-width: 390px;
  font-size: clamp(28px, 3vw, 39px);
  line-height: 1.02;
  white-space: normal;
}

.contact-intro {
  margin: 10px auto 20px;
  color: rgba(18,18,24,.58);
  font-size: 12px;
  line-height: 1.4;
}

.contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  text-align: left;
}

.field-full { grid-column: 1 / -1; }

.field span {
  display: block;
  margin: 0 0 5px 2px;
  color: #363238;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(18,18,24,.16);
  border-radius: 10px;
  outline: 0;
  color: #17171d;
  background: #fff;
  font: 600 12px/1 Inter, sans-serif;
  transition: border-color .2s, box-shadow .2s;
}

.field select { cursor: pointer; }
.field select:disabled { color: rgba(18,18,24,.4); background: #f0ece8; cursor: not-allowed; }
.field input:focus,
.field select:focus { border-color: #d40b25; box-shadow: 0 0 0 3px rgba(212,11,37,.1); }
.field input.invalid,
.field select.invalid { border-color: #d40b25; }

.thank-you {
  max-width: 390px;
  margin: 0 auto;
  padding: 36px 0;
}

.success-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #0a9848;
  box-shadow: none;
}

.success-icon svg {
  width: 38px;
  height: 38px;
  display: block;
}

.thank-you h1 {
  max-width: 370px;
  white-space: normal;
}

.thank-you > p:last-child {
  margin: 18px auto 0;
  color: rgba(18,18,24,.64);
  font-size: 14px;
  line-height: 1.55;
}

.mobile-tires { display: none; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: minmax(0, 700px); gap: 42px; background-position: 35% center; }
  .hero-copy {
    min-height: calc(100svh - clamp(48px, 12vw, 160px));
    align-self: center;
    justify-self: center;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
  .campaign-label { justify-content: center; }
  .campaign-description { margin-inline: auto; }
  .hero-copy::before { inset: -30px -50vw; border-radius: 0; }
  .guess-card { justify-self: center; }
}

@media (max-width: 700px) {
  body { overflow-x: hidden; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0;
    align-items: start;
    height: auto;
    min-height: 100svh;
    overflow: clip;
    padding: 0 18px max(28px, env(safe-area-inset-bottom));
    background: #160002 url("assets/hero-tire-mobile-v2.webp") center top / cover no-repeat;
  }

  .hero::before {
    background: linear-gradient(180deg, rgba(8,0,1,.48) 0%, rgba(12,0,2,.58) 52%, rgba(12,0,2,.78) 100%);
  }

  .brand-logo {
    width: 160px;
    height: 46px;
    margin: 0 auto 12px;
  }

  .brand-logo img {
    width: 160px;
    height: 160px;
    top: -54px;
  }

  .hero-copy {
    grid-row: 1;
    width: 100%;
    min-height: auto;
    padding: 28px 4px 24px;
    display: block;
    text-align: center;
    transform: none;
    min-width: 0;
  }

  .hero-copy::before { content: none; }

  .campaign-label { justify-content: center; margin: 0 auto 9px; padding: 8px 13px; font-size: 8px; letter-spacing: .14em; }
  .campaign-label span { display: none; }

  .hero-copy h2 {
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
    font-size: clamp(29px, 8vw, 38px);
    line-height: .94;
    overflow-wrap: anywhere;
  }

  .hero-copy h2 span,
  .hero-copy h2 em { white-space: normal; }

  .campaign-description { max-width: 355px; margin: 11px auto 0; padding: 8px 11px; font-size: 13px; line-height: 1.3; }

  .guess-card {
    grid-row: 2;
    width: calc(100% - 12px);
    min-height: auto;
    justify-self: center;
    margin-top: 0;
    padding: 18px 17px 17px;
    border-radius: 22px;
    text-align: center;
    background: rgba(255,248,240,.96);
    min-width: 0;
  }

  .contact-title { font-size: 26px; }
  .contact-intro { margin: 7px auto 12px; font-size: 11px; }
  .contact-fields { gap: 8px; }
  .field span { margin-bottom: 3px; font-size: 8px; }
  .field input,
  .field select { height: 41px; padding-inline: 10px; font-size: 11px; }
  [data-step="contact"] button { min-height: 48px; margin-top: 12px; }
  [data-step="contact"] .back-button { min-height: 0; margin: -5px auto 8px; }
  .thank-you { padding: 20px 0; }
  .success-icon { width: 60px; height: 60px; margin-bottom: 16px; }
  .success-icon svg { width: 32px; height: 32px; }
  .thank-you h1 { font-size: 28px; }
  .thank-you > p:last-child { margin-top: 12px; font-size: 12px; }

  .mobile-tires {
    display: none;
  }

  .eyebrow { margin-bottom: 7px; font-size: 9px; }
  h1 { max-width: none; font-size: clamp(24px, 7.2vw, 32px); white-space: normal; }
  .subtitle { margin: 9px auto 16px; padding: 7px 14px; font-size: 11px; }
  .score { gap: 8px; }
  .score .team-icon { width: 54px; height: 36px; }
  .score .team-name { margin-bottom: 8px; font-size: 10px; }
  .score input { height: 68px; border-radius: 11px; font-size: 34px; }
  .divider { padding-bottom: 23px; font-size: 18px; }
  button { min-height: 52px; margin-top: 16px; }
  .form-message { margin-bottom: -4px; }

}

@media (max-width: 380px) {
  .hero { grid-template-rows: auto auto; gap: 0; padding: 0 13px max(20px, env(safe-area-inset-bottom)); }
  .hero-copy { padding: 22px 0 18px; transform: none; }
  .hero-copy h2 { font-size: 28px; }
  .campaign-description { margin-top: 9px; padding-block: 7px; font-size: 12px; }
  .guess-card { padding: 17px 15px 14px; }
  .contact-title { font-size: 23px; }
  .contact-intro { margin-bottom: 8px; }
  .contact-fields { gap: 6px; }
  .field input,
  .field select { height: 37px; }
  .score { gap: 6px; }
  .score .team-icon { width: 46px; height: 31px; margin-bottom: 6px; }
  .score input { height: 60px; font-size: 30px; }
  button { min-height: 48px; margin-top: 12px; }
}
