/* ============================================================
   Synexian — Contact page (cream theme, home-derived family)
   Its own structure: no stacked hero-then-sections. The message
   console IS the page — a sticky intro column beside an ink
   terminal window, followed by an animated signal path and a
   mega-type email finale. New-to-the-site animation set: ticker
   strip, headline word rotator, console typewriter, click-to-
   copy, flowing connection path. Still light-motion: CSS + tiny
   rAF/interval JS, no vendor libs.
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- 1. ticker strip ---------- */
.ticker {
  background: var(--ink-900);
  color: var(--cream);
  border-bottom: 1px solid rgba(240, 235, 218, 0.1);
  overflow: hidden;
  padding: 0.55rem 0;
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  width: max-content;
  animation: ticker-scroll 28s linear infinite;
}
@keyframes ticker-scroll {
  to { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 2.2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(240, 235, 218, 0.75);
  white-space: nowrap;
}
.ticker-item i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

/* ---------- 2. stage — sticky intro + console ---------- */
.stage {
  position: relative;
  overflow: clip;
  padding: 5rem 0 6rem;
}
.grid-paper {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 15%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 15%, #000 30%, transparent 75%);
}
.stage .dot {
  position: absolute;
  border-radius: 50%;
  opacity: 0.85;
  animation: dot-drift 9s ease-in-out infinite alternate;
}
.dot-amber { width: 18px; height: 18px; background: var(--amber); top: 14%; left: 5%; }
.dot-coral { width: 13px; height: 13px; background: var(--coral); top: 78%; left: 42%; animation-delay: -3s; }
.dot-olive { width: 15px; height: 15px; background: var(--olive); top: 8%; left: 58%; animation-delay: -6s; }
@keyframes dot-drift {
  to { transform: translate(14px, -20px); }
}

.stage-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.stage-left { position: sticky; top: calc(var(--nav-h) + 2rem); }
.stage-left > * { animation: rise-in 0.9s var(--ease-out) both; }
.stage-left > *:nth-child(2) { animation-delay: 0.07s; }
.stage-left > *:nth-child(3) { animation-delay: 0.14s; }
.stage-left > *:nth-child(4) { animation-delay: 0.21s; }
.stage-left > *:nth-child(5) { animation-delay: 0.28s; }
.stage-right { animation: rise-in 0.9s 0.18s var(--ease-out) both; }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(22px); }
}

.tagline {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1.3rem;
}
.stage-left h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* headline word rotator */
.rotate-wrap {
  display: inline-grid;
  overflow: hidden;
  vertical-align: bottom;
  border-bottom: 3px solid var(--amber);
  padding: 0 0.12em;
}
.rotator {
  color: var(--amber-deep);
  display: inline-block;
  min-width: 4.2ch;
}
.rotator.out { animation: word-out 0.3s var(--ease-out) both; }
.rotator.in { animation: word-in 0.35s var(--ease-out) both; }
@keyframes word-out {
  to { opacity: 0; transform: translateY(-105%); }
}
@keyframes word-in {
  from { opacity: 0; transform: translateY(105%); }
}

.stage-sub {
  margin: 1.4rem 0 2rem;
  max-width: 46ch;
  font-size: 1.06rem;
  color: var(--text-dim);
}

/* availability card */
.status-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  display: grid;
  gap: 0.7rem;
  box-shadow: 0 16px 36px -26px rgba(20, 36, 48, 0.35);
}
.status-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.94rem;
}
.status-row.muted { color: var(--text-dim); font-size: 0.88rem; }
.status-row svg { width: 16px; height: 16px; flex: none; color: var(--amber-deep); }
.status-pulse {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--olive);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--olive) 55%, transparent);
  animation: status-ping 2s ease-out infinite;
}
@keyframes status-ping {
  70% { box-shadow: 0 0 0 9px transparent; }
}

