/* ─────────────────────────────────────────────────────────
   CONTACT PAGE — Intelligence briefing request form
   Layers on top of ../assets/styles.css (shared design system).
   Prefix: ct-
   ───────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────
   01. HERO OVERRIDES
   ───────────────────────────────────────────────────────── */
.ct-hero {
  padding-top: 140px;
  padding-bottom: clamp(36px, 5vw, 56px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.ct-hero > .container {
  position: relative;
  z-index: 1;
}
.ct-hero .hero-headline {
  max-width: 22ch;
}

/* Ghost watermark */
.ct-ghost {
  position: absolute;
  top: clamp(40px, 5vh, 80px);
  right: clamp(-40px, -2vw, 0px);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(14rem, 28vw, 36rem);
  line-height: 0.78;
  color: transparent;
  -webkit-text-stroke: 1.5px oklch(0.18 0.025 260 / 0.14);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: -0.065em;
  white-space: nowrap;
}
html.dark .ct-ghost {
  -webkit-text-stroke-color: oklch(0.92 0.008 250 / 0.06);
}

/* ─────────────────────────────────────────────────────────
   02. MAIN GRID — form + aside
   ───────────────────────────────────────────────────────── */
.ct-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}

/* ─────────────────────────────────────────────────────────
   03. FORM CARD — dossier-style double-bezel
   ───────────────────────────────────────────────────────── */
.ct-form-wrap {
  background: oklch(0.18 0.025 260 / 0.03);
  border: 1px solid oklch(0.18 0.025 260 / 0.06);
  padding: 6px;
  transition: border-color 400ms var(--ease-drawer);
}
.ct-form-wrap:focus-within {
  border-color: oklch(0.18 0.025 260 / 0.14);
}
html.dark .ct-form-wrap {
  background: oklch(1 0 0 / 0.02);
  border-color: oklch(1 0 0 / 0.05);
}
html.dark .ct-form-wrap:focus-within {
  border-color: oklch(1 0 0 / 0.12);
}

.ct-form-inner {
  background: var(--paper);
  box-shadow: inset 0 1px 1px oklch(1 0 0 / 0.6);
  padding: clamp(28px, 4vw, 44px);
  position: relative;
}
html.dark .ct-form-inner {
  box-shadow: inset 0 1px 1px oklch(1 0 0 / 0.04);
}

/* File badge — top left corner */
.ct-file-badge {
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--paper);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* Classification stamp — top right */
.ct-stamp {
  position: absolute;
  right: 20px;
  top: -10px;
  background: var(--ink);
  color: oklch(0.870 0.180 130);
  padding: 6px 11px 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  z-index: 2;
}
.ct-stamp::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: oklch(0.620 0.180 135);
  box-shadow: 0 0 0 3px oklch(0.620 0.180 135 / 0.18);
}
html.dark .ct-stamp {
  background: oklch(0.070 0.022 260);
}

/* Form header */
.ct-form-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--rule);
}
.ct-form-head__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}
.ct-form-head__ref {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}
.ct-form-head__ref b {
  color: var(--accent);
}

/* ─────────────────────────────────────────────────────────
   04. FORM FIELDS
   ───────────────────────────────────────────────────────── */
.ct-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 24px);
}
.ct-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}
.ct-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ct-req {
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
}
.ct-input,
.ct-select,
.ct-textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 1px;
  padding: 12px 16px;
  transition:
    border-color 300ms var(--ease-out-strong),
    box-shadow 300ms var(--ease-out-strong),
    background-color 200ms var(--ease-out-strong);
  outline: none;
  line-height: 1.5;
}
.ct-input::placeholder,
.ct-textarea::placeholder {
  color: var(--ink-mute);
  font-size: 14px;
  opacity: 0.7;
}
.ct-input:hover,
.ct-select:hover,
.ct-textarea:hover {
  border-color: oklch(0.18 0.025 260 / 0.25);
  background: var(--paper-deeper);
}
html.dark .ct-input:hover,
html.dark .ct-select:hover,
html.dark .ct-textarea:hover {
  border-color: oklch(1 0 0 / 0.15);
}
.ct-input:focus,
.ct-select:focus,
.ct-textarea:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px oklch(0.460 0.180 258 / 0.08),
    inset 0 1px 2px oklch(0.18 0.025 260 / 0.04);
  background: var(--paper);
}
html.dark .ct-input:focus,
html.dark .ct-select:focus,
html.dark .ct-textarea:focus {
  box-shadow:
    0 0 0 3px oklch(0.600 0.180 258 / 0.12),
    inset 0 1px 2px oklch(0 0 0 / 0.2);
}

/* Select custom arrow */
.ct-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
html.dark .ct-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Textarea */
.ct-textarea {
  min-height: 140px;
  resize: vertical;
}

