/*
 * The support page (/support, src/landing/support.ts): the front page's dark and gold (src/landing/landing.css), standing on
 * its own, since the page opens without the game and its stylesheet. One column, a phone's width and a little more.
 */
@font-face {
  font-family: 'Pixelify Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/pixelify-sans-latin-400.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --bg: #0e0b0a;
  --panel: #1b1512;
  --border: #4a3828;
  --border-hi: #8a6a3c;
  --text: #d9cbb4;
  --text-dim: #8f8170;
  --gold: #f2c14e;
  --danger: #ef6b5f;
  --gain: #8ff0c2;
  --pixel: 'Pixelify Sans', ui-monospace, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  background: radial-gradient(ellipse at top, #1d1511 0%, var(--bg) 62%) var(--bg);
  color: var(--text);
  font: 1rem / 1.5 var(--sans);
  overflow-wrap: break-word;
}

.support {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 32px) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 24px)
    max(16px, env(safe-area-inset-left, 0px));
}

.support-brand {
  align-self: center;
  font: 700 1.5rem / 1 Georgia, 'Times New Roman', serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
  text-shadow: 0 3px 0 #000;
}

h1 {
  margin: -8px 0 0;
  text-align: center;
  font: 400 2.5rem / 1 var(--pixel);
  color: var(--gold);
  text-shadow: 0 3px 0 #000;
}

.support-line {
  margin: -16px 0 0;
  text-align: center;
  color: #c4b398;
  text-shadow: 0 2px 0 #000;
}

/* the form, in the front page's card */
.support-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(27, 21, 18, 0.88);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.support-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.support-card label > span {
  color: #f1e3c8;
  font-size: 0.9375rem;
  font-weight: 600;
}
.support-card label i {
  color: var(--text-dim);
  font-style: normal;
  font-weight: 400;
}
.support-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 480px) {
  .support-row {
    grid-template-columns: 2fr 3fr;
  }
}

.support-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #120e0c;
  color: var(--text);
  /* 16px at least, or iOS zooms the page in on focus */
  font: 1rem / 1.4 var(--sans);
}
select.support-input {
  appearance: none;
  padding-right: 34px;
  background:
    linear-gradient(45deg, transparent 50%, var(--text-dim) 50%) right 18px top 50% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%) right 12px top 50% / 6px 6px no-repeat,
    #120e0c;
}
textarea.support-input {
  min-height: 9em;
  resize: vertical;
}
.support-input[aria-invalid='true'] {
  border-color: var(--danger);
}

/* the field only a bot fills in: off the page, and out of reach of a keyboard and a screen reader */
.support-trap {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.support-button {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid #f7d27a;
  border-radius: 10px;
  background: linear-gradient(#f9db8c, #e7b347 52%, #c38c2c);
  color: #1d130a;
  font: 600 1.0625rem / 1.2 var(--sans);
  cursor: pointer;
  box-shadow:
    0 4px 0 #6b4a17,
    0 0 36px rgba(242, 193, 78, 0.2);
  transition:
    transform 0.08s ease-out,
    filter 0.15s;
}
.support-button:hover {
  filter: brightness(1.08);
}
.support-button:active {
  transform: translateY(1px);
}
.support-button:disabled {
  opacity: 0.6;
  cursor: default;
  filter: none;
}

.support-said {
  margin: 0;
  font-size: 0.9375rem;
}
.support-said.error {
  color: var(--danger);
}
.support-said.sent {
  color: var(--gain);
  font-size: 1.0625rem;
}
/* once sent, the card says so and nothing else */
.support-card.sent > :not(.support-said) {
  display: none;
}

.support-input:focus,
.support-button:focus-visible,
.support a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* the sections below the form, headed as the front page's are: the pixel face and a gold gem */
.support-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.support-text h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 400 1.5rem / 1.1 var(--pixel);
  color: var(--gold);
  text-shadow: 0 2px 0 #000;
}
.support-text h2::before {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  background: var(--gold);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.support-text p {
  margin: 0;
  line-height: 1.55;
}
.support-text a {
  color: var(--gold);
}
/* the address, to copy: one tap selects all of it */
.support-email {
  color: #f1e3c8;
  font-weight: 600;
  user-select: all;
  -webkit-user-select: all;
}

.support-foot {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.support-foot nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
}
.support-foot nav a,
.support-foot nav span {
  color: #b9a88f;
  font-size: 0.9375rem;
  text-decoration: none;
}
.support-foot nav span {
  color: var(--text-dim);
}
.support-foot nav a:hover,
.support-foot nav a[aria-current='page'] {
  color: var(--gold);
}
.support-foot nav a:hover {
  text-decoration: underline;
}