/* quick contact lines */
.quick-lines { display: grid; gap: 0.55rem; margin-top: 1.1rem; }
.quick-line {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  background: none;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.94rem;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease-out);
}
.quick-line:hover {
  border-color: var(--amber);
  border-style: solid;
  background: var(--surface-2);
  transform: translateX(4px);
}
.quick-line svg { width: 17px; height: 17px; flex: none; color: var(--amber-deep); }
.quick-line em {
  margin-left: auto;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---------- the message console ---------- */
.console {
  background: var(--ink-800);
  color: var(--cream);
  border: 1px solid rgba(20, 36, 48, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -35px rgba(20, 36, 48, 0.55);
  overflow: hidden;
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1.1rem;
  background: var(--ink-900);
  border-bottom: 1px solid rgba(240, 235, 218, 0.12);
}
.win-dots { display: inline-flex; gap: 6px; }
.win-dots i { width: 11px; height: 11px; border-radius: 50%; }
.win-dots i:nth-child(1) { background: var(--amber); }
.win-dots i:nth-child(2) { background: var(--coral); }
.win-dots i:nth-child(3) { background: var(--olive); }
.win-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: rgba(240, 235, 218, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.win-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--olive);
}
.win-live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--olive);
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
  50% { opacity: 0.35; }
}

.console-body { padding: 1.5rem 1.6rem 1.7rem; }
.type-line {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: rgba(240, 235, 218, 0.85);
  min-height: 1.5em;
  margin-bottom: 1.2rem;
}
.type-line .prompt { color: var(--olive); margin-right: 0.5rem; }
.caret {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  vertical-align: text-bottom;
  background: var(--amber);
  margin-left: 2px;
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink {
  50% { opacity: 0; }
}

.console-form { display: grid; gap: 1.05rem; animation: rise-in 0.5s var(--ease-out) both; }
.console-form[hidden] { display: none; }
.c-field { display: grid; gap: 0.4rem; }
.c-field label, .c-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--amber);
}
.c-field input,
.c-field textarea {
  width: 100%;
  background: rgba(240, 235, 218, 0.06);
  border: 1px solid rgba(240, 235, 218, 0.22);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  transition: border-color 0.2s, background-color 0.2s;
}
.c-field input:focus-visible,
.c-field textarea:focus-visible {
  outline: none;
  border-color: var(--amber);
  background: rgba(240, 235, 218, 0.09);
}
.c-field textarea { min-height: 130px; resize: vertical; }
.c-field input.invalid,
.c-field textarea.invalid { border-color: var(--coral); }
.c-field .field-err {
  font-size: 0.78rem;
  color: var(--coral);
  display: none;
}
.c-field input.invalid ~ .field-err,
.c-field textarea.invalid ~ .field-err { display: block; }

.topic-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.topic-chips .chip {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 235, 218, 0.25);
  background: transparent;
  color: rgba(240, 235, 218, 0.7);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.topic-chips .chip:hover { border-color: var(--amber); color: var(--cream); }
.topic-chips .chip.on {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink-900);
  font-weight: 500;
}

.console-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.3rem;
}
.console-actions .btn { min-height: 46px; }
.tx-note {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: rgba(240, 235, 218, 0.4);
  max-width: 24ch;
}

/* transmission log */
.tx-log {
  display: grid;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: rgba(240, 235, 218, 0.75);
}
.tx-log:not(:empty) { margin-top: 1.2rem; }
.tx-log .tx-row { animation: rise-in 0.3s var(--ease-out) both; }
.tx-log .tx-row .ok { color: var(--olive); }
.tx-log .tx-row .prompt { color: var(--olive); margin-right: 0.5rem; }

/* ---------- 3. signal path ---------- */
.path { padding: 6rem 0; background: var(--surface); border-block: 1px solid var(--line); }
.path .section-head { margin-bottom: 3.4rem; }

