/* Contact page. Layout and states only — all content comes from contact-data.js. */

.contact-page {
  --header-h: 65px;            /* replaced at runtime with the measured header height */
  --ink: #17181d;
  --soft: rgba(23, 24, 29, 0.7);
  --line: rgba(23, 24, 29, 0.14);
  --field: rgba(23, 24, 29, 0.22);
  --error: #b3261e;
  /* Warm sand palette: change these to retint the whole page. */
  --bg-top: #faf6f0;                     /* warm off-white */
  --bg-bottom: #eee2d0;                  /* warm sand */
  --accent: #9c4a30;                     /* terracotta: WhatsApp card, online dot, steps line + markers */
  --online: var(--accent);
  --radius: 18px;              /* site radius (buttons, cards) */
  /* Off-white behind the header strip; sand below the page content. */
  background: linear-gradient(var(--bg-top) 0 var(--header-h), var(--bg-bottom) var(--header-h));
  color: var(--ink);
  overflow-x: clip;
}

/* Light header on the sand palette. */
.contact-page #site-header {
  background: rgba(250, 246, 240, 0.72);
  border-bottom-color: var(--line);
}
.contact-page .navbar { max-width: 1280px; }
.contact-page nav.links a { color: rgba(23, 24, 29, 0.72); }
.contact-page nav.links a:hover { color: var(--ink); }

/* Warm off-white at the top, deepening to sand down the length of the page. */
.ct-main {
  background: linear-gradient(to bottom, var(--bg-top) 0%, #f5eee4 40%, var(--bg-bottom) 100%);
}

.ct-wrap {
  width: min(1320px, calc(100% - 56px));
  margin: 0 auto;
}

.ct-section { padding: clamp(56px, 8vw, 120px) 0; }

.ct-h2 {
  margin: 0 0 clamp(28px, 3.5vw, 48px);
  font: 700 clamp(2.2rem, 4.4vw, 4rem)/1 'Space Grotesk', sans-serif;
  letter-spacing: -0.05em;
}

.ct-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- 0 · Top band (copied from the About page) ---------- */

.ab-band {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 40px;
  padding: 0 16px;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.ab-mark {
  font: 700 22px/1 'Space Grotesk', sans-serif;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.ab-band-text {
  font: 500 12px/1 'Space Grotesk', sans-serif;
  letter-spacing: 0.06em;
  color: var(--soft);
}

.ab-band-text[lang="ar"] {
  font: 500 13px/1 'Noto Sans Arabic', 'Space Grotesk', sans-serif;
  letter-spacing: 0;
}

.ab-divider {
  width: 1px;
  height: 16px;
  background: var(--accent);
  opacity: 0.45;
}

.ab-band.is-compact .ab-band-text,
.ab-band.is-compact .ab-divider { display: none; }

/* ---------- 1 · Heading ---------- */

.ct-heading { padding: clamp(56px, 8vw, 120px) 0 clamp(32px, 4vw, 56px); }

.ct-title {
  margin: 0;
  font: 700 clamp(3rem, 8vw, 7.5rem)/0.92 'Space Grotesk', sans-serif;
  letter-spacing: -0.055em;
}

.ct-intro {
  margin: clamp(16px, 2vw, 24px) 0 0;
  font: 400 clamp(1.05rem, 1.4vw, 1.3rem)/1.5 'Space Grotesk', sans-serif;
  color: var(--soft);
}

.ct-response {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  font: 500 13px/1 'Space Grotesk', sans-serif;
  letter-spacing: 0.04em;
  color: var(--soft);
}

.ct-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online);
}

/* Soft "online" pulse: an expanding, fading ring (transform + opacity). */
.ct-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--online);
  animation: ctPulse 2.2s ease-out infinite;
}

@keyframes ctPulse {
  0% { transform: scale(1); opacity: 0.55; }
  80%, 100% { transform: scale(2.8); opacity: 0; }
}

/* ---------- 2 · Three paths ---------- */

.ct-paths { padding-top: 0; }

.ct-cards {
  display: grid;
  grid-template-columns: 11fr 9fr;   /* WhatsApp (primary) ~55%, brief ~45% */
  gap: clamp(14px, 1.6vw, 22px);
  align-items: stretch;
}

.ct-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(22px, 2.2vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.7);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ct-card:hover,
.ct-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(40, 20, 30, 0.12);
}

.ct-card:focus { outline: none; }
.ct-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Primary option: filled, slightly larger. */
.ct-card.is-primary {
  padding: clamp(28px, 2.8vw, 38px);
  border-color: transparent;
  background: var(--accent);
  color: #fbf6f1;
}

.ct-card.is-primary .ct-card-line { color: rgba(251, 246, 241, 0.88); }

.ct-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.85;
}

