/* ==========================================================================
   Contact page: Dexel core look (same base as the homepage, css/pages/home.css).
   Black, white and green. Press Start 2P for headings and labels, Inter for reading.
   Cards have 2px borders, small corners and hard offset shadows; motion is stepped and
   all of it stops under reduced motion. Every class is prefixed `ct-`.
   The header scene is drawn by js/pages/contact-scene.js, the copy button by js/pages/contact.js.
   ========================================================================== */

.ct-body {
  --ct-bg: #FFFFFF;
  --ct-ink: #0B0B0B;
  --ct-text: #3D3D3D;
  --ct-mute: #5C5C5C;
  --ct-card: #F6F6F4;
  --ct-edge: #0B0B0B;
  --ct-shadow: #0B0B0B;
  --ct-focus: var(--dx-green-text, #1F7A34);
  --ct-error: #B42318;
  --ct-pixel: var(--font-pixel, 'Press Start 2P', ui-monospace, monospace);
  --ct-step: steps(3, end);
  background: var(--ct-bg);
  color: var(--ct-text);
  font-family: var(--font-sans);
  overflow-x: hidden;
}
[data-theme="dark"] .ct-body {
  --ct-bg: #0A0A0A;
  --ct-ink: #FFFFFF;
  --ct-text: #CFCFCF;
  --ct-mute: #A8A8A8;
  --ct-card: #121212;
  --ct-edge: #4A4A4A;
  --ct-shadow: #2A2A2A;
  --ct-focus: var(--dx-green, #3FAE4F);
  --ct-error: #FF8A80;
}
.ct-body .nav-bar { background-color: var(--ct-bg); }
.ct-body .brand-logo, .ct-body .polar-footer-brand-logo { image-rendering: pixelated; border-radius: 4px; }

.ct { display: block; flex: 1; }
.ct img { image-rendering: pixelated; }
.ct-wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.ct a:focus-visible, .ct button:focus-visible { outline: 3px solid var(--ct-focus); outline-offset: 3px; }

/* --- type ------------------------------------------------------------------------------------------ */
.ct-title, .ct-h2 {
  font-family: var(--ct-pixel);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ct-ink);
  text-wrap: balance;
}
.ct-title { font-size: clamp(22px, 3.4vw, 36px); line-height: 1.4; margin: 0 0 20px; }
.ct-h2 { font-size: clamp(14px, 1.6vw, 18px); line-height: 1.5; margin: 0 0 20px; }
.ct-lede { font-size: 18px; line-height: 1.6; margin: 0; max-width: 42ch; color: var(--ct-text); }
.ct-text { font-size: 16px; line-height: 1.6; margin: -8px 0 20px; color: var(--ct-text); }
.ct-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--ct-pixel);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--dx-green-text);
}
.ct-label img { width: 24px; height: 24px; }

/* --- header: words on the left, the street at night (or by day) on the right -------------------------- */
.ct-hero { padding: 64px 0 56px; }
.ct-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.ct-scene {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 160 / 100;
  image-rendering: pixelated;
  background: #0E1230;
  border: 3px solid #0B0B0B;
  border-radius: 6px;
  box-shadow: 8px 8px 0 var(--dx-green);
}
[data-theme="light"] .ct-scene { background: #7CC8FF; }

/* --- groups ---------------------------------------------------------------------------------------- */
.ct-body-inner { padding-bottom: 96px; }
.ct-group { padding-top: 40px; }
.ct-group + .ct-group { margin-top: 24px; }
.ct-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.ct-list > li { min-width: 0; }

/* --- cards: a flat card, a hard shadow, lifts on hover and presses in on click ------------------------- */
.ct-card, .ct-feature {
  position: relative;
  background: var(--ct-card);
  border: 2px solid var(--ct-edge);
  border-radius: 6px;
  box-shadow: 6px 6px 0 var(--ct-shadow);
  text-decoration: none;
  color: var(--ct-text);
  transition: transform 120ms var(--ct-step), box-shadow 120ms var(--ct-step);
}
a.ct-card, .ct-card-link {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 16px;
  grid-template-areas:
    "icon title arrow"
    "icon handle arrow";
  column-gap: 16px;
  row-gap: 8px;
  align-items: center;
  padding: 18px 20px;
  min-height: 76px;
  text-decoration: none;
  color: inherit;
}
.ct-card:hover, .ct-feature:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--dx-green); }
.ct-card:active, .ct-feature:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--dx-green); }
.ct-card:hover .ct-icon { animation: ct-hop 360ms steps(3, end); }

.ct-icon { grid-area: icon; width: 32px; height: 32px; }
.ct-card-title {
  grid-area: title;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--ct-pixel);
  font-size: 12px;
  line-height: 1.4;
  color: var(--ct-ink);
}
.ct-card-handle {
  grid-area: handle;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ct-mute);
  overflow-wrap: anywhere;
}
.ct-arrow { grid-area: arrow; display: flex; color: var(--ct-ink); }
.ct-card:hover .ct-arrow { animation: ct-nudge 360ms steps(3, end); }
.ct-tag {
  font-family: var(--ct-pixel);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--dx-green-text);
  border: 2px solid currentColor;
  border-radius: 4px;
  padding: 4px 6px;
}

