/* Contact page — owner-intake form, trust strip, FAQ. Matches the glass
   aesthetic used on /services/ and /freehold/. Mobile-first. */

body.contact-page {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
}

body.contact-page .page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

body.contact-page .site-footer {
  margin-top: auto;
}

html:has(body.contact-page) {
  overflow-x: hidden;
}

body.contact-page main {
  flex: 1 0 auto;
  padding: 80px clamp(16px, 4vw, 48px) 60px;
  max-width: 1180px;
  margin-inline: auto;
  width: 100%;
  box-sizing: border-box;
}

/* ── Background wave (painted by wave_bg.js via initWaveBg) ── */
.ct-wave-svg {
  position: fixed;
  inset: 0;
  z-index: var(--z-behind);
  pointer-events: none;
  opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
  .ct-wave-svg { display: none; }
}

/* ── Hero ── */
.ct-hero {
  text-align: center;
  margin-bottom: 48px;
}

.ct-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  font-weight: 500;
}

.ct-hero__title {
  font-family: "Cormorant Garamond", "Noto Sans Arabic", "Vazirmatn", "Noto Sans SC", "Noto Sans TC", serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 16px;
}

.ct-hero__sub {
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto;
}

/* ── Two-column grid ── */
.ct-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 72px;
}

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

/* ── Form card ── */
.ct-form-card {
  padding: clamp(20px, 3vw, 36px);
  border-radius: calc(var(--control-radius) + 4px);
  border: 1px solid var(--surface-stroke-strong);
  background: var(--card);
  box-shadow: var(--panel-shadow);
}

.ct-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ct-honey {
  position: absolute;
  inset-inline-start: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ct-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.ct-field > label,
.ct-field > legend {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
  padding: 0;
}

.ct-req {
  color: var(--accent-bright);
  margin-inline-start: 2px;
}

.ct-field input[type="text"],
.ct-field input[type="tel"],
.ct-field input[type="email"],
.ct-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--surface-border);
  border-radius: var(--control-radius-tight);
  background: var(--surface-layer-1);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.ct-field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.45;
}

.ct-field input:hover,
.ct-field textarea:hover {
  border-color: var(--accent-bright-border);
}

.ct-field input:focus-visible,
.ct-field textarea:focus-visible {
  outline: none;
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px var(--accent-bright-soft);
  background: var(--surface-layer-2);
}

.ct-field input[aria-invalid="true"],
.ct-field textarea[aria-invalid="true"] {
  border-color: #d93434;
  box-shadow: 0 0 0 3px rgba(217, 52, 52, 0.18);
}

.ct-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.ct-hint {
  margin: -6px 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* ── Chip radio group ── */
.ct-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ct-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  min-height: 44px;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  background: var(--surface-layer-1);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
  user-select: none;
}

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

.ct-chip:hover {
  border-color: var(--accent-bright-border);
  color: var(--accent-bright);
}

.ct-chip:has(input:focus-visible) {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.ct-chip:has(input:checked) {
  background: var(--accent-bright-soft);
  border-color: var(--accent-bright);
  color: var(--accent-bright);
  font-weight: 600;
}

/* ── Actions ── */
.ct-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 6px;
}

.ct-submit {
  flex: 1 1 220px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--control-radius);
  background: var(--accent-bright);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.14s ease, transform var(--dur-instant) var(--ease-spring);
}

.ct-submit:hover {
  background: var(--accent-bright-dark, #018a44);
}

.ct-submit:active {
  transform: scale(0.98);
}

.ct-submit:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.ct-submit[disabled] {
  opacity: 0.72;
  cursor: progress;
}

.ct-submit[data-loading="true"] .ct-submit__label { opacity: 0.55; }
.ct-submit[data-loading="true"] .ct-submit__spinner { display: inline-block; }

.ct-submit__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  animation: ct-spin 0.8s linear infinite;
}

@keyframes ct-spin {
  to { transform: rotate(360deg); }
}

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

