/* MVMHub beta landing page (mvmhub.app/beta): layout only.
 *
 * The MVMHub theme (colours, fonts, brand bar, footer) comes from
 * /assets/apps/mvmhub.css, which every MVMHub page loads. This file lays out
 * the hero, the form card, and the collapsible details.
 */

body.landing {
  --frame: 66rem;
  font-size: 1rem;
  line-height: 1.55;
}

.landing a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.landing a:hover {
  color: var(--fg-muted);
}

.beta {
  width: min(var(--frame), 100% - 2rem);
  margin-inline: auto;
}

/* Hero */

.beta-hero {
  display: grid;
  gap: var(--space-10);
  padding: var(--space-10) 0 var(--space-12);
  align-items: start;
}

/* Pitch and form sit side by side as one centred block. The frame (66rem)
   is what keeps the space between them in proportion on wide screens; the
   brand bar, details and footer share it, so their edges line up. */
@media (min-width: 60rem) {
  .beta-hero {
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 26rem);
    column-gap: clamp(3rem, 5vw, 5rem);
    padding-top: var(--space-16);
  }

  .beta-card {
    position: sticky;
    top: var(--space-6);
  }
}

.beta-eyebrow {
  display: inline-block;
  margin: 0 0 var(--space-4);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--hero-border);
  font-size: var(--text-label-size);
  font-weight: 600;
  letter-spacing: var(--text-label-tracking);
  text-transform: uppercase;
  color: var(--mvm-orange);
}

.beta-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-5);
  color: var(--fg);
}

.beta-lede {
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--fg-muted);
  margin: 0 0 var(--space-6);
  max-width: 34rem;
}

.beta-points {
  list-style: none;
  margin: 0 0 var(--space-10);
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.beta-points li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 500;
}

.beta-points li::before {
  content: "";
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background:
    var(--mvm-orange)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E")
    center / 0.875rem no-repeat;
}

/* The app, shown in a phone frame. Desktop only: on a phone it would push the
   form below the fold. */
.beta-phone {
  display: none;
  margin: 0;
}

@media (min-width: 60rem) {
  .beta-phone {
    display: block;
    width: 17rem;
    height: 25rem;
    overflow: hidden;
    border: 0.625rem solid #16100C;
    border-bottom: 0;
    border-radius: 2.75rem 2.75rem 0 0;
    background: #16100C;
    box-shadow: var(--shadow);
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
    mask-image: linear-gradient(to bottom, #000 70%, transparent);
  }

  .beta-phone img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2.125rem 2.125rem 0 0;
  }
}

/* Form card */

.beta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: var(--space-8);
  box-shadow: var(--shadow);
}

@media (max-width: 30rem) {
  .beta-card {
    padding: var(--space-6) var(--space-5);
  }
}

.beta-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-1);
}

.beta-card-sub {
  margin: 0 0 var(--space-6);
  color: var(--fg-muted);
}

.landing .form {
  margin: 0;
  gap: var(--space-5);
}

.form-row {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 26rem) {
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }
}

/* Sentence-case labels, as in the app, instead of page.css's uppercase ones. */
.landing .form-field > label:not(.form-choice),
.landing .form-field > legend {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
}

.landing .form input[type="email"],
.landing .form input[type="text"] {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 0.8125rem var(--space-4);
}

/* The state dropdown, drawn like the text fields. page.css has no select
   styles, and only this page has one. The chevron is two gradients, so it
   takes the theme's colour; the open list stays native and follows the
   system's light or dark mode. */
.landing .form select {
  width: 100%;
  font: inherit;
  color: var(--fg);
  color-scheme: light dark;
  appearance: none;
  border: 1px solid var(--border-strong);
  border-radius: 0.75rem;
  padding: 0.8125rem calc(var(--space-4) + 1.5rem) 0.8125rem var(--space-4);
  background-color: var(--surface);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%),
    linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%);
  background-position:
    calc(100% - var(--space-4) - 0.375rem) 52%,
    calc(100% - var(--space-4)) 52%;
  background-size: 0.375rem 0.375rem;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* "Choose…" reads as a placeholder until a state is picked. A required select
   is :invalid from the start, and Chrome would announce it as invalid before
   anyone had chosen, so the page sets aria-invalid="false", like the text
   fields, which errors reach through the status line instead. This keys on
   the empty option rather than on :invalid. */
.landing .form select:has(option[value=""]:checked) {
  color: var(--fg-muted);
}

.landing .form select option {
  color: CanvasText;
}

.landing .form input[type="email"]:focus-visible,
.landing .form input[type="text"]:focus-visible,
.landing .form select:focus-visible {
  border-color: var(--accent);
  outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent);
  outline-offset: 0;
}

.form-hint,
.form-note {
  margin: 0;
  font-size: var(--text-caption-size);
  color: var(--fg-muted);
}

.form-note {
  text-align: center;
}

/* iPhone / Android / Both, as a segmented control. The radios stay in the
   accessibility tree and keyboard order; only their circles are hidden. */
.choice-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.choice span {
  display: block;
  text-align: center;
  padding: 0.6875rem var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: 0.75rem;
  font-weight: 600;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}

.choice input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.choice input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.form-checks {
  display: grid;
  gap: var(--space-3);
}

.landing .form-choice {
  font-size: 0.9375rem;
  line-height: 1.45;
}

.landing .form-choice input {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125em;
}

/* 19px bold counts as large text, so white on MVM orange (3.4:1) meets WCAG AA. */
.landing .form-submit {
  justify-self: stretch;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  padding: 0.9375rem var(--space-6);
  border-radius: 999px;
  color: var(--accent-fg);
  background: var(--accent);
  transition: filter 120ms;
}

.landing .form-submit:hover:not(:disabled) {
  filter: brightness(0.95);
}

.landing .form-status {
  margin: 0;
  font-weight: 600;
  color: var(--fg);
}

.landing .form-status[data-kind="error"] {
  color: var(--danger);
}

.landing .form.is-sent .form-status {
  padding: var(--space-4);
  border-radius: 0.75rem;
  background: var(--surface-sunk);
}

/* Collapsible details */

.beta-details {
  padding: var(--space-4) 0 var(--space-16);
  max-width: 48rem;
}

.beta-details-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0 0 var(--space-5);
}

.beta-details details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  margin-bottom: var(--space-3);
}

.beta-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  font-weight: 600;
  border-radius: 1rem;
}

.beta-details summary::-webkit-details-marker {
  display: none;
}

.beta-details summary::after {
  content: "";
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  border-right: 2px solid var(--fg-muted);
  border-bottom: 2px solid var(--fg-muted);
  transform: translateY(-25%) rotate(45deg);
  transition: transform 150ms;
}

.beta-details details[open] summary::after {
  transform: translateY(25%) rotate(-135deg);
}

.beta-details summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.beta-details details > :not(summary) {
  margin: 0 var(--space-5) var(--space-4);
  color: var(--fg);
}

.beta-details details > ul {
  padding-left: var(--space-5);
}

.beta-details li {
  margin-bottom: var(--space-2);
}

.beta-details details > p {
  margin-top: 0;
}
