/* ==========================================================================
   Contact Us page (V2). Requires tokens.css, site-nav.css, home-hero.css,
   program-hero.css, home-sections.css and program-sections.css.
   Form logic lives in js/forms.js and looks fields up by id only.
   The form + info panel (.tp-contact, .tp-field) is also used by
   hire-from-us.html.
   ========================================================================== */

/* ---------- Hero: short, plus a row of ways to reach us ---------- */
.tp-hero--contact { padding-bottom: clamp(48px, 3vw + 32px, 80px); }
.tp-hero--contact .tp-hero__title { max-width: 820px; }

.tp-reach {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1120px;
  margin: var(--space-6) auto 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .6);
  overflow: hidden;
  animation: tp-rise 700ms var(--ease-out) 340ms both;
}
.tp-reach li + li { border-left: 1px solid var(--color-border); }
.tp-reach__item {
  display: flex;
  align-items: center;
  gap: var(--space-1-5);
  height: 100%;
  padding: 20px var(--space-3);
  text-align: left;
  color: inherit;
  transition: background-color 600ms var(--ease-out);
}
.tp-reach__item:hover { background: var(--color-surface-hover); }
.tp-reach__ico {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(243, 189, 0, .12);
  color: var(--color-accent);
}
.tp-reach__ico .tp-ico { width: 20px; height: 20px; }
.tp-reach__body { display: grid; gap: 2px; min-width: 0; }
.tp-reach__name { font-size: var(--text-body); font-weight: var(--weight-bold); line-height: 1.3; color: var(--color-heading); }
.tp-reach__tag {
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

/* ---------- Enquiry: form panel + dark info panel ---------- */
/* Section heads: title left, intro right (same as the homepage). Hire page reuses it. */
.tp-contact__head,
.tp-hroles__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
}
.tp-contact__head .tp-section__lead,
.tp-hroles__head .tp-section__lead { margin: 0; }
.tp-contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-3);
  align-items: stretch;
}
.tp-contact__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: 0 12px 32px -20px rgba(13, 15, 20, .18);
}

.tp-contact__form { display: grid; gap: 20px; margin: 0; }
.tp-contact__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.tp-field { display: grid; gap: 6px; min-width: 0; }
.tp-contact .tp-field__label {
  font-size: var(--text-ui);
  line-height: var(--leading-ui);
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
}
.tp-contact .tp-field__input {
  display: block;
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 var(--space-2);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.4;
  box-shadow: none;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.tp-contact .tp-field__input::placeholder { color: var(--color-text-muted); opacity: 1; }
.tp-contact .tp-field__input:hover { border-color: var(--color-heading); }
.tp-contact .tp-field__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(243, 189, 0, .25);
}
.tp-contact .tp-field__select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c636a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}
.tp-contact .tp-field__textarea { height: auto; min-height: 120px; padding: 14px var(--space-2); resize: vertical; }

.tp-field__phone { display: flex; }
.tp-field__code {
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 1px solid var(--color-border-strong);
  border-right: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: var(--color-bg-alt);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
}
.tp-contact .tp-field__phone .tp-field__input { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

.tp-contact .tp-field__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--text-body-sm);
  line-height: var(--leading-body-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
}
.tp-contact .tp-field__check input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}
.tp-contact .tp-field__check span { color: inherit; font-weight: var(--weight-regular); }
.tp-contact .tp-field__check a { color: var(--color-heading); font-weight: var(--weight-semibold); text-decoration: underline; text-underline-offset: 3px; }

.tp-field__error {
  display: none;
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  color: var(--color-error);
}

.tp-contact__consent {
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  color: var(--color-text-muted);
}
.tp-contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.tp-contact__or {
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-text-muted);
}
.tp-contact__wa img { width: 20px; height: 20px; }
.tp-contact .tp-btn:disabled { opacity: .6; cursor: progress; }

/* OTP state */
.tp-contact__otp { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-4) 0; text-align: center; }
.tp-contact__otp-title {
  margin: 0;
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  font-weight: var(--weight-bold);
  color: var(--color-heading);
}
.tp-contact__otp-title em { font-style: normal; color: var(--color-accent); }
.tp-contact__otp-sub { max-width: 420px; font-size: var(--text-body); color: var(--color-text-secondary); }
.tp-contact__otp-sub strong { color: var(--color-heading); }
.tp-contact__otp-inputs { display: flex; gap: var(--space-1-5); margin-top: var(--space-1); }
.tp-contact .contact-otp-input {
  width: 56px;
  height: 60px;
  margin: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-heading);
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: var(--weight-bold);
  text-align: center;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.tp-contact .contact-otp-input:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(243, 189, 0, .25); }