.ct-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  min-height: 44px;
  border: 1px solid rgba(37, 211, 102, 0.4);
  border-radius: var(--control-radius);
  background: transparent;
  color: #25d366;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.ct-whatsapp:hover {
  background: rgba(37, 211, 102, 0.08);
  border-color: #25d366;
}

.ct-whatsapp:focus-visible {
  outline: 2px solid #25d366;
  outline-offset: 2px;
}

/* ── Status messages ── */
.ct-status {
  margin-top: 4px;
  padding: 14px 18px;
  border-radius: var(--control-radius-tight);
  font-size: 0.9rem;
  line-height: 1.45;
}

.ct-status[data-state="success"] {
  background: var(--accent-bright-soft);
  border: 1px solid var(--accent-bright-border);
  color: var(--accent-bright);
}

.ct-status[data-state="error"] {
  background: rgba(217, 52, 52, 0.08);
  border: 1px solid rgba(217, 52, 52, 0.35);
  color: #c1231c;
}

:root:not([data-mode="light"]) .ct-status[data-state="error"] {
  color: #f9a5a0;
}

/* ── Side column ── */
.ct-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 72px;
}

@media (max-width: 900px) {
  .ct-side { position: static; }
}

.ct-side-card {
  padding: 22px clamp(18px, 2.5vw, 28px);
  border-radius: calc(var(--control-radius) + 4px);
  border: 1px solid var(--surface-stroke-strong);
  background: var(--card);
}

.ct-side-card h2 {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", "Noto Sans Arabic", "Vazirmatn", serif;
  font-size: 1.28rem;
  font-weight: 500;
  color: var(--ink);
}

.ct-why {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ct-why li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.ct-why strong {
  display: block;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.ct-why span {
  display: block;
}

.ct-why__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-bright-soft);
  color: var(--accent-bright);
}

.ct-direct {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ct-direct li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: var(--control-radius-tight);
  text-decoration: none;
  color: var(--ink);
  transition: background-color 0.14s ease;
}

.ct-direct li a:hover,
.ct-direct li a:focus-visible {
  background: var(--surface-layer-1);
  outline: none;
}

.ct-direct li a:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: -2px;
}

.ct-direct__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.ct-direct__val {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-family: "Outfit", monospace;
}

.ct-direct__hours {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ── FAQ ── */
.ct-faq {
  max-width: 780px;
  margin-inline: auto;
  padding: 20px 0 40px;
}

.ct-faq h2 {
  margin: 0 0 20px;
  font-family: "Cormorant Garamond", "Noto Sans Arabic", "Vazirmatn", serif;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 500;
  color: var(--ink);
  text-align: center;
}

.ct-faq__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ct-faq__item {
  border: 1px solid var(--surface-border);
  border-radius: var(--control-radius-tight);
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.16s ease;
}

.ct-faq__item[open] {
  border-color: var(--accent-bright-border);
}

.ct-faq__item summary {
  list-style: none;
  padding: 16px 20px;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: relative;
}

.ct-faq__item summary::-webkit-details-marker { display: none; }

.ct-faq__item summary::after {
  content: "+";
  font-size: 1.4rem;
  line-height: 1;
  color: var(--accent-bright);
  transition: transform 0.16s ease;
  flex-shrink: 0;
}

.ct-faq__item[open] summary::after {
  content: "−";
}

.ct-faq__item summary:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: -2px;
}

.ct-faq__item > div {
  padding: 0 20px 18px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ── RTL-specific adjustments (logical props handle most; handful of tweaks) ── */
html[dir="rtl"] .ct-submit__spinner { animation-direction: reverse; }

/* ── Dark mode adjustments ── */
:root:not([data-mode="light"]) .ct-form-card,
:root:not([data-mode="light"]) .ct-side-card,
:root:not([data-mode="light"]) .ct-faq__item {
  background: color-mix(in srgb, var(--card) 92%, transparent);
}
