:root {
  color-scheme: dark;
  --orange: #ff831c;
  --orange-deep: #e36412;
  --blue-night: #001a5c;
  --field-glow: rgba(255, 255, 255, 0.3);
  --error: #ffd1b0;
}

@font-face {
  font-family: "DINNextArabic";
  src:
    url("./assets/DINNextLTArabic-Regular-2.woff2") format("woff2"),
    url("./assets/DINNextLTArabic-Regular-2.woff") format("woff"),
    url("./assets/DINNextLTArabic-Regular-2.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(0, 93, 214, 0.42), transparent 36rem),
    linear-gradient(150deg, #001140, #002677 48%, #010a23);
  font-family: "DINNextArabic", Arial, "Helvetica Neue", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

input {
  -webkit-text-size-adjust: 100%;
}

.app {
  position: relative;
  width: min(100vw, 56.25dvh);
  height: min(100dvh, 177.78vw);
  max-width: 900px;
  max-height: 1600px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--blue-night);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
}

.screen.active {
  display: block;
}

.screen-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.brand-logo {
  position: absolute;
  width: 52%;
  height: auto;
  left: 24%;
  top: 5.25%;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.form-logo {
  top: 5.1%;
}

.form-tagline {
  position: absolute;
  z-index: 1;
  top: 26.6%;
  left: 11.5%;
  width: 77%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.activation-form {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.activation-form::before {
  content: "";
  position: absolute;
  left: 10%;
  top: 34%;
  width: 80%;
  height: 45%;
  border-radius: 9%;
  background: rgba(0, 19, 83, 0.76);
  box-shadow: 0 1.4rem 3rem rgba(0, 0, 0, 0.32);
}

.field-label {
  position: absolute;
  z-index: 1;
  right: 17.8%;
  width: 64%;
  color: rgba(255, 255, 255, 0.92);
  font-size: 20px;
  line-height: 1;
  text-align: right;
  font-family: "DINNextArabic", Arial, "Helvetica Neue", sans-serif;
  text-shadow: 0 0 0.8rem rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.label-name {
  top: 36.2%;
}

.label-phone {
  top: 45.5%;
}

.label-email {
  top: 54.8%;
}

.label-code {
  top: 64.1%;
  width: 70%;
  right: 14.9%;
}

.field {
  position: absolute;
  z-index: 2;
  width: 65%;
  height: 5.6%;
  left: 17.8%;
  border: 0;
  border-bottom: clamp(1px, 0.28vw, 3px) solid rgba(255, 255, 255, 0.9);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  padding: 0 0.4rem;
  font-size: clamp(1rem, 5vw, 2.05rem);
  font-family: "DINNextArabic", Arial, "Helvetica Neue", sans-serif;
  line-height: 1;
  text-align: left;
  text-shadow: 0 0 12px rgba(0, 19, 89, 0.88);
  caret-color: var(--orange);
  -webkit-appearance: none;
  appearance: none;
}

.field:focus {
  border-bottom-color: var(--orange);
  box-shadow: 0 0 0.85rem var(--field-glow);
}

.field.invalid {
  border-bottom-color: var(--error);
}

.field-name {
  top: 36.6%;
}

.field-phone {
  top: 45.9%;
}

.field-email {
  top: 55.2%;
}

.field-code {
  top: 64.5%;
}

.terms-control {
  position: absolute;
  z-index: 2;
  top: 71.5%;
  left: 19%;
  width: 62%;
  min-height: 6%;
  cursor: pointer;
  color: #fff;
}

.terms-control input {
  position: absolute;
  opacity: 0;
  right: 0;
  top: 0;
  width: 16%;
  aspect-ratio: 1;
  cursor: pointer;
}

.terms-control span[aria-hidden="true"] {
  position: absolute;
  right: 0;
  top: 0;
  width: 14%;
  aspect-ratio: 1;
  border: clamp(2px, 0.8vw, 5px) solid rgba(255, 255, 255, 0.94);
  border-radius: 23%;
  background: rgba(0, 21, 83, 0.2);
}

.terms-control input:checked + span[aria-hidden="true"] {
  border-color: #fff;
  background: var(--orange);
  box-shadow: 0 0 1rem rgba(255, 131, 28, 0.62);
}

.terms-control input:checked + span[aria-hidden="true"]::after {
  content: "";
  position: absolute;
  left: 27%;
  top: 9%;
  width: 28%;
  height: 56%;
  border: solid #fff;
  border-width: 0 clamp(2px, 0.7vw, 5px) clamp(2px, 0.7vw, 5px) 0;
  transform: rotate(45deg);
}

.terms-text {
  position: absolute;
  right: 18%;
  top: 0.25em;
  width: 78%;
  color: #fff;
  font-size: clamp(0.82rem, 3.85vw, 1.75rem);
  font-family: "DINNextArabic", Arial, "Helvetica Neue", sans-serif;
  line-height: 1.15;
  text-align: right;
  text-shadow: 0 0 0.75rem rgba(0, 0, 0, 0.9);
}

.form-error {
  position: absolute;
  z-index: 3;
  top: 77.2%;
  left: 15%;
  width: 70%;
  min-height: 1.2rem;
  margin: 0;
  color: var(--error);
  font-size: clamp(0.74rem, 3.3vw, 1.2rem);
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.86);
}

.tap-zone {
  position: absolute;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tap-zone:disabled {
  cursor: wait;
  pointer-events: none;
}

.tap-zone:focus-visible {
  outline: clamp(2px, 0.8vw, 5px) solid rgba(255, 255, 255, 0.88);
  outline-offset: 0.18rem;
  border-radius: 0.9rem;
}

.participate-button {
  left: 17%;
  top: 80.5%;
  width: 66%;
  height: 7.2%;
}

.submit-button {
  z-index: 3;
  left: 28.8%;
  top: 79%;
  width: 42.4%;
  height: auto;
  padding: 0;
}

.submit-button img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.restart-button {
  left: 10%;
  top: 26%;
  width: 80%;
  height: 34%;
}

.win-logo {
  top: 5.1%;
}

.win-card {
  position: absolute;
  z-index: 1;
  left: 5%;
  top: 22.5%;
  width: 90%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.win-tagline {
  position: absolute;
  z-index: 1;
  left: 9%;
  bottom: 10.8%;
  width: 82%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.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;
}

.noscript {
  position: fixed;
  inset: auto 1rem 1rem;
  z-index: 3;
  margin: 0;
  border-radius: 8px;
  background: #fff;
  color: #001a5c;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

@media (min-width: 720px) {
  body {
    padding: 2rem;
  }

  .app {
    border-radius: 18px;
  }
}
