/* =========================================================
   PRAVA — Contact + waitlist
   Depends on css/styles.css for tokens, shell and buttons.
   1. Form fields
   2. Contact layout + aside
   3. Waitlist hero
   4. What happens next
   5. Responsive
   ========================================================= */

/* ---------- 1. Form fields ---------- */
.formwrap {
  position: relative;
  padding: 0 var(--pad) clamp(64px, 10vh, 120px);
}

.form {
  display: grid;
  gap: clamp(16px, 2.2vh, 24px);
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
}

.field {
  display: grid;
  gap: 9px;
  margin: 0;
  position: relative;
}

.field__label {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-mid);
}

.field__label span {
  color: var(--text-faint);
}

.field__input {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.field__input::placeholder {
  color: var(--text-faint);
}

.field__input:hover {
  border-color: var(--line-strong);
}

.field__input:focus {
  outline: none;
  border-color: var(--text);
  background: var(--bg-elev);
}

/* On white, the ambient hairline is the only thing marking an input's edge
   and it falls under the 3:1 contrast floor for control boundaries. */
:root[data-theme="light"] .field__input {
  border-color: rgba(10, 10, 12, .45);
}

:root[data-theme="light"] .field__input:hover {
  border-color: rgba(10, 10, 12, .62);
}

.field__input--area {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.6;
}

/* a field only shows as invalid once it has been interacted with */
.form.is-checked .field__input:invalid {
  border-color: color-mix(in srgb, var(--text) 45%, transparent);
}

.field--select .field__input {
  padding-right: 42px;
  cursor: pointer;
  text-overflow: ellipsis;
}

.field__caret {
  position: absolute;
  right: 16px;
  bottom: 18px;
  color: var(--text-dim);
  pointer-events: none;
}

.field--check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-top: 4px;
}

.field__check {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--text);
  cursor: pointer;
  flex: none;
}

.field--check label {
  font-size: .86rem;
  line-height: 1.55;
  color: var(--text-mid);
  cursor: pointer;
}

.form__foot {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  flex-wrap: wrap;
  margin-top: clamp(8px, 1.4vh, 16px);
}

.form__status {
  font-size: .86rem;
  color: var(--text-mid);
  min-height: 1.3em;
}

.form__status.is-bad {
  color: var(--text);
}

.form__status.is-good {
  color: var(--text);
}

.form__status a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.form__status a:hover {
  opacity: .75;
}

/* ---------- 2. Contact layout ---------- */
.formwrap__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: start;
}

.aside {
  display: grid;
  gap: clamp(18px, 2.6vh, 28px);
}

.aside__block {
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, var(--surface), var(--bg-elev) 92%);
  transition: border-color .5s var(--ease);
}

.aside__block:hover {
  border-color: var(--line);
}

.aside__block--urgent {
  border-color: var(--line-strong);
}

.aside__label {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.aside__link {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: .92rem;
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: opacity .3s var(--ease);
}

.aside__link:hover {
  opacity: .62;
}

.aside__note {
  margin-top: 14px;
  font-size: .86rem;
  line-height: 1.6;
  color: var(--text-mid);
}

.aside__note strong {
  color: var(--text);
  font-weight: 600;
}

.aside__block .btn {
  margin-top: 16px;
}

/* ---------- 3. Waitlist hero ---------- */
.hero2 {
  position: relative;
  padding: calc(var(--nav-h) + clamp(52px, 10vh, 116px)) var(--pad) clamp(56px, 9vh, 104px);
}

.hero2__inner {
  position: relative;
  z-index: 1;
  max-width: 60ch;
  margin-inline: auto;
  text-align: center;
}

.hero2__title {
  margin: 18px 0 clamp(24px, 3.2vh, 38px);
  font-size: clamp(2.1rem, 5vw, 3.9rem);
  letter-spacing: -.045em;
}

.hero2__lede {
  color: var(--text-mid);
  font-size: clamp(1rem, .5vw + .9rem, 1.14rem);
  max-width: 50ch;
  margin-inline: auto;
}

/* the form itself reads left-aligned even inside a centred column */
.form--compact {
  margin-top: clamp(34px, 5vh, 56px);
  text-align: left;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, var(--surface), var(--bg-elev) 92%);
}

.form--compact .form__foot {
  justify-content: space-between;
}

/* ---------- 4. What happens next ---------- */
.next {
  position: relative;
  padding: clamp(56px, 9vh, 104px) var(--pad);
  border-top: 1px solid var(--line-soft);
  background: var(--bg-elev);
}

.next__head,
.next__list,
.next__note {
  position: relative;
  z-index: 1;
}

.next__head {
  max-width: 52ch;
}

.next__title {
  margin-top: 18px;
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  letter-spacing: -.04em;
}

.next__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(38px, 6vh, 68px);
  background: var(--line-soft);
  border-block: 1px solid var(--line-soft);
}

.step2 {
  background: var(--bg-elev);
  padding: clamp(24px, 3vw, 40px) clamp(20px, 2.4vw, 36px) clamp(30px, 4vw, 48px);
  transition: background-color .5s var(--ease);
}

.step2:hover {
  background: var(--surface);
}

.step2__num {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .18em;
  color: var(--text-faint);
}

.step2__title {
  margin: 18px 0 12px;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  letter-spacing: -.03em;
}

.step2__body {
  font-size: .9rem;
  line-height: 1.65;
  color: var(--text-mid);
  max-width: 34ch;
}

.next__note {
  margin-top: clamp(28px, 4vh, 44px);
  font-size: .92rem;
  color: var(--text-mid);
}

.next__note a {
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  transition: opacity .3s var(--ease);
}

.next__note a:hover {
  opacity: .62;
}

/* ---------- 5. Responsive ---------- */
@media (max-width: 1080px) {
  .formwrap__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .next__list {
    grid-template-columns: minmax(0, 1fr);
    background: transparent;
    gap: 0;
    border-block: 0;
  }

  .step2 {
    border-top: 1px solid var(--line-soft);
    padding-inline: 0;
  }

  .step2__body {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .form__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .aside {
    grid-template-columns: minmax(0, 1fr);
  }

  .form--compact {
    padding: clamp(18px, 4vw, 26px);
  }

  .form__foot .btn {
    width: 100%;
    justify-content: center;
  }
}
