/* ============================================================
   AIS GAMES — contact page sections
   Page head, contact form card and channel list.
   Requires: tokens.css, main.css — every value here is a token.
   ============================================================ */

/* Page head comes from main.css (.page-head / .page-title / .page-lead) */

/* ---------- Layout ---------- */
.contact-grid {
  width: var(--w-cards);
  margin-inline: auto;
  display: grid;
  grid-template-columns: var(--contact-cols);
  gap: var(--gap-cards);
  padding-block: var(--section-pad) var(--pad-section);
  /* Channels column stretches to exactly match the form's height */
  align-items: stretch;
}

/* ---------- Form card ---------- */
.contact-form {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--pad-card);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.contact-form h2 {
  font-size: var(--text-h3);
  font-weight: var(--w-heading);
  font-stretch: var(--stretch-display);
  letter-spacing: var(--tracking-display);
  margin-bottom: var(--sp-3);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.field label {
  font-weight: var(--w-ui);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-ui);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font);
  font-size: var(--text-body);
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) var(--field-mix), var(--bg));
  border: var(--border-thin) solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
  transition: border-color var(--dur-fast) var(--ease);
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--line-strong); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: var(--border-w) solid var(--accent);
  outline-offset: 0;
  border-color: transparent;
}

.field textarea {
  resize: vertical;
  min-height: var(--h-textarea);
}

/* Custom select arrow: sits exactly one field padding from the right
   edge, mirroring the text's inset on the left */
.select { position: relative; }
.select select {
  appearance: none;
  cursor: pointer;
  padding-right: calc(var(--sp-4) * 2 + var(--chevron));
}
.select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: var(--sp-4);
  width: var(--chevron);
  height: var(--chevron);
  border-right: var(--border-w) solid var(--ink-dim);
  border-bottom: var(--border-w) solid var(--ink-dim);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  transition: border-color var(--dur-fast) var(--ease);
}
.select:hover::after { border-color: var(--ink); }
.field select option { background: var(--surface); }

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-2);
}
.form-note {
  color: var(--ink-dim);
  font-size: var(--text-sm);
}

/* The bot trap: off-screen for people and screen readers, still a field for a
   script that fills in everything it finds. */
.field-trap {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form { position: relative; }

/* What happened after Send: sent, or what to fix. */
.form-status {
  font-size: var(--text-sm);
  font-weight: var(--w-ui);
  color: var(--ink);
  transition: opacity var(--dur-med) var(--ease);
}
@starting-style { .form-status { opacity: 0; } }
.form-status.is-error { color: var(--accent-text); }
.contact-form button[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Channels ---------- */
.channels {
  display: flex;
  flex-direction: column;
  gap: var(--gap-cards);
}

.channel {
  flex: 1; /* the four cards share the column height equally */
  display: flex;
  gap: var(--sp-4);
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
}

.channel img {
  width: var(--icon-channel);
  border-radius: var(--radius-icon);
  flex-shrink: 0;
}

.channel h2 {
  font-size: var(--text-lg);
  font-weight: var(--w-sub);
  margin-bottom: var(--sp-1);
}

.channel p {
  color: var(--ink-dim);
  font-size: var(--text-sm);
  margin-bottom: var(--sp-2);
}

.channel a {
  color: var(--accent-text);
  font-weight: var(--w-ui);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .contact-grid {
    width: calc(100% - var(--gutter) * 2);
    grid-template-columns: 1fr;
  }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .field input, .field select, .field textarea, .select::after, .form-status { transition: none; }
}
