/*
 * Saints Conference landing page
 */

@import url("https://use.typekit.net/daz5qkw.css");

:root {
  --brand-blue: #1616f2;
  --font-brand: "neue-haas-grotesk-display", "neue-haas-grotesk-text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html,
body {
  height: 100%;
  background: #000;
  font-family: var(--font-brand);
}

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

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__video--portrait {
  display: none;
}

/* Darken the video so white type reads clearly */
.hero__tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.7) 100%);
}

/* Design overlay — live text and elements laid over the video, positioned
   to match the approved design mockups. One markup structure for both
   breakpoints; only positions/sizes change at the mobile breakpoint. */

.hero__overlay-image--hidden {
  opacity: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  color: #fff;
  transition: opacity 0.5s ease;
}

.hero__small-wordmark {
  position: absolute;
  top: calc(3.8% + env(safe-area-inset-top));
  left: 2.2%;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero__conf-text,
.hero__date-text {
  position: absolute;
  top: calc(1.5rem + env(safe-area-inset-top));
  font-size: 0.8rem;
  line-height: 1.4;
  font-weight: 500;
}

.hero__conf-text {
  left: 20.2%;
  max-width: 18rem;
}

.hero__date-text {
  left: 50.4%;
}

.hero__cta-button {
  position: absolute;
  top: calc(1.5rem + env(safe-area-inset-top));
  left: 70.5%;
  z-index: 5;
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  color: #fff;
  font-family: var(--font-brand);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}

.hero__cta-button:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.hero__ya-logo {
  position: absolute;
  top: calc(1.25rem + env(safe-area-inset-top));
  right: calc(1.25rem + env(safe-area-inset-right));
  width: 2.75rem;
  height: auto;
}

.hero__wordmark {
  position: absolute;
  left: 2.27%;
  right: 2.4%;
  bottom: 2.9%;
  font-size: 25.62vw;
  font-weight: 700;
  line-height: 0.72;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-align: center;
}

/* Form card, floated on top of the video */

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  padding-top: calc(1.5rem + env(safe-area-inset-top));
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.55);
  overflow-y: auto;
  touch-action: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal__square {
  position: relative;
  width: 100%;
  max-width: 25rem;
  max-height: 100%;
  overflow-y: auto;
  margin: auto;
  background: var(--brand-blue);
  border-radius: 0.5rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  z-index: 11;
  appearance: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
}

.modal__close:hover {
  opacity: 1;
}

.modal__inner {
  padding: 2.25rem 1.6rem 1.85rem;
  color: #fff;
  font-family: var(--font-brand);
}

.modal__inner--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.25rem;
  min-height: 22rem;
}

.modal__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  margin-bottom: 0.5rem;
}

.modal__subtitle {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

.reg-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.35rem;
}

.reg-form__errors {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Rails wraps invalid fields in a .field_with_errors div — keep layout unaffected */
.field_with_errors {
  display: contents;
}

.reg-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.reg-form__field label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.8);
}

.reg-form__field input {
  appearance: none;
  background: #fff;
  border: none;
  border-radius: 0.3rem;
  padding: 0.65rem 0.85rem;
  color: #111;
  font-size: 0.88rem;
  font-family: var(--font-brand);
}

.reg-form__field input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.reg-form__field input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}

.reg-form__check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: #fff;
  cursor: pointer;
}

.reg-form__check input {
  width: 0.95rem;
  height: 0.95rem;
  accent-color: #fff;
  cursor: pointer;
}

.reg-form__submit {
  appearance: none;
  border: none;
  background: #fff;
  color: var(--brand-blue);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  padding: 0.75rem 2.25rem;
  border-radius: 0.3rem;
  cursor: pointer;
  margin-top: 0.35rem;
  font-family: var(--font-brand);
}

.reg-form__submit:hover {
  background: rgba(255, 255, 255, 0.85);
}

@media (max-width: 720px) {
  .hero__video--landscape {
    display: none;
  }

  .hero__video--portrait {
    display: block;
  }

  .hero__small-wordmark {
    display: none;
  }

  .hero__conf-text {
    top: 1.96%;
    left: 3.38%;
    right: 4rem;
    max-width: none;
    font-size: 0.95rem;
    font-weight: 500;
  }

  .hero__date-text {
    top: 22.34%;
    left: 3.6%;
    font-size: 1.1rem;
    font-weight: 500;
  }

  .hero__cta-button {
    top: 43.12%;
    left: 3.8%;
    font-size: 1.1rem;
    font-weight: 500;
  }

  .hero__wordmark {
    left: 3.24%;
    right: 3.49%;
    bottom: 1.85%;
    font-size: 27.83vw;
  }
}

@media (max-width: 480px) {
  .modal {
    padding: 1rem;
  }

  .modal__inner {
    padding: 2.5rem 1.5rem 1.75rem;
  }

  .modal__inner--center {
    min-height: 18rem;
  }

  .modal__title {
    font-size: 1.2rem;
  }

  .reg-form {
    gap: 0.9rem;
  }

  .reg-form__field input {
    padding: 0.75rem 0.9rem;
  }

  .reg-form__submit {
    width: 100%;
    text-align: center;
  }
}