/* Email: the card is a link with a separate Copy button beside it */
.ct-card-split { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.ct-card-split .ct-card-link { grid-template-columns: 32px minmax(0, 1fr); grid-template-areas: "icon title" "icon handle"; padding-right: 8px; }
.ct-card-split:active { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--dx-green); }
.ct-card-split .ct-card-link:focus-visible { outline-offset: -3px; border-radius: 4px; }

.ct-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-right: 16px;
  padding: 0 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ct-ink);
  background: var(--ct-bg);
  border: 2px solid var(--ct-ink);
  border-radius: 4px;
  box-shadow: 0 4px 0 var(--ct-ink);
  cursor: pointer;
  transition: transform 120ms var(--ct-step), box-shadow 120ms var(--ct-step);
}
.ct-copy:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ct-ink); }
.ct-copy:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ct-ink); }
.ct-copy-icon { display: none; width: 16px; height: 16px; }
.ct-copy[data-state="busy"] { cursor: progress; }
.ct-copy[data-state="busy"] .ct-copy-text { animation: ct-blink 500ms steps(2, end) infinite; }
.ct-copy[data-state="done"] { background: var(--dx-green); color: var(--dx-on-green); border-color: #0B0B0B; box-shadow: 0 4px 0 #23803A; }
.ct-copy[data-state="done"] .ct-copy-icon { display: block; }
.ct-copy[data-state="error"] { border-color: var(--ct-error); color: var(--ct-error); box-shadow: 0 4px 0 var(--ct-error); }
.ct-copy-status { min-height: 1.4em; margin: 12px 0 0; font-size: 14px; line-height: 1.4; color: var(--ct-mute); }
.ct-copy-status.is-error { color: var(--ct-error); }

/* --- the Discord server: the main way in, with the green button ----------------------------------- */
.ct-feature {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: 6px 6px 0 var(--dx-green);
}
.ct-feature-icon { width: 48px; height: 48px; }
.ct-feature:hover .ct-feature-icon { animation: ct-hop 360ms steps(3, end); }
.ct-feature-copy { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ct-feature-title { font-family: var(--ct-pixel); font-size: 16px; line-height: 1.4; color: var(--ct-ink); }
.ct-feature-text { font-size: 16px; line-height: 1.55; color: var(--ct-text); max-width: 52ch; }
.ct-feature-handle { font-size: 15px; color: var(--ct-mute); overflow-wrap: anywhere; }
.ct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--dx-green);
  color: var(--dx-on-green);
  border: 2px solid #0B0B0B;
  box-shadow: 0 4px 0 #23803A;
  transition: transform 120ms var(--ct-step), box-shadow 120ms var(--ct-step);
}
.ct-feature:hover .ct-btn { transform: translateY(-2px); box-shadow: 0 6px 0 #23803A; }
.ct-feature:active .ct-btn { transform: translateY(3px); box-shadow: 0 1px 0 #23803A; }

/* --- motion ---------------------------------------------------------------------------------------- */
@keyframes ct-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes ct-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@keyframes ct-blink { 0% { opacity: 1; } 100% { opacity: 0.55; } }

/* --- small screens --------------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .ct-hero { padding: 40px 0 32px; }
  .ct-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ct-list { grid-template-columns: minmax(0, 1fr); }
  .ct-feature { grid-template-columns: 48px minmax(0, 1fr); }
  .ct-btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 520px) {
  .ct-wrap { padding: 0 16px; }
  .ct-lede { font-size: 16px; }
  .ct-scene { box-shadow: 5px 5px 0 var(--dx-green); }
  .ct-card, .ct-feature { box-shadow: 4px 4px 0 var(--ct-shadow); }
  .ct-feature { box-shadow: 4px 4px 0 var(--dx-green); padding: 18px; gap: 16px; }
  .ct-btn { width: 100%; }
  a.ct-card, .ct-card-link { padding: 16px; column-gap: 14px; }
  .ct-card-split { grid-template-columns: minmax(0, 1fr); }
  .ct-copy { margin: 0 16px 16px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-card, .ct-feature, .ct-copy, .ct-btn { transition: none; }
  .ct-card:hover, .ct-card:active, .ct-feature:hover, .ct-feature:active,
  .ct-copy:hover, .ct-copy:active, .ct-feature:hover .ct-btn, .ct-feature:active .ct-btn { transform: none; }
  .ct-card:hover .ct-icon, .ct-card:hover .ct-arrow, .ct-feature:hover .ct-feature-icon,
  .ct-copy[data-state="busy"] .ct-copy-text { animation: none; }
}
