/*
  Java United launch page
  The club crest is the focal point, with the rallying line split around it on wide screens
  and stacked beneath it on portrait screens.
*/
:root {
  --ink: oklch(97% 0.012 86);
  --ink-muted: oklch(91% 0.012 28 / 0.78);
  --backdrop: oklch(45% 0.17 27);
  --deep: oklch(28% 0.11 25);
  --panel: oklch(34% 0.14 25 / 0.98);
  --gold: oklch(86% 0.13 91);
  --glass-edge: oklch(97% 0.01 86 / 0.72);
  --glass-fill: oklch(97% 0.01 86 / 0.09);
  --button-width: clamp(180px, 15.7vw, 250px);
  --button-height: clamp(48px, 6.45vh, 60px);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--backdrop);
}

body,
button,
input,
textarea {
  font-family: "Inter", Arial, Helvetica, sans-serif;
}

body {
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  appearance: none;
}

::selection {
  background: var(--gold);
  color: var(--deep);
}

.landing {
  position: fixed;
  inset: 0;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: var(--backdrop);
}

.landing__art,
.landing__art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.landing__art {
  z-index: -1;
}

.landing__art img {
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.club-crest {
  position: absolute;
  z-index: 2;
  top: 25.8%;
  left: 50%;
  display: block;
  width: clamp(220px, min(21vw, 34vh), 320px);
  height: auto;
  transform: translateX(-50%);
  user-select: none;
  -webkit-user-drag: none;
}

.tagline {
  position: absolute;
  z-index: 1;
  top: 39.5%;
  left: 0;
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) clamp(330px, 26.4vw, 430px) minmax(0, 1fr);
  align-items: center;
  padding: 0 clamp(48px, 7.5vw, 120px);
  margin: 0;
  color: var(--gold);
  font-size: clamp(50px, min(5.1vw, 8.2vh), 76px);
  font-weight: 900;
  letter-spacing: -0.052em;
  line-height: 0.96;
  text-transform: uppercase;
}

.tagline span {
  white-space: nowrap;
}

.tagline span:first-child {
  grid-column: 1;
  text-align: right;
}

.tagline span:last-child {
  grid-column: 3;
  text-align: left;
}

.actions {
  position: absolute;
  z-index: 3;
  top: 62.15%;
  left: 50%;
  display: flex;
  gap: clamp(16px, 1.4vw, 24px);
  transform: translateX(-50%);
}

