/* ============ Fonts ============ */

@font-face {
  font-family: '946 Latin';
  src: url('../font/946Latin-Regular4R.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============ Tokens ============ */

:root {
  --bg: #12171e;
  --accent: #c0fa2f;
  --ui-green: #b4e044;
  --ui-green-hover: #e1ff95;
  --danger: #d82e39;
  --ink: #101010;
  --placeholder: #696969;
  --muted: #a1a1a1;
  --tagline: #6d6e72;

  --font-display: '946 Latin', 'Arial Narrow', Impact, sans-serif;
  --font-text: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

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

button {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

body {
  background: var(--bg);
  color: #fff;
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

/* ============ Hero layout ============ */

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

/* --- media (stadium / strokes / players) --- */

.hero__media {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: min(110vw, 560px);
  overflow: hidden;
  pointer-events: none;
}

.hero__stadium {
  position: absolute;
  inset: 0;
  background: url('../assets/stadium.png') center / cover no-repeat;
}

.hero__strokes {
  position: absolute;
  left: 50%;
  top: 5.7%;
  width: min(140vw, 720px);
  max-width: none;
  transform: translateX(-50%);
}

.hero__players {
  position: absolute;
  left: 50%;
  top: 6%;
  width: min(137vw, 700px);
  max-width: none;
  transform: translateX(-50%);
}

.hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 45%;
  background: linear-gradient(180deg, rgba(18, 23, 30, 0) 0%, var(--bg) 72%);
}

/* --- header --- */

.hero__header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  padding: 14px 20px 0;
}

.logo img {
  width: 84px;
  height: auto;
}

.hero__tagline {
  display: none;
  font-family: var(--font-display);
  /* Начертание 4R шире макетного «Semidense», поэтому размер подобран так,
     чтобы строка целиком помещалась в отведённое место на любой ширине */
  font-size: clamp(14px, 1.6vw - 2px, 24px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--tagline);
  white-space: nowrap;
  overflow: hidden;
}

/* --- content --- */

.content {
  position: relative;
  z-index: 2;
  padding: min(86vw, 440px) 16px 48px;
  max-width: 432px;
  margin: 0 auto;
}

/* ============ Offer headline ============ */

.offer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}

.offer__line {
  display: block;
}

.offer__line--sm {
  font-size: clamp(22px, 7.2vw, 26px);
  line-height: 1.23;
}

.offer__line--xl {
  font-size: clamp(52px, 17vw, 68px);
  line-height: 0.86;
  color: var(--accent);
}

.offer__accent {
  color: var(--accent);
}

/* ============ Form ============ */

.form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 16px;
}

.form__fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- inputs (floating label) --- */

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field__box {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 10px;
}

.field__input {
  flex: 1 0 0;
  min-width: 1px;
  height: 100%;
  padding: 20px 12px 6px;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
}

.field__label {
  position: absolute;
  left: 12px;
  top: 50%;
  translate: 0 -50%;
  font-size: 16px;
  line-height: 1.4;
  color: var(--placeholder);
  pointer-events: none;
  transition: top 0.15s ease, translate 0.15s ease, font-size 0.15s ease;
}

.field__input:focus ~ .field__label,
.field__input:not(:placeholder-shown) ~ .field__label {
  top: 6px;
  translate: 0 0;
  font-size: 10px;
  font-weight: 500;
}

.field__eye,
.field__alert {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-right: 12px;
  color: var(--ink);
}

.field__eye svg,
.field__alert svg {
  width: 20px;
  height: 20px;
}

.field__eye-off,
.field--visible .field__eye-on {
  display: none;
}

.field--visible .field__eye-off {
  display: block;
}

.field__alert {
  display: none;
  color: var(--danger);
}

.field__error {
  display: none;
  font-size: 12px;
  line-height: 1.4;
  color: var(--danger);
}

.field--error .field__box {
  border-color: var(--danger);
}

.field--error .field__alert {
  display: flex;
}

.field--error .field__eye {
  display: none;
}

.field--error .field__error {
  display: block;
}

/* --- checkbox --- */

.agree {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 12px;
  background: rgba(217, 217, 217, 0.1);
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.agree__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.agree__box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 2px solid var(--ui-green);
  border-radius: 4px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.agree__box svg {
  width: 16px;
  height: 16px;
  color: var(--bg);
  opacity: 0;
}

.agree:hover .agree__box {
  background: rgba(180, 224, 68, 0.4);
}

.agree__input:checked ~ .agree__box {
  background: var(--ui-green);
  border-color: var(--ui-green);
}

.agree__input:checked ~ .agree__box svg {
  opacity: 1;
}

.agree__input:focus-visible ~ .agree__box {
  outline: 2px solid var(--ui-green);
  outline-offset: 2px;
}

.agree--error .agree__box {
  border-color: var(--danger);
  background: none;
}

.agree__text {
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: var(--muted);
}

.agree__strong {
  color: #fff;
}

/* --- submit button --- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  height: 49px;
  padding: 14px 32px;
  background: var(--ui-green);
  border-radius: 40px;
  font-family: var(--font-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 21px;
  color: #010101;
  transition: background-color 0.15s ease;
}

.btn:hover {
  background: var(--ui-green-hover);
}

.btn:disabled {
  background: rgba(180, 224, 68, 0.3);
  cursor: default;
}

/* ============ Desktop ============ */

@media (min-width: 1200px) {
  .hero {
    display: flex;
    align-items: center;
  }

  .hero__media {
    inset: 0;
    height: auto;
  }

  .hero__stadium {
    -webkit-mask-image: linear-gradient(100deg, transparent 28%, #000 55%);
    mask-image: linear-gradient(100deg, transparent 28%, #000 55%);
  }

  .hero__strokes {
    left: 34.7%;
    top: 5.8%;
    width: 71.8%;
    transform: none;
  }

  .hero__players {
    left: auto;
    top: auto;
    right: -2.4%;
    bottom: -4.3%;
    width: 68.75%;
    transform: none;
  }

  .hero__fade {
    display: none;
  }

  .hero__header {
    padding: 14px 50px;
  }

  .logo img {
    width: 113px;
  }

  .hero__tagline {
    display: block;
    position: absolute;
    left: calc(33.33% + 90px);
    right: 0;
    top: 32px;
  }

  .content {
    margin: 0;
    padding: 0 0 0 50px;
    max-width: none;
    width: 529px;
  }

  .offer {
    align-items: flex-start;
    text-align: left;
  }

  .offer__line--sm {
    font-size: clamp(26px, 2.92vw, 42px);
    line-height: 1;
  }

  .offer__line--xl {
    font-size: clamp(68px, 7.92vw, 114px);
    line-height: 0.89;
  }

  .form {
    margin-top: 24px;
    width: 400px;
  }

  .form__fields {
    gap: 8px;
  }

  .agree {
    align-items: center;
    height: 54px;
    padding: 11px 12px;
  }

  .agree__box {
    width: 20px;
    height: 20px;
  }

  .agree__box svg {
    width: 12px;
    height: 12px;
  }
}

@media (min-width: 1440px) {
  .hero__header,
  .content {
    padding-left: calc((100% - 1440px) / 2 + 50px);
  }

  .hero__strokes {
    left: calc((100% - 1440px) / 2 + 500px);
    width: 1034px;
  }

  .hero__players {
    right: calc((100% - 1440px) / 2 - 35px);
    width: 990px;
  }
}
