/* ============================================================
   Cogniron — Contact page
   Reuses homepage.css tokens + shared atoms (.btn, .eyebrow,
   .sec, .wrap, .band-dark, .footer). Adds the hero, the unified
   info + form panel, and the office cards.
   ============================================================ */

/* ── Entrance ───────────────────────────────────────── */
/* Content is always visible; this page manages its own (optional) motion. */
.reveal { opacity: 1 !important; transform: none !important; }

/* ── Hero ───────────────────────────────────────────── */
.contact-hero {
  position: relative; overflow: hidden;
  padding: 134px 0 96px; margin-top: -74px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}
.contact-hero::before {
  content: ""; position: absolute; right: -6%; top: -34%;
  width: 720px; height: 720px; pointer-events: none;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 62%);
  filter: blur(12px); opacity: 0.8;
}
.contact-hero .wrap { position: relative; z-index: 1; }
.contact-hero .h1 { margin-top: 22px; max-width: 17ch; }
.contact-hero .h1 .em { color: var(--accent); }
.contact-sub { margin-top: 24px; font-size: 20px; line-height: 1.55; color: var(--text-secondary); max-width: 56ch; text-wrap: pretty; }
.contact-hero .hero-cta { margin-top: 34px; }

/* panel sits cleanly below the hero (no overlap) */
.contact-stage { padding-top: 80px; }

/* ── Unified contact panel (dark info · light form) ─── */
.contact-panel {
  display: grid; grid-template-columns: 0.92fr 1.08fr;
  border: 1px solid var(--border-subtle); border-radius: 22px; overflow: hidden;
  background: var(--bg-canvas);
  box-shadow: 0 44px 100px -56px rgba(17,19,46,0.45);
}

/* LEFT — dark info panel (inherits dark tokens from .band-dark) */
.cp-info {
  position: relative; overflow: hidden;
  padding: 52px 46px 46px;
  display: flex; flex-direction: column;
}
.cp-info::before {
  content: ""; position: absolute; right: -28%; top: -20%;
  width: 460px; height: 460px; pointer-events: none;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 64%);
  filter: blur(8px); opacity: 0.9;
}
.cp-info > * { position: relative; z-index: 1; }
.cp-h { margin-top: 18px; font-size: clamp(28px, 3vw, 36px); line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); }
.cp-d { margin-top: 16px; font-size: 16px; line-height: 1.6; color: var(--text-secondary); max-width: 40ch; text-wrap: pretty; }

.ci-list { list-style: none; margin-top: 34px; display: flex; flex-direction: column; }
.ci-row {
  display: grid; grid-template-columns: 24px 1fr; gap: 16px; align-items: start;
  padding: 20px 0; border-top: 1px solid var(--border-subtle);
}
.ci-row:first-of-type { border-top: none; padding-top: 4px; }
.ci-ico { width: 20px; height: 20px; color: var(--accent); margin-top: 2px; }
.ci-ico svg { width: 100%; height: 100%; display: block; }
.ci-k { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-tertiary); }
.ci-v { margin-top: 6px; font-size: 15.5px; line-height: 1.5; color: var(--text-primary); text-wrap: pretty; }
.ci-v a { color: var(--text-primary); text-decoration: none; border-bottom: 1px solid var(--border-default); transition: color 140ms ease, border-color 140ms ease; }
.ci-v a:hover { color: var(--accent); border-color: var(--accent); }
.ci-sub { display: block; margin-top: 3px; font-size: 13.5px; color: var(--text-secondary); }

/* decorative brand motif anchoring the panel */
.cp-mark { margin-top: auto; padding-top: 38px; display: flex; flex-direction: column; gap: 6px; }
.cp-mark i { display: block; height: 5px; background: var(--accent); transform: skewX(-20deg); border-radius: 1px; }
.cp-mark i:nth-child(1) { width: 28px; opacity: 0.4; }
.cp-mark i:nth-child(2) { width: 46px; opacity: 0.7; }
.cp-mark i:nth-child(3) { width: 36px; opacity: 1; }
.cp-tagline { margin-top: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-tertiary); }

/* RIGHT — form panel (light) */
.cp-form { padding: 48px 46px 42px; background: var(--bg-canvas); }
.cp-form .fc-eyebrow { margin-bottom: 8px; }
.cp-form .fc-h { font-size: 26px; line-height: 1.15; font-weight: 600; letter-spacing: -0.018em; color: var(--text-primary); }

