/* ============================================================
   00-heroform — single-page appointment form that lives INSIDE
   the hero on the home page and every service / condition page.
   Root: .sec-00-heroform. Also owns the two-column hero grids
   (.sec-00-inthero__grid for interior heroes; the home hero's
   existing .sec-02-hero__inner grid hosts it in the right column).
   Layout: copy left, form right (>=900px interior, >=1024px home);
   stacked below that, form still inside the hero.
   ============================================================ */

/* --- Interior hero two-column grid --- */
.sec-00-inthero .sec-00-inthero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: clamp(2rem, 5vw, 2.75rem);
  align-items: center;
}
.sec-00-inthero .sec-00-inthero__copy { min-width: 0; }

@media (min-width: 900px) {
  .sec-00-inthero .sec-00-inthero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 390px);
    column-gap: clamp(2rem, 4vw, 4rem);
  }
  /* Headline sized for the narrower copy column */
  .sec-00-inthero .sec-00-inthero__grid h1 {
    font-size: clamp(2.2rem, 1.1rem + 2.9vw, 3.9rem);
  }
}

/* --- Home hero: form takes the right column of the existing grid --- */
.sec-02-hero .sec-00-heroform {
  margin-top: clamp(2rem, 5vw, 2.75rem);
}
@media (min-width: 1024px) {
  .sec-02-hero .sec-00-heroform {
    margin-top: 0;
    justify-self: end;
  }
}

/* --- Form card --- */
.sec-00-heroform {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 390px;
  color: var(--text-on-ink);
}

/* Stacked layouts (tablet / mobile): give the card more room but keep it readable */
@media (max-width: 899px) {
  .sec-00-heroform { max-width: 560px; }
}
@media (min-width: 900px) and (max-width: 1023px) {
  .sec-02-hero .sec-00-heroform { max-width: 560px; }
}

.sec-00-heroform__panel {
  background: linear-gradient(160deg, hsl(358 28% 13% / 0.94), hsl(358 30% 8% / 0.94));
  border: 1px solid hsl(0 0% 100% / 0.1);
  border-radius: var(--radius-card);
  padding: clamp(1.25rem, 2.4vw, 1.6rem);
  box-shadow: var(--shadow-lift), 0 0 0 1px hsl(var(--accent-h) 70% 55% / 0.08) inset, 0 0 60px hsl(var(--accent-h) 70% 40% / 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sec-00-heroform__head { margin-bottom: 1rem; }

.sec-00-heroform__title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.4rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  margin: 0;
}

.sec-00-heroform__lead {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-on-ink-dim);
}

.sec-00-heroform__hp { position: absolute; left: -9999px; }

.sec-00-heroform__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 0.7rem;
  row-gap: 0.2rem;
}
.sec-00-heroform__field { min-width: 0; }
.sec-00-heroform__field--full { grid-column: 1 / -1; }

/* Mobile: every field stacks vertically */
@media (max-width: 520px) {
  .sec-00-heroform__grid { grid-template-columns: minmax(0, 1fr); }
}

.sec-00-heroform__label {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--white);
}
.sec-00-heroform__req { color: hsl(var(--accent-h) 70% 65%); }

.sec-00-heroform__input {
  width: 100%;
  background: hsl(0 0% 100% / 0.05);
  border: 1.5px solid hsl(0 0% 100% / 0.16);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 200ms var(--ease-out), background 200ms var(--ease-out);
}
/* 16px inputs on phones so iOS does not zoom the page on focus */
@media (max-width: 767px) {
  .sec-00-heroform__input { font-size: 1rem; }
}
.sec-00-heroform__input::placeholder { color: hsl(358 15% 62%); }
.sec-00-heroform__input:focus {
  border-color: var(--accent);
  background: hsl(0 0% 100% / 0.08);
}
.sec-00-heroform__input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.sec-00-heroform__input.is-invalid { border-color: #ff7b6b; }
.sec-00-heroform__input--textarea {
  resize: vertical;
  min-height: 3.6rem;
}

.sec-00-heroform__error {
  min-height: 1rem;
  margin-top: 0.2rem;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.3;
  color: #ff7b6b;
}
.sec-00-heroform__error:empty { min-height: 0.45rem; }

.sec-00-heroform__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.35rem 0 1rem;
  font-size: 0.7rem;
  line-height: 1.45;
  color: var(--text-on-ink-dim);
  cursor: pointer;
}
/* A2P consent checkbox: name="sms-consent" must never be removed (launch check) */
.sec-00-heroform__consent-box {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.sec-00-heroform__submit {
  width: 100%;
  padding: 0.8rem 1.25rem;
  font-size: 0.95rem;
}
.sec-00-heroform__submit:disabled { opacity: 0.75; cursor: progress; }

.sec-00-heroform__send-error {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ff7b6b;
}
.sec-00-heroform__send-error a { color: var(--white); }
.sec-00-heroform__send-error[hidden] { display: none; }

/* --- Success state --- */
.sec-00-heroform__success {
  text-align: center;
  padding: 1rem 0 0.5rem;
}
.sec-00-heroform__success[hidden] { display: none; }
.sec-00-heroform__check {
  color: var(--accent);
  margin: 0 auto 0.85rem;
}
.sec-00-heroform__success-heading {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.4rem;
}
.sec-00-heroform__success-heading:focus { outline: none; }
.sec-00-heroform__success-text {
  font-size: 0.88rem;
  color: var(--text-on-ink-dim);
}
.sec-00-heroform__success-text a {
  color: var(--white);
  font-weight: 600;
  white-space: nowrap;
}
