@import url("https://fonts.googleapis.com/css2?family=Francois+One&family=JetBrains+Mono:wght@400;700&display=swap");

:root {
  --color-orange: #ff710d;
  --color-text: #fff9d9;
  --color-input: #c1e076;
  --color-black: #000;
  --font-heading: "Francois One", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --card-width: clamp(18rem, 36vw, 34rem);
  --space-xs: clamp(0.5rem, 1.2vw, 0.75rem);
  --space-sm: clamp(0.75rem, 1.8vw, 1rem);
  --space-md: clamp(1rem, 2.4vw, 1.5rem);
  --space-lg: clamp(1.25rem, 3vw, 2rem);
  --space-xl: clamp(1.75rem, 4vw, 2.75rem);
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: clamp(0.8125rem, 1.1vw, 0.9375rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-input);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.game {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--color-black) url("bg.jpg") center / cover no-repeat fixed;
}

.game__header {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  background: var(--color-black);
  padding: var(--space-sm) clamp(1rem, 4vw, 2.5rem);
}

.game__logo {
  width: auto;
  height: clamp(2.25rem, 4.5vw, 3.25rem);
}

.game__bg-right {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 4;
  width: min(58vw, 44rem);
  pointer-events: none;
  user-select: none;
}

.game__main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--space-lg) clamp(1rem, 5vw, 5rem);
}

.game__card {
  position: relative;
  z-index: 5;
  width: min(100%, var(--card-width));
  margin-right: clamp(2rem, 7vw, 6rem);
  padding: var(--space-xl) clamp(1.25rem, 3vw, 2.25rem);
  background: url("bg-content.png") center / 100% 100% no-repeat;
}

.panel h1 {
  margin: 0 0 var(--space-md);
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text);
}

.panel > p {
  margin: 0 0 var(--space-md);
}

.panel form {
  margin-top: var(--space-md);
}

.field {
  margin-bottom: var(--space-sm);
}

.field-input {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(193, 224, 118, 0.35);
  border-radius: 0.625rem;
  background: rgba(0, 0, 0, 0.55);
  color: var(--color-input);
  font-family: var(--font-mono);
  font-size: inherit;
  line-height: 1.4;
}

.field-input::placeholder {
  color: var(--color-input);
  opacity: 0.9;
}

.field-input:focus {
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}

.checkbox {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin: var(--space-sm) 0 0;
  font-size: clamp(0.75rem, 1vw, 0.8125rem);
  line-height: 1.45;
  cursor: pointer;
}

.checkbox span {
  flex: 1;
  min-width: 0;
}

.checkbox a {
  text-underline-offset: 0.15em;
}

.checkbox input {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  accent-color: var(--color-orange);
  cursor: pointer;
}

.btn-primary {
  display: block;
  width: 100%;
  margin-top: var(--space-lg);
  padding: 0.95rem 1.5rem;
  border: none;
  border-radius: 999px;
  background: var(--color-orange);
  color: var(--color-black);
  font-family: var(--font-mono);
  font-size: clamp(0.875rem, 1.2vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

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

.flash {
  margin: 0 0 var(--space-sm);
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 249, 217, 0.2);
}

.flash--error {
  border-color: rgba(255, 113, 13, 0.65);
}

.flash--success {
  border-color: rgba(193, 224, 118, 0.65);
}

.password-box {
  margin: var(--space-md) 0;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid rgba(255, 249, 217, 0.22);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.35);
}

.password-box__label {
  margin: 0 0 var(--space-sm);
  color: var(--color-input);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sentence {
  margin: 0;
  line-height: 1.7;
}

.sentence input {
  display: inline-block;
  min-width: clamp(4rem, 12vw, 7rem);
  max-width: 100%;
  margin: 0 0.15rem;
  padding: 0.1rem 0.25rem 0.2rem;
  border: none;
  border-bottom: 2px solid var(--color-input);
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: inherit;
  vertical-align: baseline;
}

.sentence input:focus {
  outline: none;
  border-bottom-color: var(--color-orange);
}

.sentence__comma-group {
  white-space: nowrap;
}

.sentence__comma,
.sentence__period {
  display: inline-block;
  transform: translateY(5px);
}

.podium {
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
}

.podium li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-sm);
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 249, 217, 0.15);
}

.podium .place {
  color: var(--color-orange);
  font-weight: 700;
}

.time {
  color: var(--color-input);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .game {
    background-attachment: scroll;
  }

  .game__main {
    justify-content: center;
    padding-top: var(--space-md);
    padding-bottom: var(--space-xl);
  }

  .game__card {
    margin-right: 0;
  }

  .game__bg-right {
    width: min(72vw, 28rem);
    opacity: 0.85;
  }
}

@media (max-width: 480px) {
  .game__card {
    padding: var(--space-lg) var(--space-md);
  }

  .sentence {
    line-height: 1.9;
  }

  .sentence input {
    min-width: 5rem;
    margin: 0.15rem 0.1rem;
  }
}

.below {
  position: relative;
  background: #fff;
  color: #111;
}

.below__edge {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background: var(--color-black);
  padding: clamp(2.5rem, 6vw, 4rem) 1rem clamp(3.5rem, 9vw, 6rem);
  clip-path: polygon(0 0, 100% 0, 100% 58%, 0 100%);
}

.below__arrow {
  width: clamp(3.25rem, 7vw, 5.25rem);
  height: auto;
  transform: translateY(35%);
}

.below__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(3rem, 8vw, 5.5rem);
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.25rem, 5vw, 3rem) clamp(3.5rem, 9vw, 6rem);
  margin-top: clamp(-1.75rem, -4vw, -1rem);
}

.below__block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
  width: 100%;
  max-width: 42rem;
}

.below__title {
  margin: 0;
  width: min(100%, 18rem);
}

.below__title img {
  width: 100%;
  height: auto;
}

.below__logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(2rem, 6vw, 4.5rem);
  width: 100%;
}

.below__logo-link {
  display: block;
  line-height: 0;
  transition: opacity 0.15s ease;
}

.below__logo-link:hover {
  opacity: 0.75;
}

.below__logo-link img {
  width: auto;
  height: clamp(1.75rem, 4vw, 2.75rem);
}

.below__years {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.25rem, 4vw, 2.5rem);
}

.below__years a {
  color: #111;
  font-family: var(--font-heading);
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  letter-spacing: 0.04em;
  text-decoration: none;
  text-underline-offset: 0.2em;
}

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

.below__years a:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 3px;
}
