/* ═══════════════════════════════════════════════════════════════
   PRAANA — TAB 4 · CONTACT
   "Reach out & team". Doors, form, team marks, closing band.
   Every colour comes from css/tokens.css. Prefix: c-
   ═══════════════════════════════════════════════════════════════ */

/* ── shared bits ──────────────────────────────────────────── */
.c-sec-h {
  font-size: var(--t-h3);
  letter-spacing: -.03em;
  margin-bottom: .9rem;
}

.c-inline-link {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-line);
  transition: border-color .25s var(--ease);
}
.c-inline-link:hover { border-bottom-color: var(--accent); }

/* ── 1. pane head ─────────────────────────────────────────── */
.c-head { position: relative; overflow: hidden; padding-bottom: clamp(2.5rem, 5vh, 4rem); }

/* ascii-hero mounted as an ambient background — the typewriter stays
   live, tucked in the bottom-right corner so it never collides with
   the "Contact Us" title or the email address up top; the sparkline,
   head chip and axis gizmo are stripped. Darkened and masked to
   transparent toward the bottom so it never fights the doors section
   below it. */
.c-ascii-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .82;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 68%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 68%, transparent 100%);
}
/* every level down to the panel is absolutely positioned and filled —
   the module's own flex/auto-height chrome can't be trusted to resolve
   a percentage height, so each layer fills its ancestor directly */
.c-ascii-bg > div,
.c-ascii-bg .mx-ascii,
.c-ascii-bg .mx-ascii-stack {
  position: absolute;
  inset: 0;
}
.c-ascii-bg .mx-ascii-head,
.c-ascii-bg .mx-ascii-gizmo,
.c-ascii-bg .mx-ascii-spark { display: none; }
.c-ascii-bg .mx-ascii-typer-in {
  top: auto;
  left: auto;
  right: var(--gut);
  bottom: 14px;
  max-width: min(320px, calc(100% - 108px));
}
.c-ascii-bg .mx-ascii-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.c-head-in { position: relative; z-index: 1; max-width: 68ch; }

.c-title {
  font-size: var(--t-h1);
  letter-spacing: -.045em;
  margin: 1.1rem 0 1.4rem;
  max-width: 18ch;
}

.c-lede { max-width: 64ch; }

.c-head-fine {
  position: absolute;
  top: clamp(1.4rem, 3.2vh, 2.2rem);
  right: var(--gut);
  z-index: 2;
  margin: 0;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── 2. the three doors ───────────────────────────────────── */
.c-door-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 1.8vw, 1.6rem);
  margin-top: 2rem;
}

.c-door {
  --c-mx: 50%;
  --c-my: 0%;
  --c-rx: 0deg;
  --c-ry: 0deg;
  --c-lift: 0px;
  position: relative;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--sh-1);
  overflow: hidden;
  transform: perspective(1100px) rotateX(var(--c-rx)) rotateY(var(--c-ry)) translateZ(0);
  transform-style: preserve-3d;
  transition:
    box-shadow .45s var(--ease),
    border-color .45s var(--ease),
    transform .22s var(--ease-out);
  will-change: transform;
}
.c-door::after {
  /* accent hairline along the top edge */
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 2px;
  background: var(--accent);
  opacity: .5;
  transition: opacity .45s var(--ease);
}
.c-door:hover,
.c-door:focus-within {
  border-color: var(--accent-line);
  box-shadow: var(--sh-3);
}
.c-door:hover::after,
.c-door:focus-within::after { opacity: 1; }

/* pointer-following highlight — driven by --c-mx / --c-my from js */
.c-door-glow {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    38% 46% at var(--c-mx) var(--c-my),
    var(--accent-soft) 0%,
    transparent 72%
  );
  transition: opacity .4s var(--ease);
}
.c-door:hover .c-door-glow,
.c-door:focus-within .c-door-glow { opacity: 1; }

.c-door-body {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 2.1vw, 2rem);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.c-door-k {
  font-family: var(--mono);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .8rem;
}

.c-door-h {
  font-size: 1.34rem;
  line-height: 1.14;
  letter-spacing: -.035em;
  margin-bottom: .95rem;
  text-wrap: balance;
}

.c-door p {
  font-size: .955rem;
  line-height: 1.62;
  color: var(--ink-2);
  margin-bottom: .7rem;
}
.c-door b { color: var(--ink); font-weight: 640; }

.c-door-fine {
  margin-top: auto;
  padding-top: 1rem;
}

.c-door-go {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  align-self: flex-start;
  margin-top: 1.05rem;
  padding: .55rem .95rem .55rem 0;
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: -.012em;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-line);
  transition: gap .3s var(--ease), border-color .3s var(--ease);
}
.c-door-go span { transition: transform .3s var(--ease-out); }
.c-door-go:hover { border-bottom-color: var(--accent); }
.c-door-go:hover span { transform: translateX(3px); }

/* ── 3. the form ──────────────────────────────────────────── */
.c-form-shell {
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: start;
}

.c-form-say {
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 40ch;
}

.c-form-list {
  list-style: none;
  margin: 1.2rem 0 1.4rem;
  padding: 0;
  border-top: 1px dashed var(--rule);
}
.c-form-list li {
  display: flex;
  gap: .6rem;
  padding: .62rem 0;
  border-bottom: 1px dashed var(--rule);
  font-size: .92rem;
  color: var(--ink-3);
}
.c-form-list li span { color: var(--accent); }

.c-form-fine { letter-spacing: 0; }

.c-form-card {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--sh-2);
  padding: clamp(1.4rem, 2.4vw, 2.2rem);
}

