/* styles/contact.css - the contact panel (scripts/contact.js), every page. A full-page cartoon,
   over the top on purpose (Maj, 2026-10-17): sunburst sky, halftone dots, ink outlines, hard
   shadows, stickers. Its own colours and nothing from the page's theme, so it is the same on
   every page and in every theme. */

.ct {
  --ink: #141414;
  --sun: #ffd84d;
  --sun-2: #ffe887;
  --pink: #ff6fb1;
  --blue: #59a8ff;
  --mint: #5fe3a1;
  --red: #ff4d4d;
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--sun);
  color: var(--ink);
  font-family: "Instrument Sans", "Instrument Fallback", system-ui, sans-serif;
}
.ct[open] {
  display: grid;
  place-items: center;
}
.ct::backdrop {
  background: var(--ink);
}
.ct *,
.ct *::before,
.ct *::after {
  box-sizing: border-box;
}

/* The sky: rays turning slowly behind halftone dots. */
.ct__sky {
  position: fixed;
  inset: -50vmax;
  background:
    radial-gradient(rgb(20 20 20 / 0.13) 2px, transparent 2.6px) 0 0 / 18px 18px,
    repeating-conic-gradient(from 0deg at 50% 50%, var(--sun) 0deg 9deg, var(--sun-2) 9deg 18deg);
  animation: ct-turn 90s linear infinite;
}
@keyframes ct-turn {
  to { transform: rotate(1turn); }
}

.ct__deco {
  position: fixed;
  width: 160px;
  height: 160px;
  fill: var(--pink);
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linejoin: round;
  pointer-events: none;
  animation: ct-spin 14s linear infinite;
}
.ct__deco--a { top: -40px; left: -30px; }
.ct__deco--b { right: 6vw; bottom: -50px; width: 220px; height: 220px; fill: var(--mint); animation-duration: 20s; animation-direction: reverse; }
.ct__deco--c { right: 38vw; top: 8vh; width: 70px; height: 70px; fill: var(--blue); }
@keyframes ct-spin {
  to { transform: rotate(1turn); }
}

.ct__x {
  position: fixed;
  top: 12px;
  right: 14px;                          /* above the VR switch (top 64px), never under it */
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer;
  transform: rotate(-8deg);
  transition: transform 160ms cubic-bezier(.34, 1.56, .64, 1), box-shadow 160ms;
}
.ct__x:hover { transform: rotate(90deg) scale(1.08); }
.ct__x:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.ct__x .ct__icon { width: 22px; height: 22px; stroke-width: 3.5; }

.ct__wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  width: min(1120px, 100%);
  padding: clamp(80px, 9vh, 120px) clamp(16px, 4vw, 48px) 48px;
}

/* The word, letter by letter: outlined, shadowed, each at its own tilt, popping in one after
   another. */
