/* ============================================================
   THE FIFTH DATE — pages.css (subpages)
   ------------------------------------------------------------
   Shared header/footer reuse · page hero · application form ·
   thank-you · legal · 404
   ============================================================ */

/* ---------- Subpage hero band ---------- */
.page-head {
  padding: calc(var(--header-h) + clamp(40px, 6vw, 72px)) 0 clamp(36px, 5vw, 56px);
  background: var(--ink);
  position: relative;
  overflow: hidden;
}

.page-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 120% at 85% 0%, rgba(176, 141, 87, 0.18) 0%, transparent 60%),
    radial-gradient(60% 100% at 0% 110%, rgba(111, 42, 56, 0.3) 0%, transparent 60%);
  pointer-events: none;
}

.page-head > .container {
  position: relative;
  z-index: 1;
}

.page-head h1 {
  color: var(--paper);
  margin-top: 16px;
  max-width: 16ch;
}

.page-head p {
  margin-top: 16px;
  max-width: 620px;
  color: rgba(251, 247, 241, 0.78);
}

.page-head--light {
  background: var(--paper-2);
  border-bottom: 1px solid rgba(176, 141, 87, 0.3);
}

.page-head--light h1 {
  color: var(--ink);
}

.page-head--light p {
  color: var(--muted);
}

/* ---------- Application form ---------- */
.apply-wrap {
  max-width: 860px;
  margin-inline: auto;
}

.apply-card {
  border: 1px solid rgba(176, 141, 87, 0.42);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.apply-card__head {
  padding: 30px var(--gutter) 10px;
}

.apply-card__head h2 {
  font-size: 1.6rem;
}

.apply-card__head p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15.5px;
}

.apply-form {
  padding: 18px var(--gutter) var(--gutter);
}

.apply-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 22px;
}

.apply-form__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.apply-form__field--full {
  grid-column: 1 / -1;
}

.apply-form label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.apply-form label .req {
  color: var(--wine);
}

.apply-form .hint {
  font-size: 13px;
  color: var(--muted-light);
  margin-top: -2px;
}

.apply-form input[type="text"],
.apply-form input[type="email"],
.apply-form input[type="tel"],
.apply-form input[type="number"],
.apply-form select,
.apply-form textarea {
  width: 100%;
  border: 1.5px solid rgba(140, 111, 65, 0.4);
  border-radius: var(--radius-sm);
  background: var(--paper);
  padding: 13px 14px;
  font-size: 16px;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  appearance: none;
}

.apply-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238c6f41' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.apply-form textarea {
  min-height: 120px;
  resize: vertical;
}

.apply-form input:focus,
.apply-form select:focus,
.apply-form textarea:focus {
  outline: none;
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(111, 42, 56, 0.14);
  background: var(--white);
}

.apply-form input.is-invalid,
.apply-form select.is-invalid,
.apply-form textarea.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(163, 48, 47, 0.12);
}

.field-error {
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
}

.field-error.is-visible {
  display: block;
}

.apply-form .consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 26px;
  font-size: 14.5px;
  color: var(--muted);
}

.apply-form .consent input {
  flex: none;
  width: 19px;
  height: 19px;
  margin-top: 3px;
  accent-color: var(--wine);
}

.apply-form .consent a {
  color: var(--wine);
}

.apply-form .consent.is-invalid {
  color: var(--danger);
}

.apply-form__actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.apply-form__actions .btn {
  min-width: 220px;
}

.apply-form__actions .note {
  font-size: 13.5px;
  color: var(--muted);
}

.apply-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- Success state ---------- */
.apply-success {
  display: none;
  text-align: center;
  padding: clamp(36px, 6vw, 64px) var(--gutter);
}

.apply-success.is-visible {
  display: block;
}

.apply-success__mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brass);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 auto 24px;
}

.apply-success h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
}

.apply-success p {
  max-width: 52ch;
  margin: 14px auto 0;
  color: var(--muted);
}

.apply-success__steps {
  max-width: 460px;
  margin: 30px auto 0;
  text-align: left;
  display: grid;
  gap: 12px;
}

.apply-success__steps li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 15.5px;
  color: var(--text);
}

.apply-success__steps li::before {
  content: "";
  flex: none;
  width: 20px;
  height: 2px;
  align-self: center;
  background: var(--brass);
}

.apply-success__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.apply-error-banner {
  display: none;
  margin-top: 18px;
  padding: 14px 18px;
  border: 1.5px solid rgba(163, 48, 47, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(163, 48, 47, 0.07);
  color: var(--danger);
  font-size: 14.5px;
  font-weight: 600;
}

.apply-error-banner.is-visible {
  display: block;
}

/* ---------- Thank-you page ---------- */
.ty {
  text-align: center;
  padding-top: clamp(80px, 14vw, 160px);
  padding-bottom: clamp(60px, 10vw, 120px);
}

.ty__mark {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--brass);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 auto 28px;
}

.ty h1 {
  font-size: clamp(2.1rem, 5vw, 3.1rem);
}

.ty .lede {
  max-width: 560px;
  margin: 20px auto 0;
}

.ty__steps {
  max-width: 480px;
  margin: 34px auto 0;
  text-align: left;
  display: grid;
  gap: 14px;
}

.ty__steps li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  color: var(--muted);
}

.ty__steps li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 2px;
  align-self: center;
  background: var(--brass);
}

.ty__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

/* ---------- Legal & 404 ---------- */
.legal {
  max-width: 760px;
  margin-inline: auto;
}

.legal h2 {
  font-size: 1.5rem;
  margin: 38px 0 12px;
}

.legal h3 {
  font-size: 1.18rem;
  margin: 26px 0 10px;
}

.legal p,
.legal li {
  color: var(--muted);
  font-size: 15.5px;
  margin-bottom: 12px;
}

.legal ul {
  list-style: disc;
  padding-left: 22px;
}

.legal .legal-note {
  padding: 14px 18px;
  border: 1.5px dashed rgba(140, 111, 65, 0.5);
  border-radius: var(--radius-sm);
  background: rgba(176, 141, 87, 0.08);
  font-size: 14px;
}

.notfound {
  text-align: center;
  padding-top: clamp(90px, 15vw, 180px);
  padding-bottom: clamp(60px, 10vw, 120px);
}

.notfound h1 {
  font-size: clamp(4rem, 10vw, 7rem);
  color: var(--brass-3);
  line-height: 1;
}

.notfound p {
  max-width: 480px;
  margin: 18px auto 0;
  color: var(--muted);
}

.notfound .btn {
  margin-top: 30px;
}

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

  .apply-form__field--full {
    grid-column: auto;
  }

  .apply-form__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .apply-form__actions .btn {
    width: 100%;
  }

  .apply-form__actions .note {
    text-align: center;
  }

  .apply-success__ctas .btn {
    width: 100%;
  }

  .ty__ctas .btn {
    width: 100%;
  }
}