/* ─────────────────────────────────────────────────────────
   05. FORM FOOTER — submit + note
   ───────────────────────────────────────────────────────── */
.ct-form-foot {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px dashed var(--rule);
}
.ct-form-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  max-width: 34ch;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────
   06. ASIDE — dossier info card
   ───────────────────────────────────────────────────────── */
.ct-aside {
  position: sticky;
  top: 120px;
}
.ct-aside__card {
  border: 1px solid var(--ink);
  padding: 5px;
  background: var(--paper-deeper);
  box-shadow:
    0 30px 80px -50px oklch(0.2 0.025 260 / 0.25),
    inset 0 0 0 1px oklch(1 0 0 / 0.4);
}
html.dark .ct-aside__card {
  box-shadow:
    0 30px 80px -50px oklch(0 0 0 / 0.5),
    inset 0 0 0 1px oklch(1 0 0 / 0.03);
}
.ct-aside__inner {
  background: var(--paper);
  padding: 28px 28px 32px;
  border: 1px solid oklch(0.92 0.008 250);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.8);
  position: relative;
}
html.dark .ct-aside__inner {
  border-color: oklch(0.22 0.016 260);
  box-shadow: none;
}

/* "DIRECT CHANNEL" badge on aside */
.ct-aside__badge {
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--paper);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

.ct-aside__title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.3rem, 1.2vw + 0.6rem, 1.7rem);
  color: var(--ink);
  letter-spacing: -0.014em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.ct-aside__desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 38ch;
  margin-bottom: 28px;
}

/* Info rows */
.ct-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ct-info-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  padding: 14px 0;
  border-bottom: 1px dashed var(--rule);
  font-size: 14px;
  align-items: baseline;
}
.ct-info-item:first-child {
  border-top: 1px dashed var(--rule);
}
.ct-info-item:last-child {
  border-bottom: none;
}
.ct-info-key {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  padding-top: 2px;
}
.ct-info-val {
  color: var(--ink);
  font-size: 14.5px;
}
.ct-info-val a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 200ms var(--ease-out-strong);
}
.ct-info-val a:hover {
  text-decoration-color: var(--accent);
}

/* ─────────────────────────────────────────────────────────
   07. TRUST STRIP — below hero
   ───────────────────────────────────────────────────────── */
.ct-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}
.ct-trust__sep {
  color: var(--rule);
}

/* ─────────────────────────────────────────────────────────
   08. CLOSING CTA — after form
   ───────────────────────────────────────────────────────── */
.ct-closing {
  border-top: 1px solid var(--rule);
  padding-block: clamp(56px, 7vw, 80px);
  text-align: center;
}
.ct-closing__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 20px;
}
.ct-closing__headline {
  font-size: clamp(1.8rem, 2.8vw + 0.5rem, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.032em;
  line-height: 1.02;
  max-width: 28ch;
  margin-inline: auto;
}
.ct-closing__headline b {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  letter-spacing: -0.02em;
}
.ct-closing__sub {
  margin-top: 16px;
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-inline: auto;
  line-height: 1.55;
}

/* ─────────────────────────────────────────────────────────
   09. FORM VALIDATION STATES
   ───────────────────────────────────────────────────────── */
.ct-input:invalid:not(:placeholder-shown),
.ct-textarea:invalid:not(:placeholder-shown) {
  border-color: oklch(0.600 0.180 25);
}
.ct-input:valid:not(:placeholder-shown) {
  border-color: oklch(0.520 0.140 145);
}

/* Submit loading state (JS toggle) */
.ct-form.is-submitting .btn {
  opacity: 0.6;
  pointer-events: none;
}
.ct-form.is-submitting .btn::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid oklch(1 0 0 / 0.3);
  border-top-color: oklch(1 0 0 / 0.9);
  border-radius: 999px;
  animation: ct-spin 600ms linear infinite;
  margin-left: 8px;
}
@keyframes ct-spin {
  to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────────────────
   10. RESPONSIVE
   ───────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .ct-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .ct-aside {
    position: static;
  }
}

@media (max-width: 640px) {
  .ct-hero {
    padding-top: 120px;
  }
  .ct-field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .ct-form-inner {
    padding: 24px 20px 28px;
  }
  .ct-aside__inner {
    padding: 24px 20px 28px;
  }
  .ct-form-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .ct-form-head {
    flex-direction: column;
    gap: 6px;
  }
  .ct-stamp {
    display: none;
  }
  .ct-info-item {
    grid-template-columns: 80px 1fr;
  }
  .ct-trust {
    gap: 8px;
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ct-form-wrap,
  .ct-input,
  .ct-select,
  .ct-textarea {
    transition: none;
  }
}
