/* contact.css — Contact page. Prefix: ct-. Design tokens from base.css only. */

/* page-level guard: unrevealed [data-reveal="right"] elements sit +26px off-screen
   and would otherwise create a few px of horizontal scroll on mobile */
.page-contact { overflow-x: clip; }

/* --- hero --- */
.ct-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

/* ambient glow — blue wash top-right, faint accent low-left (mirrors home hero) */
.ct-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 82% 12%, color-mix(in srgb, var(--blue) 14%, transparent), transparent 70%),
    radial-gradient(40% 35% at 6% 90%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 70%);
}

.ct-hero__wrap {
  position: relative;
  z-index: 1;
  padding-top: clamp(64px, 12vh, 128px);
  padding-bottom: clamp(48px, 9vh, 96px);
}

.ct-hero__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(24px, 4.5vh, 52px);
}

.ct-hero__title {
  font-size: clamp(2.8rem, 6.4vw, 5.4rem);
  font-weight: 300;
  letter-spacing: 0.015em;
  line-height: 1.02;
}

.ct-hero__line { display: block; }

/* yellow highlighter mark — --accent as fill only, never as text on --bg */
.ct-hero__line--accent {
  display: inline-block;
  padding: 0.04em 0.14em 0.02em;
  background: var(--accent);
  color: var(--accent-ink);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.ct-hero__lede {
  max-width: 44rem;
  margin: clamp(24px, 3.5vh, 36px) 0 0;
  color: var(--ink-dim);
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.7;
}

/* --- two-column layout: form 7 / info 5 --- */
.ct-main__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  padding-top: clamp(48px, 8vh, 88px);
  padding-bottom: clamp(64px, 10vh, 112px);
}

.ct-blockhead { margin-bottom: clamp(28px, 4vh, 40px); }

.ct-blockhead__title {
  margin-top: 14px;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 300;
}

/* --- form --- */
.ct-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}

.ct-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  transition: color 0.2s ease;
}

/* label wakes up while its field is active */
.ct-field:focus-within .ct-label { color: var(--link-ink); }

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

.ct-input {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  padding: 13px 16px;
  transition: border-color 0.2s ease, transform 0.15s var(--ease-out-quart);
}

.ct-input::placeholder { color: var(--muted); }

/* focus: link-blue border + 1px lift (keyboard focus keeps the base :focus-visible ring) */
.ct-input:focus {
  border-color: var(--link-ink);
  transform: translateY(-1px);
}

/* keep Chrome autofill on-theme instead of the UA white/yellow flash */
.ct-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-alt) inset;
  -webkit-text-fill-color: var(--ink);
}

.ct-textarea {
  resize: vertical;
  min-height: 148px;
}

/* error line main.js writes into (contract class, scoped under ct-form).
   Semantic exception: fixed signal red — the token system has no error hue;
   90% red mixed into --ink keeps it legible on both themes. */
.ct-form .form-error {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  color: color-mix(in srgb, #c41e1e 90%, var(--ink));
}

.ct-form .form-error:empty {
  display: none;
  margin: 0;
}

/* gentle double shake when an error appears (transform-only;
   base.css reduced-motion neutralizes it) */
.ct-form .form-error:not(:empty) {
  animation: ct-error-shake 0.3s var(--ease-out-quart) 2;
}

@keyframes ct-error-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

/* main.js replaces the whole form with <p class="form-success"> on 2xx */
.ct-main__form .form-success {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  max-width: 30rem;
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.ct-main__form .form-success::before {
  content: "✓";
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  margin-top: 0.04em;
  font-family: var(--font-mono);
  font-size: 0.7em;
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-ink);
}

.ct-submit { margin-top: 8px; }

/* main.js disables the button while the request is in flight */
.ct-submit[disabled] {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

/* --- info card: flat, hairline border, ledger rows --- */
.ct-info__card {
  border: 1px solid var(--line);
  padding: clamp(24px, 3vw, 36px);
}

.ct-info__list { margin: clamp(20px, 3vh, 28px) 0 0; }

.ct-info__row { padding: 16px 0; }
.ct-info__row:first-child { padding-top: 0; }
.ct-info__row + .ct-info__row { border-top: 1px solid var(--line); }

.ct-info__label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 6px;
}

.ct-info__value {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}

.ct-info__link {
  color: var(--link-ink);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.ct-info__link:hover { border-bottom-color: var(--link-ink); }

.ct-social {
  display: flex;
  gap: 12px;
  margin-top: clamp(24px, 3.5vh, 32px);
}

.ct-social__link {
  flex: 1;
  text-align: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  padding: 10px 12px;
  transition: transform 0.15s var(--ease-out-quart), border-color 0.2s ease, color 0.2s ease;
}

.ct-social__link:hover {
  transform: translateY(-2px);
  border-color: var(--link-ink);
  color: var(--link-ink);
}

.ct-social__link:active { transform: translateY(0) scale(0.98); }

.ct-info__note {
  margin: clamp(24px, 3.5vh, 32px) 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* --- responsive: stack ≤768px --- */
@media (max-width: 768px) {
  .ct-hero__title { font-size: clamp(2.3rem, 11vw, 3.4rem); }

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

  .ct-submit { width: 100%; text-align: center; }
}
