/* =========================================================
   Premium editorial design system for contact.html.
   Built on top of css/common.css tokens and base styles.
   ========================================================= */

/* ---------- Split-screen hero (image gets its own panel, no overlay) ---------- */
.split-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
}

.split-hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--red), var(--gold));
}

.split-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.split-hero-copy {
  position: relative;
  z-index: 2;
  padding: calc(var(--header-height) + 34px) 24px 44px;
  color: var(--white);
  background:
    linear-gradient(125deg, rgba(2, 8, 18, 0.88) 0%, rgba(6, 26, 64, 0.82) 55%, rgba(6, 26, 64, 0.7) 100%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.032) 0 1px, transparent 1px 76px),
    linear-gradient(25deg, rgba(229, 199, 119, 0.06) 0 1px, transparent 1px 92px),
    radial-gradient(circle at 20% 12%, rgba(229, 199, 119, 0.17), transparent 20rem),
    radial-gradient(circle at 88% 92%, rgba(179, 25, 66, 0.12), transparent 18rem),
    url("../assets/images/about-amman-bg.jpg?v=2");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.split-hero-copy-inner {
  max-width: 520px;
}

.split-hero h1 {
  max-width: 100%;
  margin-top: 14px;
  color: var(--white);
  font-size: clamp(2.1rem, 4.4vw, 3rem);
  line-height: 1.08;
}

.split-hero .hero-subtitle {
  max-width: 460px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.02rem;
  line-height: 1.65;
}

.split-hero-media {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  background: var(--navy-deep);
}

.split-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

.split-hero-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(2, 8, 18, 0.55));
}

/* Compact modifier: no hero-actions/contact-panel content, the form section
   right below now owns the primary action, so the hero can stay short. */
.split-hero--compact .split-hero-media {
  min-height: 180px;
}

/* ---------- Section rhythm ---------- */
.alt-section {
  position: relative;
  background: linear-gradient(180deg, var(--ivory), rgba(255, 250, 240, 0.9)), var(--ivory);
}

.pattern-section {
  position: relative;
  background-image:
    linear-gradient(180deg, rgba(247, 242, 231, 0.4), rgba(247, 242, 231, 0.5)),
    url("../assets/images/courses-pattern-bg.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.navy-section {
  position: relative;
  color: var(--white);
  background:
    radial-gradient(circle at 82% 12%, rgba(229, 199, 119, 0.14), transparent 21rem),
    linear-gradient(120deg, var(--navy-deep) 0%, var(--navy) 62%, var(--navy) 100%);
}

.navy-section::before,
.alt-section::before,
.pattern-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--red), var(--gold));
}

.navy-section .section-kicker {
  color: var(--gold-light);
}

.navy-section .section-header h2,
.navy-section .section-header p {
  color: var(--white);
}

.navy-section .section-header p {
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- Contact form (two-column: context + form) ---------- */
#inquiry-form {
  scroll-margin-top: calc(var(--header-height) + 26px);
}

.form-layout {
  display: grid;
  gap: 30px;
}

.form-context {
  display: grid;
  gap: 18px;
  align-content: start;
}

.form-context h2 {
  max-width: 420px;
}

.form-context p {
  max-width: 400px;
}

.form-reassure {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.form-reassure div {
  position: relative;
  padding-left: 20px;
}

.form-reassure div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--red));
}

.form-reassure strong {
  display: block;
  color: var(--navy);
  font-size: 0.92rem;
}

.form-reassure span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.form-shell {
  position: relative;
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(6, 26, 64, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.form-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--red), var(--gold));
}

.form-grid {
  display: grid;
  gap: 18px;
  margin-top: 6px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field.span-2 {
  grid-column: span 1;
}

.form-field label {
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(6, 26, 64, 0.18);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.96rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.form-field textarea {
  min-height: 130px;
  padding: 14px 16px;
  line-height: 1.55;
  resize: vertical;
}

.form-field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 22px) center, calc(100% - 16px) center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover {
  border-color: rgba(6, 26, 64, 0.3);
}

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(229, 199, 119, 0.24);
}

.contact-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-radio {
  position: relative;
}