.path-line {
  position: relative;
  height: 22px;
  margin: 0 8px 2rem;
}
.path-dash {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 0;
  border-top: 2px dashed var(--line-strong);
}
/* the travelling signal */
.path-pulse {
  position: absolute;
  top: 50%;
  left: 0;
  width: 10px;
  height: 10px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px 2px color-mix(in srgb, var(--amber) 55%, transparent);
  animation: pulse-travel 5s var(--ease-out) infinite;
}
@keyframes pulse-travel {
  0% { left: 0; opacity: 0; }
  8% { opacity: 1; }
  46% { left: 50%; }
  54% { left: 50%; }
  92% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
.path-node {
  position: absolute;
  top: 50%;
  left: var(--at);
  width: 16px;
  height: 16px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--amber-deep);
}
.path-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.path-step { max-width: 34ch; }
.path-step:nth-child(2) { justify-self: center; text-align: center; }
.path-step:nth-child(3) { justify-self: end; text-align: right; }
.ps-when {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber-deep);
}
.path-step h3 { font-size: 1.25rem; margin: 0.5rem 0 0.45rem; }
.path-step p { color: var(--text-dim); font-size: 0.94rem; }

/* ---------- 4. channels ---------- */
.channels { padding: 6rem 0; }
.channels .section-head { margin-bottom: 2.8rem; }
.chan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.chan-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: var(--surface-2);
  text-decoration: none;
}
.chan-card:hover {
  border-color: var(--amber);
  transform: translateY(-5px);
  box-shadow: 0 22px 48px -26px rgba(20, 36, 48, 0.4);
}
.chan-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c, var(--amber));
}
.chan-card h3 { font-size: 1.2rem; }
.chan-card p { color: var(--text-dim); font-size: 0.94rem; flex: 1; }
.chan-card .go {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--amber-deep);
}
.chan-card .go svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease-out); }
.chan-card:hover .go svg { transform: translateX(4px); }

/* ---------- 5. mega mail finale ---------- */
.mega {
  padding: 7rem 0 8rem;
  background: var(--ink-800);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.mega::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(240, 235, 218, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 235, 218, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 60%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 60%, #000 25%, transparent 75%);
}
.mega-inner { position: relative; text-align: center; }
.mega .eyebrow { justify-content: center; }
.mega-mail {
  display: block;
  margin: 2rem 0 2.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 7.2vw, 5.6rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-decoration: none;
  color: var(--cream);
  overflow-wrap: anywhere;
}
.mega-mail span {
  background-image: linear-gradient(var(--amber), var(--amber));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 0.08em;
  transition: background-size 0.5s var(--ease-out), color 0.3s;
}
.mega-mail:hover span { background-size: 100% 0.08em; color: var(--amber); }
.mega-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: rgba(240, 235, 218, 0.6);
  font-size: 0.95rem;
}
.cta-dots { display: inline-flex; gap: 8px; }
.cta-dots i { width: 11px; height: 11px; border-radius: 50%; }
.cta-dots i:nth-child(1) { background: var(--amber); }
.cta-dots i:nth-child(2) { background: var(--coral); }
.cta-dots i:nth-child(3) { background: var(--olive); }

/* reveal helper delays are set inline by contact.js */

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .stage-grid { grid-template-columns: 1fr; }
  .stage-grid > *, .stage-left > *, .console, .console-body, .console-head > * { min-width: 0; max-width: 100%; }
  .console-form input, .console-form textarea { width: 100%; min-width: 0; }
  .type-line { overflow-wrap: anywhere; }
  .stage-left { position: static; }
  .chan-grid { grid-template-columns: 1fr; }
  .path-steps { grid-template-columns: 1fr; gap: 2rem; }
  .path-step:nth-child(2), .path-step:nth-child(3) { justify-self: start; text-align: left; }
  .path-line { display: none; }
}
@media (max-width: 680px) {
  .stage { padding: 3.5rem 0 4.5rem; }
  .path, .channels { padding: 4rem 0; }
  .console-actions { align-items: flex-start; flex-direction: column; }
}