.c-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.05rem;
}
.c-form[hidden] { display: none; }
.c-field { display: flex; flex-direction: column; }
.c-field:nth-child(3),
.c-field:nth-child(4),
.c-form-foot { grid-column: 1 / -1; }
/* the select does not need the full measure */
.c-field:nth-child(3) .c-select-wrap { max-width: 22rem; }

.c-label {
  font-family: var(--mono);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .45rem;
}

.c-input {
  width: 100%;
  font-family: var(--sans);
  font-size: .96rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: var(--r);
  padding: .74rem .9rem;
  transition: border-color .25s var(--ease), background .25s var(--ease),
              box-shadow .25s var(--ease);
  appearance: none;
}
.c-input::placeholder { color: var(--ink-4); }
.c-input:hover { border-color: var(--rule-strong); }
.c-input:focus {
  outline: none;
  background: var(--card);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.c-input:focus-visible { outline: none; }
.c-input[aria-invalid="true"] {
  border-color: var(--red);
  background: var(--red-soft);
}

.c-textarea { resize: vertical; min-height: 8.5rem; }

.c-select-wrap { position: relative; }
.c-select { padding-right: 2.4rem; cursor: pointer; }
.c-select-arrow {
  position: absolute;
  right: .95rem; top: 50%;
  width: 7px; height: 7px;
  margin-top: -5px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(45deg);
  pointer-events: none;
}

.c-err {
  font-family: var(--mono);
  font-size: var(--t-fine);
  line-height: 1.45;
  color: var(--red);
  margin: .42rem 0 0;
}
.c-err[hidden] { display: none; }

.c-form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: .3rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}
.c-submit[aria-busy="true"] { opacity: .62; pointer-events: none; }
.c-form-note { max-width: 34ch; letter-spacing: 0; }

.c-status {
  font-family: var(--mono);
  font-size: var(--t-fine);
  line-height: 1.5;
  color: var(--ink-3);
}
.c-status:not(:empty) { margin-top: 1rem; }
.c-status.is-err { color: var(--red); }
.c-status.is-ok { color: var(--green); }

.c-done { text-align: left; }
.c-done[hidden] { display: none; }
.c-done-h {
  font-size: var(--t-h3);
  letter-spacing: -.03em;
  margin-bottom: .6rem;
}
.c-done-h:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.c-done-p { font-size: .975rem; color: var(--ink-2); max-width: 46ch; }
.c-done-alt { margin-top: .6rem; }
.c-done-alt[hidden] { display: none; }
.c-again { margin-top: 1.2rem; }

/* ── 4. the team ──────────────────────────────────────────── */
.c-team-lede { max-width: 58ch; margin-top: .2rem; }

.c-team-grid {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.9rem, 1.6vw, 1.4rem);
}

.c-person {
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
  padding: clamp(1.2rem, 1.8vw, 1.6rem);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--sh-1);
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease),
              transform .35s var(--ease-out);
}
.c-person:hover {
  border-color: var(--accent-line);
  box-shadow: var(--sh-2);
  transform: translateY(-2px);
}

.c-av {
  position: relative;
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
}
.c-av-cv { width: 100%; height: 100%; }
.c-av-i {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: .96rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ink);
}

.c-person-n {
  font-size: 1.08rem;
  letter-spacing: -.03em;
  margin-bottom: .3rem;
}
.c-person-r {
  font-family: var(--mono);
  font-size: var(--t-fine);
  line-height: 1.45;
  color: var(--accent);
  margin-bottom: .55rem;
}
.c-person-li {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--t-fine);
}
.c-person-x {
  font-size: .93rem;
  line-height: 1.58;
  color: var(--ink-3);
}

.c-team-fine { margin-top: 1.6rem; }

/* ── 5. closing band ──────────────────────────────────────── */
.c-close {
  padding: clamp(4.5rem, 12vh, 8.5rem) 0;
  border-top: 1px solid var(--rule);
  background:
    radial-gradient(90% 120% at 50% 0%, var(--card-tint) 0%, var(--paper) 62%);
}
.c-close-in { text-align: center; }

.c-motto {
  font-size: clamp(.86rem, 2.05vw, 1.5rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .3em;
  color: var(--ink-4);
  margin: 0 0 1.6rem;
  text-indent: .3em; /* balance the trailing letter-space */
}

.c-pledge {
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: -.028em;
  color: var(--ink);
  max-width: 34ch;
  margin: 0 auto 2rem;
  text-wrap: balance;
}

.c-close-mail { margin: 0 0 .6rem; }
.c-mail-link {
  font-family: var(--mono);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: .18rem;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.c-mail-link:hover { color: var(--green); border-bottom-color: var(--green-line); }

.c-close-fine { letter-spacing: .1em; text-transform: uppercase; }

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 1080px) {
  .c-door-grid { grid-template-columns: 1fr; }
  .c-door-fine { margin-top: 1rem; }
  .c-form-shell { grid-template-columns: 1fr; }
  .c-team-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .c-form { grid-template-columns: 1fr; }
  .c-field:nth-child(4) { grid-column: auto; }
  .c-person { flex-direction: column; gap: .9rem; }
  .c-motto { letter-spacing: .2em; }
}

/* ── reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .c-door {
    transform: none !important;
  }
  .c-door-glow { display: none; }
  .c-person:hover { transform: none; }
  .c-door-go:hover span { transform: none; }
}

/* coarse pointers never get the tilt/glow either */
@media (pointer: coarse) {
  .c-door { transform: none !important; }
  .c-door-glow { display: none; }
}