.glass-button {
  position: relative;
  display: grid;
  width: var(--button-width);
  height: var(--button-height);
  place-items: center;
  padding: 0 18px;
  overflow: hidden;
  border: 2px solid var(--glass-edge);
  border-radius: 999px;
  background:
    radial-gradient(
      ellipse 46% 110% at 0% 50%,
      oklch(97% 0.01 86 / 0.72) 0%,
      oklch(97% 0.01 86 / 0.38) 28%,
      oklch(97% 0.01 86 / 0.1) 62%,
      transparent 100%
    ),
    var(--glass-fill);
  box-shadow:
    inset 0 0 16px oklch(97% 0.01 86 / 0.12),
    0 1px 5px oklch(20% 0.08 25 / 0.4);
  color: var(--ink);
  font-size: clamp(12px, min(1.15vw, 1.85vh), 17px);
  font-weight: 400;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 2px oklch(20% 0.08 25 / 0.4);
  cursor: pointer;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition:
    border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.glass-button:hover {
  border-color: oklch(98% 0.008 86 / 0.96);
  background-color: oklch(98% 0.008 86 / 0.13);
}

.glass-button:active {
  transform: scale(0.985);
}

.socials {
  position: absolute;
  z-index: 3;
  bottom: calc(8.5% + env(safe-area-inset-bottom) * 0.2);
  left: 50%;
  display: flex;
  align-items: center;
  gap: clamp(7px, 0.7vw, 11px);
  transform: translateX(-50%);
}

.social-link {
  display: grid;
  width: clamp(24px, 2.22vw, 36px);
  height: clamp(24px, 2.22vw, 36px);
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.social-link:hover {
  transform: translateY(-2px);
}

.social-link svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-link .fill {
  fill: currentColor;
  stroke: none;
}

.social-link .cutout {
  fill: var(--backdrop);
  stroke: none;
}

.social-link--youtube {
  width: clamp(34px, 3.2vw, 50px);
}

.glass-button:focus-visible,
.social-link:focus-visible,
.dialog-close:focus-visible,
.form-field input:focus-visible,
.form-field textarea:focus-visible,
.submit-button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.dialog-panel {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid oklch(97% 0.01 86 / 0.42);
  border-radius: 20px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 26px 80px oklch(18% 0.08 25 / 0.6);
}

.dialog-panel::backdrop {
  background: oklch(18% 0.09 25 / 0.76);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.dialog-close {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 10px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover {
  background: oklch(97% 0.01 86 / 0.1);
}

.video-placeholder {
  display: grid;
  min-height: 292px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 38px;
  text-align: center;
}

.video-placeholder svg {
  width: 52px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
}

.video-placeholder .fill {
  fill: var(--gold);
  stroke: none;
}

.video-placeholder h2,
.video-placeholder p {
  margin: 0;
}

.video-placeholder h2 {
  margin-top: 12px;
  font-size: 25px;
  font-weight: 800;
}

.video-placeholder p {
  color: var(--ink-muted);
  font-size: 15px;
}

.contact-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
}

.contact-dialog__content {
  padding: clamp(30px, 5vw, 52px);
}

.contact-heading {
  padding-right: 36px;
}

.contact-kicker,
.contact-heading h2,
.contact-heading p {
  margin: 0;
}

.contact-kicker {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-heading h2 {
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.contact-heading p:last-child {
  max-width: 42ch;
  margin-top: 13px;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.5;
}

.form-status {
  margin: 22px 0 0;
  padding: 13px 15px;
  border: 1px solid oklch(86% 0.13 91 / 0.55);
  border-radius: 10px;
  background: oklch(86% 0.13 91 / 0.1);
  color: var(--gold);
  font-size: 14px;
  line-height: 1.45;
}

.form-status:empty {
  display: none;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field--wide {
  grid-column: 1 / -1;
}

.form-field label {
  color: oklch(95% 0.01 86 / 0.9);
  font-size: 13px;
  font-weight: 700;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid oklch(97% 0.01 86 / 0.34);
  border-radius: 10px;
  background: oklch(97% 0.01 86 / 0.08);
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  transition:
    border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.form-field input {
  min-height: 48px;
  padding: 10px 13px;
}

.form-field textarea {
  min-height: 126px;
  max-height: 250px;
  padding: 12px 13px;
  resize: vertical;
}

.form-field input:hover,
.form-field textarea:hover,
.form-field input:focus,
.form-field textarea:focus {
  border-color: oklch(86% 0.13 91 / 0.8);
  background: oklch(97% 0.01 86 / 0.12);
}

.submit-button {
  min-height: 50px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--gold);
  color: var(--deep);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.submit-button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.submit-button:active {
  transform: scale(0.99);
}

.submit-button:disabled {
  cursor: wait;
  filter: saturate(0.6);
  opacity: 0.72;
}

.form-honeypot {
  position: absolute;
  left: -10000px;
}

@media (max-width: 520px) {
  .contact-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
  }

  .contact-dialog__content {
    padding: 30px 20px 24px;
  }

  .contact-form {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 24px;
  }

  .form-field--wide {
    grid-column: auto;
  }
}

@media (max-aspect-ratio: 3/4) {
  :root {
    --button-width: clamp(110px, 28.2vw, 180px);
    --button-height: clamp(28px, 7.18vw, 46px);
  }

  .club-crest {
    top: 24.1%;
    width: clamp(165px, 54vw, 245px);
  }

  .tagline {
    top: 51.7%;
    left: 50%;
    display: block;
    width: min(80vw, 312px);
    padding: 0;
    transform: translateX(-50%);
    font-size: clamp(32px, 9.6vw, 40px);
    letter-spacing: -0.055em;
    line-height: 0.96;
    text-align: center;
  }

  .tagline span {
    display: inline;
    white-space: normal;
  }

  .actions {
    top: 63.45%;
    flex-direction: column;
    gap: 9px;
  }

  .glass-button {
    padding: 0 7px;
    border-width: 1px;
    font-size: clamp(7px, 1.8vw, 12px);
    box-shadow:
      inset 0 0 8px oklch(97% 0.01 86 / 0.1),
      0 1px 3px oklch(20% 0.08 25 / 0.36);
  }

  .socials {
    bottom: calc(10.7% + env(safe-area-inset-bottom) * 0.15);
    gap: clamp(4px, 1vw, 8px);
  }

  .social-link {
    width: clamp(20px, 5.13vw, 32px);
    height: clamp(21px, 5.4vw, 33px);
  }

  .social-link--youtube {
    width: clamp(31px, 7.95vw, 46px);
  }

  .social-link svg {
    stroke-width: 2.1;
  }
}

/* Phones and small tablets in landscape use the wider artwork and compact controls. */
@media (max-height: 600px) and (min-aspect-ratio: 3/4) {
  :root {
    --button-width: clamp(110px, 15.7vw, 170px);
    --button-height: clamp(28px, 6.44vh, 44px);
  }

  .club-crest {
    width: clamp(150px, 29vh, 210px);
  }

  .tagline {
    font-size: clamp(30px, 5.8vh, 42px);
  }

  .actions {
    top: 66%;
    gap: clamp(10px, 2vw, 16px);
  }

  .glass-button {
    padding-inline: 10px;
    font-size: clamp(8px, 1.6vw, 12px);
  }

  .socials {
    bottom: calc(7% + env(safe-area-inset-bottom));
    gap: 5px;
  }

  .social-link {
    width: 20px;
    height: 21px;
  }

  .social-link--youtube {
    width: 31px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