.tp-contact .contact-otp-input.error { border-color: var(--color-error); }
.tp-contact__verify { margin-top: var(--space-1); }
.tp-contact__resend { font-size: var(--text-body-sm); color: var(--color-text-secondary); }
.tp-contact__resend a { font-weight: var(--weight-semibold); color: var(--color-accent-text); text-decoration: underline; text-underline-offset: 3px; }
.tp-contact__resend a[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* Info panel (dark) */
.tp-contact__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--color-bg);
  color: var(--color-text);
}
.tp-contact__info-title {
  margin: 0;
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  font-weight: var(--weight-bold);
  color: var(--color-heading);
}
.tp-contact__list { display: grid; gap: 20px; }
.tp-contact__list li { display: flex; align-items: flex-start; gap: var(--space-1-5); }
.tp-contact__list-ico {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(243, 189, 0, .12);
  color: var(--color-accent);
}
.tp-contact__list-ico .tp-ico { width: 20px; height: 20px; }
.tp-contact__list-label {
  display: block;
  margin-bottom: 2px;
  font-size: var(--text-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
}
.tp-contact__list address,
.tp-contact__list p,
.tp-contact__list a {
  margin: 0;
  font-style: normal;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-heading);
}
.tp-contact__list a { text-decoration: none; transition: color 600ms var(--ease-out); }
.tp-contact__list a:hover { color: var(--color-accent); }

.tp-contact__next { padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
.tp-contact__next-title {
  margin-bottom: var(--space-2);
  font-size: var(--text-h4);
  line-height: var(--leading-h4);
  font-weight: var(--weight-bold);
  color: var(--color-heading);
}
.tp-contact__steps { display: grid; gap: var(--space-1-5); margin: 0; padding: 0; list-style: none; }
.tp-contact__steps li { display: flex; align-items: flex-start; gap: var(--space-1-5); font-size: var(--text-body-sm); line-height: var(--leading-body-sm); }
.tp-contact__steps span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-round);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-size: var(--text-caption);
  font-weight: var(--weight-bold);
}

.tp-contact__social { display: flex; gap: var(--space-1); margin-top: auto; }
.tp-contact__social a {
  display: grid;
  place-items: center;
  width: var(--touch);
  height: var(--touch);
  border: 1px solid var(--color-border-control);
  border-radius: var(--radius-md);
  color: var(--color-heading);
  transition: border-color 600ms var(--ease-out), color 600ms var(--ease-out);
}
.tp-contact__social a:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ---------- Visit: map ---------- */
.tp-visit__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.tp-visit__head .tp-section__lead { max-width: 560px; }
.tp-visit__map {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-bg-alt);
}
.tp-visit__map iframe { display: block; width: 100%; height: 440px; border: 0; }

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  .tp-reach { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-reach li:nth-child(3) { border-left: 0; }
  .tp-reach li:nth-child(n + 3) { border-top: 1px solid var(--color-border); }
  .tp-contact__grid { grid-template-columns: 1fr; }
  .tp-contact__head,
  .tp-hroles__head { grid-template-columns: 1fr; gap: var(--space-3); }
}

/* ---------- Phone ---------- */
@media (max-width: 767px) {
  .tp-reach { grid-template-columns: 1fr; }
  .tp-reach li + li { border-left: 0; border-top: 1px solid var(--color-border); }
  .tp-reach__item { padding: var(--space-2); }
  .tp-contact__panel,
  .tp-contact__info { padding: var(--space-3) var(--space-2); }
  .tp-contact__row { grid-template-columns: 1fr; }
  .tp-contact__actions { flex-direction: column; align-items: stretch; }
  .tp-contact__or { text-align: center; }
  .tp-contact__actions .tp-btn { width: 100%; }
  .tp-contact .contact-otp-input { width: 52px; height: 56px; }
  .tp-visit__head .tp-btn { width: 100%; }
  .tp-visit__map iframe { height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  .tp-reach { animation: none; }
}