.ct-icon svg { width: 20px; height: 20px; }

.ct-card-title {
  font: 700 clamp(1.3rem, 1.8vw, 1.7rem)/1.1 'Space Grotesk', sans-serif;
  letter-spacing: -0.03em;
}

.ct-card.is-primary .ct-card-title { font-size: clamp(1.45rem, 2vw, 1.95rem); }

.ct-card-line { color: var(--soft); }

/* ---------- 3 · Brief form ---------- */

.ct-form-shell { max-width: 980px; }

.ct-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.ct-span { grid-column: 1 / -1; }

.ct-field { position: relative; }

.ct-input {
  display: block;
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 24px 16px 8px;
  border: 1px solid var(--field);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: 400 16px/1.4 'Space Grotesk', sans-serif;   /* 16px avoids zoom on iOS */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ct-input::placeholder { color: transparent; }
.ct-input:focus::placeholder { color: rgba(23, 24, 29, 0.38); }

/* Field with a hint (the message box): hint visible whenever empty, label kept small above it. */
.ct-field.has-hint .ct-input::placeholder { color: rgba(23, 24, 29, 0.45); }
.ct-field.has-hint .ct-label {
  transform: translateY(-11px) scale(0.72);
  color: var(--soft);
}

.ct-input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(23, 24, 29, 0.12);
}

textarea.ct-input { min-height: 150px; resize: vertical; padding-top: 28px; }

/* Floating label: sits inside the field, moves up on focus or when filled. */
.ct-label {
  position: absolute;
  left: 17px;
  top: 19px;
  color: rgba(23, 24, 29, 0.6);
  font: 400 16px/1.2 'Space Grotesk', sans-serif;
  pointer-events: none;
  transform-origin: 0 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.ct-input:focus ~ .ct-label,
input.ct-input:not(:placeholder-shown) ~ .ct-label,
textarea.ct-input:not(:placeholder-shown) ~ .ct-label,
.ct-field.has-value .ct-label {
  transform: translateY(-11px) scale(0.72);
  color: var(--soft);
}

.ct-req { color: var(--error); }

.ct-field.is-invalid .ct-input { border-color: var(--error); }

.ct-error {
  margin: 6px 2px 0;
  color: var(--error);
  font: 500 13px/1.35 'Space Grotesk', sans-serif;
}

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

/* WhatsApp number: fixed +971 prefix joined to the input. */
.ct-phone { display: flex; }

.ct-prefix {
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 1px solid var(--field);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: rgba(23, 24, 29, 0.05);
  font: 700 16px/1 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}

.ct-phone .ct-input { border-radius: 0 12px 12px 0; }

/* The input sits inside the prefix row, so float its label from the row. */
.ct-phone:focus-within ~ .ct-label,
.ct-phone:has(.ct-input:not(:placeholder-shown)) ~ .ct-label {
  transform: translateY(-11px) scale(0.72);
  color: var(--soft);
}
.ct-phone ~ .ct-label { left: calc(var(--prefix-w, 64px) + 17px); }

/* Select: custom chevron, label floats once a value is chosen. */
select.ct-input {
  appearance: none;
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 27px, calc(100% - 16px) 27px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

select.ct-input:not(:focus) { color: var(--ink); }
.ct-field:not(.has-value) select.ct-input:not(:focus) { color: transparent; }

/* Budget pills (a radio group). */
.ct-pills {
  margin: 0;
  padding: 0;
  border: 0;
}

.ct-pills legend {
  margin-bottom: 10px;
  padding: 0;
  color: rgba(23, 24, 29, 0.6);
  font: 400 14px/1.2 'Space Grotesk', sans-serif;
}

.ct-pill-row { display: flex; flex-wrap: wrap; gap: 8px; }

.ct-pill input { position: absolute; opacity: 0; pointer-events: none; }

.ct-pill span {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--field);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font: 500 14px/1 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.ct-pill input:checked + span { background: var(--ink); border-color: var(--ink); color: #f5f1ee; }
.ct-pill input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }

.ct-counter {
  position: absolute;
  right: 14px;
  bottom: 10px;
  color: rgba(23, 24, 29, 0.5);
  font: 500 12px/1 'Space Grotesk', sans-serif;
  pointer-events: none;
}

.ct-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font: 400 15px/1.4 'Space Grotesk', sans-serif;
}

.ct-consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--ink);
}

/* "Privacy Policy": a button that opens the pop-up, styled as the inline link it was. */
.ct-legal-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ct-legal-link:focus-visible,
.ct-consent input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Honeypot: off-screen, skipped by keyboard and screen readers. */
.ct-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ct-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.ct-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #f5f1ee;
  font: 600 16px/1 'Space Grotesk', sans-serif;
  cursor: pointer;
}