.contact-radio input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.contact-radio label {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(6, 26, 64, 0.16);
  border-radius: 999px;
  color: var(--navy);
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.contact-radio input:checked + label {
  color: var(--white);
  border-color: rgba(229, 199, 119, 0.55);
  background: linear-gradient(135deg, var(--navy), var(--red));
  box-shadow: 0 10px 22px rgba(6, 26, 64, 0.22);
}

.contact-radio input:focus-visible + label {
  outline: 3px solid rgba(229, 199, 119, 0.86);
  outline-offset: 2px;
}

.form-submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.form-submit-row .btn {
  width: 100%;
}

.form-submit-row .btn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-note {
  position: relative;
  margin-top: 18px;
  padding: 4px 0 4px 16px;
  border-left: 3px solid rgba(183, 138, 45, 0.4);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.form-note a {
  color: var(--red);
  font-weight: 800;
}

.form-status {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(183, 138, 45, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(229, 199, 119, 0.12);
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-error {
  border-color: rgba(179, 25, 66, 0.4);
  background: rgba(179, 25, 66, 0.08);
  color: var(--red-deep);
}

.form-status.is-success {
  border-color: rgba(15, 122, 88, 0.4);
  background: rgba(15, 122, 88, 0.08);
  color: #0f4a3a;
}

/* ---------- Required/optional markers and inline errors ---------- */
.form-required {
  color: var(--red);
}

.form-optional {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: none;
  letter-spacing: 0;
}

.form-error {
  display: block;
  min-height: 0;
  color: var(--red-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.form-error:empty {
  display: none;
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(179, 25, 66, 0.15);
}

.form-field--consent {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

/* ---------- Submission confirmation ---------- */
.contact-success-main {
  min-height: clamp(580px, 72vh, 780px);
  display: grid;
  place-items: center;
  padding: clamp(72px, 9vw, 124px) 0;
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(6, 26, 64, 0.98), rgba(3, 13, 34, 0.94)),
    url("../assets/images/contact-hero.jpg") center / cover no-repeat;
}

.contact-success-panel {
  width: min(760px, 100%);
  padding: clamp(34px, 5vw, 64px);
  border: 1px solid rgba(229, 199, 119, 0.42);
  background: rgba(3, 13, 34, 0.82);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.contact-success-panel .section-kicker {
  color: var(--gold-light);
}

.contact-success-panel h1 {
  max-width: 680px;
  margin: 18px auto 20px;
  color: var(--ivory);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.02;
}

.contact-success-panel p {
  max-width: 620px;
  margin: 0 auto;
  color: rgba(255, 250, 240, 0.82);
  font-size: 1.05rem;
  line-height: 1.75;
}

.contact-success-actions {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

@media (max-width: 767px) {
  .contact-success-main {
    min-height: calc(100vh - 74px);
    padding: 56px 0;
    background-position: 62% center;
  }

  .contact-success-panel {
    padding: 36px 22px;
  }

  .contact-success-panel h1 {
    font-size: clamp(2.2rem, 12vw, 3.3rem);
  }

  .contact-success-actions,
  .contact-success-actions .btn {
    width: 100%;
  }
}

.form-field--consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin-top: 2px;
  accent-color: var(--navy);
}

.form-field--consent label {
  flex: 1 1 260px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--muted-strong);
}

.form-field--consent .form-error {
  flex-basis: 100%;
}

/* ---------- Direct contact details ---------- */
.contact-details {
  display: grid;
  gap: 24px;
}

.contact-details-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
}

.contact-details-grid div {
  display: grid;
  gap: 4px;
}

.contact-details-grid span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-details-grid a {
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
}

.contact-details-grid a:hover,
.contact-details-grid a:focus-visible {
  color: var(--white);
}

/* ---------- Response timeline ("What Happens Next") ---------- */
.feature-split {
  display: grid;
  gap: 34px;
  align-items: center;
}

.feature-copy .section-kicker {
  margin-bottom: 2px;
}

.feature-copy h2 {
  max-width: 460px;
}

.feature-copy p {
  max-width: 460px;
  margin-top: 14px;
}

.feature-media {
  position: relative;
  min-height: 220px;
}

.feature-media-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-media::before {
  content: "";
  position: absolute;
  inset: 18px 18px -18px -18px;
  z-index: -1;
  border: 1px solid rgba(183, 138, 45, 0.4);
  border-radius: var(--radius);
}

.response-timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin-top: 22px;
  padding-left: 26px;
}

.response-timeline::before {
  content: "";
  position: absolute;
  inset: 6px auto 6px 5px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(183, 138, 45, 0.15));
}

.response-stage {
  position: relative;
  padding: 0 0 24px 22px;
}

.response-stage:last-child {
  padding-bottom: 0;
}

.response-stage::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--gold);
}

.response-stage strong {
  display: block;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.04rem;
  line-height: 1.3;
}

.response-stage p {
  max-width: 420px;
  margin-top: 5px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (min-width: 700px) {
  .split-hero-copy {
    padding-left: 24px;
  }

  .form-submit-row .btn {
    width: auto;
  }

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

  .form-field.span-2 {
    grid-column: span 2;
  }
}

@media (min-width: 980px) {
  .split-hero-grid {
    grid-template-columns: minmax(460px, 0.86fr) minmax(0, 1.14fr);
    min-height: 620px;
  }

  .split-hero--compact .split-hero-grid {
    min-height: 380px;
  }

  .split-hero-copy {
    display: flex;
    align-items: center;
    padding: calc(var(--header-height) + 20px) clamp(40px, 4.5vw, 76px) 40px max(32px, calc((100vw - var(--container)) / 2 + 32px));
  }

  .split-hero-media {
    min-height: 620px;
  }

  .split-hero--compact .split-hero-media {
    min-height: 380px;
  }

  .form-layout {
    grid-template-columns: minmax(280px, 0.6fr) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }

  .form-context {
    position: sticky;
    top: calc(var(--header-height) + 30px);
  }

  .feature-split {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    gap: 64px;
  }
}

@media (max-width: 979px) {
  .feature-media::before {
    display: none;
  }
}

@media (max-width: 699px) {
  .split-hero-copy {
    padding-top: calc(var(--header-height) + 24px);
    padding-bottom: 34px;
  }

  .split-hero h1 {
    font-size: clamp(1.72rem, 7vw, 2.1rem);
  }

  .split-hero .hero-subtitle {
    font-size: 0.96rem;
  }

  .split-hero-media {
    min-height: 160px;
  }

  .section {
    padding: 48px 0;
  }

  .form-shell {
    padding: 18px;
  }

  .form-context {
    text-align: left;
  }

  .feature-split {
    gap: 22px;
  }

  .feature-media-frame {
    aspect-ratio: 16 / 10;
  }

  .response-timeline {
    padding-left: 22px;
    margin-top: 18px;
  }

  .response-stage {
    padding-bottom: 20px;
    padding-left: 18px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 40px 0;
  }

  .breadcrumb,
  .eyebrow {
    font-size: 0.66rem;
  }

  .form-shell {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .form-submit-row .btn {
    transition: none;
  }
}