.cform { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.col-2 { grid-column: 1 / -1; }
.field label { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }
.field label .req { color: var(--accent); margin-left: 3px; }

.field input,
.field select,
.field textarea {
  width: 100%; font-family: var(--font-sans); font-size: 15px; color: var(--text-primary);
  background: var(--bg-subtle); border: 1px solid var(--border-default); border-radius: 10px;
  padding: 12px 14px; line-height: 1.4; transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-tertiary); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none; border-color: var(--accent); background: var(--bg-canvas);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field.select-wrap { position: relative; }
.field.select-wrap::after {
  content: ""; position: absolute; right: 16px; bottom: 18px; width: 8px; height: 8px;
  border-right: 1.5px solid var(--text-tertiary); border-bottom: 1.5px solid var(--text-tertiary);
  transform: rotate(45deg); pointer-events: none;
}
.field select { padding-right: 36px; cursor: pointer; }
.field.is-hidden { display: none; }

.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 16%, transparent); }
.field .err-hint { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--danger); opacity: 0; height: 0; }
.field.invalid .err-hint { opacity: 1; height: auto; }

.cform-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 6px; }
.cform-foot .btn { flex-shrink: 0; }
.form-note { font-size: 12.5px; line-height: 1.5; color: var(--text-tertiary); max-width: 40ch; }
.form-note a { color: var(--accent); text-decoration: none; }
.form-note a:hover { text-decoration: underline; }

.form-msg {
  grid-column: 1 / -1; display: none; align-items: flex-start; gap: 12px;
  padding: 15px 18px; border-radius: 12px; font-size: 14.5px; line-height: 1.5;
  border: 1px solid var(--border-subtle);
}
.form-msg.show { display: flex; }
.form-msg .fm-ico { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.form-msg.is-success { background: color-mix(in srgb, var(--success) 9%, var(--bg-canvas)); border-color: color-mix(in srgb, var(--success) 32%, var(--border-subtle)); color: color-mix(in srgb, var(--success) 70%, var(--text-primary)); }
.form-msg.is-success .fm-ico { color: var(--success); }
.form-msg.is-error { background: color-mix(in srgb, var(--danger) 8%, var(--bg-canvas)); border-color: color-mix(in srgb, var(--danger) 32%, var(--border-subtle)); color: color-mix(in srgb, var(--danger) 72%, var(--text-primary)); }
.form-msg.is-error .fm-ico { color: var(--danger); }
.form-msg a { color: inherit; font-weight: 600; }

/* ── Global presence (office cards) ─────────────────── */
.presence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 56px; }
.office {
  position: relative; padding: 34px 34px 30px; border: 1px solid var(--border-subtle);
  border-radius: 16px; background: var(--bg-canvas); overflow: hidden;
  transition: border-color 200ms ease, transform 220ms cubic-bezier(.4,0,.2,1), box-shadow 220ms ease;
}
.office::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 56px; background: var(--accent); transition: width 320ms cubic-bezier(0.22,1,0.36,1); }
.office:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 36%, var(--border-subtle)); box-shadow: 0 26px 52px -34px rgba(17,19,46,0.28); }
.office:hover::before { width: 130px; }
.office-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.office-region { font-size: 21px; font-weight: 600; letter-spacing: -0.014em; color: var(--text-primary); }
.office-flag { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-tertiary); }
.office-list { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.office-list li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: baseline; }
.office-list .ol-k { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-tertiary); }
.office-list .ol-v { font-size: 15.5px; line-height: 1.5; color: var(--text-primary); text-wrap: pretty; }
.office-list .ol-v a { color: var(--text-primary); text-decoration: none; border-bottom: 1px solid var(--border-default); transition: color 140ms ease, border-color 140ms ease; }
.office-list .ol-v a:hover { color: var(--accent); border-color: var(--accent); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 980px) {
  .contact-panel { grid-template-columns: 1fr; }
  .cp-info { padding: 40px 32px; }
  .cp-mark { margin-top: 32px; }
  .cp-form { padding: 38px 32px 34px; }
  .presence-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .cform { grid-template-columns: 1fr; }
  .contact-hero { padding: 116px 0 80px; }
  .contact-stage { padding-top: 56px; }
}
