@import url('https://fonts.googleapis.com/css2?family=Anton&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #05060d;
  --ink-soft: #0b0e1c;
  --orange: #ff7a1a;
  --orange-deep: #e2570a;
  --blue: #3d6bff;
  --white: #ffffff;
  --muted: #aab1c9;

  /* Join form */
  --field-bg: #f1f1f3;
  --field-ink: #17181f;
  --field-muted: #6c7185;
  --wave: #ececef;

  --font-display: 'Anton', 'Manrope', sans-serif;
  --font-body: 'Manrope', sans-serif;

  /* Stacking order */
  --z-bg: 0;
  --z-glow: 1;
  --z-figures: 2;
  --z-card: 100;
  --z-chrome: 200;
}

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

html,
body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- Hero ---------- */

.hero {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1rem, 2.5vh, 2rem) 3vw clamp(0.75rem, 2vh, 1.5rem);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/bg.png');
  background-size: cover;
  background-position: center;
  z-index: var(--z-bg);
}

.hero__glow {
  position: absolute;
  inset: 0;
  z-index: var(--z-glow);
  background:
    radial-gradient(
      60% 50% at 18% 78%,
      rgba(255, 122, 26, 0.28),
      transparent 70%
    ),
    linear-gradient(
      180deg,
      rgba(5, 6, 13, 0.15) 0%,
      rgba(5, 6, 13, 0.55) 78%,
      rgba(5, 6, 13, 0.92) 100%
    );
}

/* ---------- Title ---------- */

.hero__header {
  position: relative;
  display: flex;
  z-index: 1;
  justify-content: center;
  align-items: center;
}

.hero__eyebrow {
  display: none;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--orange);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.hero__title {
  margin-top: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.hero__title img {
  max-width: 620px;
  max-height: 156px;
}

/* ---------- Middle row ---------- */

.hero__inner {
  position: static;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* ---------- Figures ---------- */

.hero__figures {
  position: absolute;
  inset: 0;
  z-index: var(--z-figures);
  pointer-events: none;
}

.hero__mascot {
  position: absolute;
  left: -2vw;
  bottom: -2vh;
  width: auto;
  height: 96vh;
  max-width: 36vw;
  object-fit: contain;
  object-position: left bottom;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.55));
}

.hero__phone-wrap {
  position: absolute;
  right: -1.5vw;
  bottom: -4vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.hero__phone {
  width: auto;
  height: 92vh;
  max-width: 32vw;
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.55));
}

/* ---------- Join form ---------- */

.join {
  position: relative;
  z-index: var(--z-card);
  pointer-events: auto;

  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
    max-height: 350px;
  padding: clamp(1.1rem, 2.4vh, 1.75rem)
    1.6rem
    clamp(2rem, 4.5vh, 3.25rem);

  background: var(--white);
  color: var(--field-ink);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.join::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.5rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath fill='%23ececef' d='M0 28C50 6 110 4 190 26s150 30 210 4V60H0Z'/%3E%3C/svg%3E")
    center / 100% 100%
    no-repeat;
  pointer-events: none;
}

.join__title,
.join__form {
  position: relative;
  z-index: 1;
}

.join__title {
  text-align: center;
  font-size: 45px;
  line-height: 150%;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: clamp(0.8rem, 2vh, 1.25rem);
}

.join__form {
  display: flex;
  flex-direction: column;
  gap: clamp(0.6rem, 1.4vh, 0.85rem);
}

.field {
  display: flex;
  align-items: center;
  height: clamp(2.6rem, 5.6vh, 3.1rem);
  background: var(--field-bg);
  border-radius: 0.5rem;
}

.field:focus-within {
  box-shadow: 0 0 0 2px var(--orange);
}

.field__country {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  padding: 0 0.5rem 0 0.85rem;
  cursor: pointer;
}

.field__flag {
  flex: none;
  width: 1.5rem;
  height: 1rem;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.field__country select {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: 0;
  outline: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--field-ink);
  padding: 0.6rem 1.15rem 0.6rem 0;
}

.field__chevron {
  position: absolute;
  right: 0.5rem;
  width: 0.65rem;
  height: 0.45rem;
  color: var(--field-muted);
  pointer-events: none;
}

.field__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: none;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--field-ink);
  padding: 0 0.9rem;
}

.field__input::placeholder {
  color: var(--field-muted);
  font-weight: 600;
}

