/* ============================================================
   CONTACT US popup (assets/js/contact.js) — same DNA as the nav panels:
   solid dark card, hairline borders, Plus Jakarta, white primary button.
   ============================================================ */
.ct { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.ct[hidden], .ct-form[hidden], .ct-done[hidden] { display: none; }
html.ct-open, html.ct-open body { overflow: hidden; }

.ct-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 6, 8, 0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 0.32s var(--ease-out);
}
.ct-card {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  overflow: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, #111318, #0B0D12);
  border: 1px solid var(--line-2);
  border-radius: 24px;
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9);
  opacity: 0; transform: translateY(14px) scale(0.985);
  transition: opacity 0.32s var(--ease-out), transform 0.45s var(--ease-out);
}
.ct.is-open .ct-backdrop { opacity: 1; }
.ct.is-open .ct-card { opacity: 1; transform: none; }

.ct-guard { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ct-close {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  color: var(--text-2); cursor: pointer;
  transition: color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}
.ct-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.ct-close svg { width: 16px; height: 16px; }

.ct-body { padding: 40px 40px 36px; }
.ct-eyebrow { margin: 0 0 14px; }
.ct-title { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.08; color: var(--text); }
.ct-sub { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--text-2); }

.ct-form { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.ct-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ct-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ct-lab { font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.ct-lab em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--text-3); }
.ct-field input, .ct-field select, .ct-field textarea {
  width: 100%;
  font: inherit; font-size: 15px; letter-spacing: -0.01em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 13px 14px;
  min-height: 48px;
  transition: border-color 0.25s var(--ease-out), background 0.25s var(--ease-out);
  -webkit-appearance: none; appearance: none;
}
.ct-field textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.ct-field select {
  background-color: #111318;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><path d='M2 3.5l3 3 3-3' fill='none' stroke='%23A1A1A3' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 10px;
  padding-right: 36px;
}
.ct-field select option { background: #111318; color: var(--text); }
.ct-field input::placeholder, .ct-field textarea::placeholder { color: var(--text-3); }
.ct-field input:focus, .ct-field select:focus, .ct-field textarea:focus {
  outline: none; border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.04);
}
.ct-field input:focus-visible, .ct-field select:focus-visible, .ct-field textarea:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}
.ct-field .is-invalid { border-color: rgba(255, 140, 130, 0.65); }
.ct-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.ct-status { margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: #FFB4AB; }
/* Privacy notice at the point of collection (GDPR Art. 13). */
.ct-legal { margin: 2px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.ct-legal a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.ct-legal a:hover { color: var(--text); }
.ct-status:empty { display: none; }
.ct-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-top: 4px; }
.ct-submit { flex: none; }
.ct-tg {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px;
  font-size: 14px; letter-spacing: -0.01em; color: var(--text-2); text-decoration: none;
  transition: color 0.3s var(--ease-out);
}
.ct-tg svg { width: 16px; height: 16px; flex: none; }
.ct-tg strong { font-weight: 500; color: var(--text); border-bottom: 1px solid var(--line-2); transition: border-color 0.3s var(--ease-out); }
.ct-tg:hover { color: var(--text); }
.ct-tg:hover strong { border-color: rgba(255, 255, 255, 0.6); }
.ct-submit[disabled] { opacity: 0.7; cursor: progress; }

.ct.is-sent .ct-body > .ct-eyebrow, .ct.is-sent .ct-body > .ct-title, .ct.is-sent .ct-body > .ct-sub { display: none; }
.ct-done { text-align: left; }
.ct-done-mark {
  display: inline-flex; width: 48px; height: 48px; border-radius: 50%;
  align-items: center; justify-content: center; margin-bottom: 18px;
  background: #FFFFFF; color: #08090B;
}
.ct-done-mark svg { width: 22px; height: 22px; }
.ct-done .btn { margin-top: 26px; }

@media (max-width: 600px), (max-height: 520px) {
  .ct { padding: 0; align-items: flex-end; }
  .ct-card { width: 100%; border-radius: 22px 22px 0 0; max-height: 92vh; max-height: 92dvh; transform: translateY(40px); }
  .ct-body { padding: 32px 20px calc(24px + env(safe-area-inset-bottom)); }
  .ct-row { grid-template-columns: minmax(0, 1fr); }
  .ct-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .ct-submit { justify-content: center; }
  .ct-tg { justify-content: center; font-size: 13px; }
}
/* Phones (audit #7): 16px fields (iOS doesn't zoom), the close button stays put
   (only the body scrolls), Send stays reachable at the bottom of the sheet. */
@media (max-width: 600px), (max-height: 520px) {
  .ct-card { display: flex; flex-direction: column; overflow: hidden; }
  /* Solid top bar: the close button sits on it, the form scrolls under it. */
  .ct-card::before { content: ""; flex: none; height: 64px; background: #111318; border-bottom: 1px solid var(--line); }
  .ct-body { overflow: auto; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; padding-top: 20px; }
  .ct-close { z-index: 3; top: 10px; right: 12px; background: #15171C; }
  .ct-field input, .ct-field select, .ct-field textarea { font-size: 16px; }
  .ct-actions {
    position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom)); z-index: 2;
    margin: 4px -20px calc(-24px - env(safe-area-inset-bottom));
    padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(11,13,18,0) 0%, #0B0D12 22%);
  }
}
.ct-status.is-note { color: var(--text-2); }
@media (prefers-reduced-motion: reduce) {
  .ct-backdrop, .ct-card { transition: none; }
}

/* Self-contained buttons for pages that don't load core.css (FAQ pages).
   Zero-specificity (:where) copies of core's .btn values, so they never win over page rules. */
:where(.ct) :where(.btn) {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-sans); font-weight: 500; font-size: 14px; letter-spacing: -0.01em; line-height: 1.2;
  padding: 11px 20px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
:where(.ct) :where(.btn-primary) { background: #FFFFFF; color: #08090B; }
:where(.ct) :where(.btn-ghost) { background: rgba(255,255,255,0.04); color: var(--text); border: 1px solid var(--line-2); }
:where(.ct) :where(.btn-lg) { padding: 17px 30px; font-size: 16px; }
:where(.ct) :where(.btn .arr) { width: 16px; height: 16px; }

@media (pointer: coarse) { .ct-field input, .ct-field select, .ct-field textarea { font-size: 16px; } }
@media (max-height: 520px) { .ct-card { max-width: 640px; margin: 0 auto; } }