.ct-submit:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ct-submit[aria-busy="true"] { cursor: progress; opacity: 0.85; }

.ct-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(245, 241, 238, 0.35);
  border-top-color: #f5f1ee;
  border-radius: 50%;
  animation: ctSpin 0.8s linear infinite;
}

.ct-submit[aria-busy="true"] .ct-spinner { display: inline-block; }

@keyframes ctSpin { to { transform: rotate(360deg); } }

.ct-status {
  margin: 0;
  color: var(--error);
  font: 500 14px/1.4 'Space Grotesk', sans-serif;
}

.ct-status:empty { display: none; }

.ct-success {
  padding: clamp(28px, 3vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

.ct-success h3 {
  margin: 0 0 10px;
  font: 700 clamp(1.8rem, 3vw, 2.6rem)/1.05 'Space Grotesk', sans-serif;
  letter-spacing: -0.04em;
}

.ct-success h3:focus { outline: none; }
.ct-success p { margin: 0 0 18px; color: var(--soft); }

.ct-text-link {
  font: 600 15px/1.3 'Space Grotesk', sans-serif;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- 4 · Booking ---------- */

.ct-embed {
  position: relative;
  min-height: clamp(460px, 60vh, 680px);
  border-radius: var(--radius);
  overflow: hidden;
  background: #2b2b30;
}

.ct-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.ct-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.55);
  font: 500 13px/1.3 'Space Grotesk', sans-serif;
  letter-spacing: 0.04em;
}

/* ---------- 5 · What happens next (same pattern as the About roadmap) ---------- */

.ct-timeline { position: relative; }

.ct-steps {
  display: grid;
  grid-template-columns: repeat(var(--steps, 3), 1fr);
  gap: clamp(24px, 4vw, 64px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ct-step { position: relative; padding-top: 36px; }

.ct-marker {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg-top);
}

.ct-step-num {
  display: block;
  margin-bottom: 10px;
  font: 700 clamp(2.4rem, 4vw, 3.6rem)/0.9 'Space Grotesk', sans-serif;
  letter-spacing: -0.05em;
}

.ct-step h3 {
  margin: 0 0 8px;
  font: 600 clamp(1.25rem, 1.7vw, 1.6rem)/1.15 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}

.ct-step p { margin: 0; color: var(--soft); }

.ct-track,
.ct-line {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.ct-track { background: var(--line); }
.ct-line { background: var(--accent); transform-origin: 0 0; }

/* The steps lead straight into the details below, as one flow. */
.ct-next { padding-bottom: clamp(28px, 3.5vw, 48px); }
.ct-next + .ct-details { padding-top: 0; }

/* ---------- 6 · Details ---------- */

.ct-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 clamp(20px, 3vw, 48px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ct-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.ct-detail-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ct-detail-label {
  font: 500 12px/1 'Space Grotesk', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

.ct-detail-value {
  min-width: 0;
  overflow-wrap: anywhere;
  font: 600 clamp(1.1rem, 1.5vw, 1.35rem)/1.3 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}

a.ct-detail-value { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }
a.ct-detail-value:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.ct-copy {
  position: relative;
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid var(--field);
  border-radius: 999px;
  background: transparent;
  color: var(--soft);
  font: 500 12px/1 'Space Grotesk', sans-serif;
  cursor: pointer;
}

.ct-copy:hover { color: var(--ink); border-color: var(--ink); }
.ct-copy:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.ct-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: #f5f1ee;
  font: 600 11px/1 'Space Grotesk', sans-serif;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.ct-copy.is-copied .ct-tip { opacity: 1; transform: translate(-50%, 0); }

.ct-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.ct-socials a {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--field);
  border-radius: 999px;
  font: 500 14px/1 'Space Grotesk', sans-serif;
}

.ct-socials a:hover { background: var(--ink); color: #f5f1ee; }
.ct-socials a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .ct-cards { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .ct-wrap { width: calc(100% - 32px); }
  .ab-band { height: 36px; }
  .ab-mark { font-size: 20px; }

  .ct-form { grid-template-columns: 1fr; }

  .ct-steps { grid-template-columns: 1fr; }
  .ct-step { padding: 0 0 0 36px; }
}

/* Reduced motion: no lifts, pulses, slides or spins; colour/opacity changes only. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }   /* this stylesheet only loads on the Contact page */
  .ct-card { transition: box-shadow 0.25s ease; }
  .ct-card:hover,
  .ct-card:focus-visible { transform: none; }
  .ct-dot::after { animation: none; opacity: 0; }
  .ct-label { transition: color 0.2s ease; }
  .ct-tip,
  .ct-copy.is-copied .ct-tip { transform: translate(-50%, 0); transition: opacity 0.2s ease; }
  .ct-spinner { animation: none; border-color: #f5f1ee; opacity: 0.6; }
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