.field__input--promo {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.join__submit {
  align-self: center;
  min-width: 11rem;
  margin-top: 0.4rem;
  padding: clamp(0.6rem, 1.5vh, 0.85rem) 2rem;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: var(--white);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(226, 87, 10, 0.35);
  transition: background-color 0.2s ease;
}

.join__submit:hover {
  background: var(--orange-deep);
}

.join__submit:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

/* ---------- Partner ---------- */

.hero__partner {
  position: relative;
  z-index: var(--z-chrome);
  flex: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: clamp(0.4rem, 1.2vw, 1rem);
  margin: clamp(0.5rem, 1.5vh, 1rem) auto 0;
}

.hero__partner img {
  max-width: 307px;
  max-height: 179px;
  height: auto;
  aspect-ratio: 307 / 197;
  object-fit: contain;
}

.hero__partner-label {
  font-size: clamp(20px, 3.4vw, 48px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
  font-family: 'Roboto';
}

/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 960px) {

  .join__title {
    font-size: 28px;
  }

  html,
  body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .hero {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: clamp(0.7rem, 2vh, 1.25rem) 5vw;
  }

  /*
   * IMPORTANT:
   * The inner layer is allowed to be non-interactive so the
   * figures never block the page.
   */
  .hero__inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    flex: none;
    pointer-events: none;
    margin-top: 100px;
  }

  .hero__figures {
    position: absolute;
    inset: 0;
    z-index: var(--z-figures);
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }

  .hero__mascot {
    position: absolute;
    left: 7vw;
    top: 6vh;
    width: auto;
    height: auto;
    max-width: 64vw;
    max-height: 58vh;
    margin: 0;
    flex-shrink: 0;
    z-index: 1;
  }

  .hero__phone-wrap {
    position: absolute;
    right: 0;
    top: 6vh;
    bottom: auto;
    align-self: auto;
    flex-shrink: 0;
    z-index: 2;
  }

  .hero__phone {
    position: static;
    width: auto;
    height: auto;
    max-width: 56vw;
    max-height: 50vh;
  }

  /*
   * FORM
   *
   * This is intentionally above the figures.
   * pointer-events:auto is critical because .hero__inner
   * has pointer-events:none.
   */
  .join {
    position: absolute;
    z-index: 100;
    pointer-events: auto;

    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%);

    width: min(88vw, 24rem);
    max-width: 88vw;
    max-height: 350px;
    margin: 0;

    padding: 1.05rem 1.1rem 1.9rem;
    
    flex-shrink: 0;
  }

  .join *,
  .join input,
  .join select,
  .join button {
    pointer-events: auto;
  }

  .hero__partner {
    position: relative;
    z-index: var(--z-chrome);
  }

  .hero__partner img {
    width: 231px;
    height: 134px;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 560px) {

  .hero__title {
    font-size: clamp(2rem, 11vw, 2.9rem);
  }

  .hero__title img {
    max-width: 276px;
    max-height: 70px;
  }

  .hero__inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    flex: none;

    /*
     * Figures themselves don't receive clicks.
     */
    pointer-events: none;

    margin-top: 60px;
  }

  .hero__figures {
    z-index: 2;
    pointer-events: none;
  }

  .hero__mascot {
    left: 5vw;
    bottom: 8vh;
    max-width: 68vw;
    max-height: 50vh;
    z-index: 1;
    pointer-events: none;
  }

  .hero__phone-wrap {
    right: -5vw;
    top: 0;
    z-index: 2;
    pointer-events: none;
  }

  .hero__phone {
    max-width: 58vw;
    max-height: 50vh;
    pointer-events: none;
  }

  /*
   * FORM IS ALWAYS THE TOP MOBILE LAYER
   */
  .join {
    position: absolute;

    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);

    width: min(90vw, 24rem);
    max-width: 90vw;
    max-height: 350px;

    padding: 1.05rem 1rem 1.9rem;

    /*
     * Higher than .hero__figures
     */
    z-index: 9999;

    /*
     * CRITICAL:
     * .hero__inner has pointer-events:none.
     * Restore interaction for the form.
     */
    pointer-events: auto;

    touch-action: auto;
  }

  .join__form {
    position: relative;
    z-index: 10000;
    pointer-events: auto;
  }

  .join__title {
    font-size: 26px;
    pointer-events: none;
  }

  .join__form input,
  .join__form select,
  .join__form button,
  .join__form label,
  .field,
  .field__country {
    pointer-events: auto;
  }

  .hero__partner {
    display: block;
    margin-top: 0;
  }

  .hero__partner img {
    max-width: 231px;
    max-height: 134px;
    margin-bottom: 0;
  }

  .hero__partner-label {
    font-size: clamp(18px, 6vw, 26px);
    text-align: center;
    margin-bottom: 0;
  }
}