.ct__h {
  margin: 0 0 28px;
  font-family: "Newsreader Display", "Newsreader Fallback", Georgia, serif;
  font-size: clamp(56px, 8.4vw, 120px);
  font-style: italic;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.ct__l {
  display: inline-block;
  color: var(--pink);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  text-shadow: 6px 6px 0 var(--ink);
  transform: rotate(calc((var(--i) - 3) * 3deg)) translateY(calc(sin(var(--i) * 1.3rad) * 8px));
  animation: ct-pop 520ms cubic-bezier(.34, 1.56, .64, 1) both;
  animation-delay: calc(var(--i) * 45ms);
}
.ct__l:nth-child(3n + 2) { color: var(--blue); }
.ct__l:nth-child(3n) { color: var(--mint); }
@keyframes ct-pop {
  from { opacity: 0; transform: translateY(60px) scale(0.3) rotate(-30deg); }
}

.ct__picks {
  display: grid;
  gap: 18px;
}
.ct__card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  border: 4px solid var(--ink);
  border-radius: 22px;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  font: inherit;
  box-shadow: 7px 7px 0 var(--ink);
  cursor: pointer;
  transform: rotate(var(--tilt, -2deg));
  transition: transform 180ms cubic-bezier(.34, 1.56, .64, 1), box-shadow 180ms;
  animation: ct-pop 560ms cubic-bezier(.34, 1.56, .64, 1) both;
}
.ct__card--li { background: var(--blue); --tilt: -2.5deg; animation-delay: 260ms; }
.ct__card--gh { background: var(--mint); --tilt: 1.8deg; animation-delay: 340ms; }
.ct__card--form { background: var(--pink); --tilt: -1.2deg; animation-delay: 420ms; }
.ct__card:hover {
  transform: rotate(0deg) translate(-3px, -3px) scale(1.03);
  box-shadow: 11px 11px 0 var(--ink);
}
.ct__card:active {
  transform: translate(5px, 5px);
  box-shadow: 2px 2px 0 var(--ink);
}
.ct__card[hidden] { display: none; }
.ct__icon {
  flex: none;
  width: 44px;
  height: 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ct__card .ct__icon {
  width: 56px;
  height: 56px;
  padding: 8px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
}
.ct__card--li .ct__icon { fill: var(--ink); stroke: none; }
.ct__t { display: grid; gap: 2px; min-width: 0; }
.ct__t strong { font-size: 26px; font-weight: 650; line-height: 1.1; }
.ct__t small { font-size: 15px; font-weight: 600; opacity: 0.75; overflow-wrap: anywhere; }

/* The form: a speech bubble. */
.ct__form,
.ct__done {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 4px solid var(--ink);
  border-radius: 30px;
  background: #fff;
  box-shadow: 10px 10px 0 var(--ink);
  transform: rotate(1.2deg);
  animation: ct-pop 600ms cubic-bezier(.34, 1.56, .64, 1) 200ms both;
}
.ct__form::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 64px;
  width: 44px;
  height: 36px;
  border: 4px solid var(--ink);
  border-right: 0;
  border-top: 0;
  background: #fff;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  transform: skewY(-18deg);
}
.ct__form[hidden],
.ct__done[hidden] { display: none; }
.ct__f { display: grid; gap: 6px; }
.ct__fl { font-size: 17px; font-weight: 650; }
.ct__in {
  width: 100%;
  padding: 12px 14px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #fffaf0;
  color: var(--ink);
  font: 500 17px/1.4 "Instrument Sans", "Instrument Fallback", system-ui, sans-serif;
  box-shadow: 4px 4px 0 var(--ink);
  transition: box-shadow 140ms, transform 140ms, background-color 140ms;
}
textarea.ct__in { resize: vertical; min-height: 128px; }
.ct__in::placeholder { color: #6b6b6b; }
.ct__in:focus {
  outline: none;
  background: #fff6b8;
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}
.ct__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.ct__human:empty { display: none; }
.ct__send {
  justify-self: start;
  min-height: 60px;
  padding: 0 36px;
  border: 4px solid var(--ink);
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font: 650 24px/1 "Instrument Sans", "Instrument Fallback", system-ui, sans-serif;
  letter-spacing: 0.01em;
  text-shadow: 2px 2px 0 var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  cursor: pointer;
  transform: rotate(-2deg);
  transition: transform 160ms cubic-bezier(.34, 1.56, .64, 1), box-shadow 160ms;
}
.ct__send:hover { animation: ct-wiggle 400ms ease-in-out; }
.ct__send:active { transform: translate(5px, 5px); box-shadow: 1px 1px 0 var(--ink); }
.ct__send:disabled { opacity: 0.6; cursor: progress; }
@keyframes ct-wiggle {
  25% { transform: rotate(3deg) scale(1.05); }
  50% { transform: rotate(-4deg) scale(1.05); }
  75% { transform: rotate(2deg) scale(1.05); }
}
.ct__said { margin: 0; min-height: 1.4em; font-size: 16px; font-weight: 600; }
.ct__said.is-bad { color: #c41d1d; }

.ct__done { place-items: center; padding: 48px 28px; }
.ct__done-burst {
  width: 220px;
  height: 220px;
  fill: var(--sun);
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linejoin: round;
  animation: ct-spin 12s linear infinite;
}
.ct__done-t {
  position: absolute;
  margin: 0;
  font-family: "Newsreader Display", "Newsreader Fallback", Georgia, serif;
  font-size: 64px;
  font-style: italic;
  font-weight: 700;
  color: var(--red);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-8deg);
}

.ct :focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 4px;
}
.ct .ct__in:focus-visible { outline: none; }

@media (max-width: 760px) {
  .ct[open] { place-items: start center; }
  .ct__wrap { grid-template-columns: 1fr; padding-top: 88px; }
  .ct__h { margin-bottom: 18px; }
  .ct__form::before { display: none; }
  .ct__deco--c { display: none; }
  .ct__deco--a { width: 90px; height: 90px; top: -30px; left: -30px; }
}
@media (prefers-reduced-motion: reduce) {
  .ct *,
  .ct *::before,
  .ct *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .ct__card, .ct__form, .ct__in, .ct__send, .ct__x { border-color: CanvasText; }
}