/* =========================================================
   VERY SHORT SCREENS
   ========================================================= */

@media (max-height: 520px) {

  .hero__mascot,
  .hero__phone {
    max-height: 26vh;
  }

  .hero__partner img {
    width: clamp(60px, 12vw, 90px);
  }

  .hero__partner-label {
    font-size: clamp(16px, 3vw, 24px);
  }
}
/* =========================
   OTP FORM
   ========================= */

#otp-step {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

#otp-step .join__title {
    text-align: center;
    margin-bottom: 10px;
}

#otp-step .otp-description {
    margin: 0;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.75;
}

#otp-step .otp-mobile {
    margin: 5px 0 22px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
}

/* OTP boxes */
#otp-step .otp-inputs {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 18px;
}

#otp-step .otp-input {
    width: 48px;
    height: 56px;
    flex: 0 0 48px;
    padding: 0;
    margin: 0;

    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);

    color: #fff;
    font-size: 24px;
    font-weight: 700;
    line-height: 56px;
    text-align: center;

    outline: none;
    box-sizing: border-box;

    -webkit-appearance: none;
    appearance: none;
}

/* Focused OTP box */
#otp-step .otp-input:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

/* Prevent browser number arrows */
#otp-step .otp-input::-webkit-outer-spin-button,
#otp-step .otp-input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

/* Error */
#otp-step .signup-error {
    width: 100%;
    margin: 0 0 12px;
    text-align: center;
    font-size: 13px;
    line-height: 1.4;
    color: #ff6b6b;
}

/* Verify button */
#otp-step #verify-otp-btn {
    width: 100%;
    display: block;
    margin: 0;
}

/* Change number */
#otp-step .otp-back {
    width: 100%;
    display: block;
    margin: 14px 0 8px;
    padding: 10px 0;

    border: 0;
    background: transparent;

    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;

    cursor: pointer;
    opacity: 0.8;
}

#otp-step .otp-back:hover {
    opacity: 1;
}

/* Resend OTP */
#otp-step .otp-resend {
    width: 100%;
    display: block;
    margin: 0;
    padding: 8px 0;

    border: 0;
    background: transparent;

    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;

    cursor: pointer;
}

#otp-step .otp-resend:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

#otp-step .otp-resend:not(:disabled):hover {
    text-decoration: underline;
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 480px) {
    #otp-step {
        max-width: 100%;
    }

    #otp-step .otp-inputs {
        gap: 7px;
    }

    #otp-step .otp-input {
        width: 44px;
        height: 52px;
        flex-basis: 44px;
        font-size: 22px;
        line-height: 52px;
        border-radius: 9px;
    }
}

@media (max-width: 360px) {
    #otp-step .otp-inputs {
        gap: 5px;
    }

    #otp-step .otp-input {
        width: 40px;
        height: 48px;
        flex-basis: 40px;
        font-size: 20px;
        line-height: 48px;
    }
}

/* OTP input visibility fix */
#otp-step .otp-input {
    display: block !important;
    width: 48px !important;
    height: 56px !important;
    flex: 0 0 48px !important;

    background: #1b1b1b !important;
    color: #ffffff !important;

    border: 2px solid #ffffff !important;
    border-radius: 10px !important;

    text-align: center !important;
    font-size: 24px !important;
    font-weight: 700 !important;

    opacity: 1 !important;
    visibility: visible !important;

    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Make the entered number clearly visible */
#otp-step .otp-input:focus {
    background: #222222 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2) !important;
}

/* Keep all 6 boxes in one row */
#otp-step .otp-inputs {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
}

/* Mobile */
@media (max-width: 480px) {
    #otp-step .otp-input {
        width: 42px !important;
        height: 50px !important;
        flex: 0 0 42px !important;
        font-size: 21px !important;
    }

    #otp-step .otp-inputs {
        gap: 6px !important;
    }
}