/* 2048 Surge — Ember, the inner pages: contact and legal.
 *
 * Same world as site.css, quieter. Legal text is long-form reading, so it sits
 * on white plates over the cream ground with an ink hairline, and nothing on
 * these pages is coloured for excitement.
 */

html { scroll-behavior: smooth; }
body { margin: 0; }

.skip-link {
  position: fixed;
  inset: .75rem auto auto .75rem;
  z-index: 100;
  padding: .75rem 1.1rem;
  color: var(--ground);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  font-family: var(--ui);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-220%);
}
.skip-link:focus { transform: translateY(0); }

.inside-page { min-block-size: 100vh; }
.inside-page main { min-block-size: calc(100vh - 12rem); }
.inside-page h1, .inside-page h2 { overflow-wrap: anywhere; }
/* The current page is marked by weight and a rule, never by colour: this mark
 * also appears in the char footer, where ink would disappear. */
.inside-page [aria-current="page"] { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; }
.lineup-footer nav a[aria-current="page"] { color: var(--ground); }

.inside-intro {
  position: relative;
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter);
  border-block-end: 2px solid var(--ink);
  isolation: isolate;
}
.inside-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(52% 60% at 88% 0%, rgba(255, 179, 0, .26), rgba(255, 179, 0, 0) 74%),
    radial-gradient(58% 70% at 0% 100%, rgba(255, 233, 168, .5), rgba(255, 233, 168, 0) 72%);
}
.inside-intro h1 {
  max-inline-size: 18ch;
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -.04em;
}
.inside-intro > p { max-inline-size: 46rem; margin: 0; color: var(--ink-dim); font-size: 1.05rem; }
.inside-intro > p + p { margin-block-start: 1.25rem; }

/* The one gate on these pages that must not be missed. Heat marks it; the
 * border, not the fill, carries the weight, so it never reads as a button. */
.review-gate {
  padding: .9rem 1.1rem;
  background: var(--surface);
  border: 2px solid var(--hot);
  border-radius: 10px;
  font-size: .95rem;
}
.review-gate strong { color: var(--hot); }

/* --- contact -------------------------------------------------------------- */

.contact-page { background: var(--ground); }
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter);
}
.field { min-inline-size: 0; }
.field--wide, .contact-submit { grid-column: 1 / -1; }
.field label {
  display: block;
  margin-block-end: .5rem;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.field input, .field textarea {
  inline-size: 100%;
  min-block-size: 3rem;
  padding: .7rem .85rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--hairline);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
}
.field input:hover, .field textarea:hover { border-color: var(--ink-dim); }
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field textarea { min-block-size: 12rem; resize: vertical; }
.field-hint, .field-error { min-block-size: 1.4rem; margin: .4rem 0 0; font-size: .85rem; }
.field-hint { color: var(--ink-dim); }
.field-error { color: #8c1000; font-weight: 600; }

.contact-honeypot {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.contact-submit { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.contact-submit button { cursor: pointer; }
.contact-submit button:disabled { cursor: wait; opacity: .55; }
.contact-status { max-inline-size: 42rem; margin: 0; padding: .5rem 0; font-weight: 600; }
.contact-status:empty { padding: 0; }
.contact-status[data-state="success"] { color: #8a5a00; }
.contact-status[data-state="error"] { color: #8c1000; }
.contact-status:focus { outline: none; }

/* --- legal ---------------------------------------------------------------- */

.legal-page { background: var(--ground); }
.legal-page > section {
  display: grid;
  grid-template-columns: minmax(12rem, .6fr) minmax(0, 1.4fr);
  /* Column gap only. A row gap would open between consecutive paragraphs of
   * the same section, because each one is its own grid row. */
  column-gap: clamp(1.25rem, 4vw, 3.5rem);
  row-gap: 0;
  padding: clamp(2rem, 4vw, 3rem) var(--gutter);
}
.legal-page > section + section { border-block-start: 1.5px solid var(--hairline); }
.legal-page section h2 { align-self: start; margin: 0; font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.1; }
.legal-page section > :not(h2) { grid-column: 2; max-inline-size: 68ch; }
.legal-page section p, .legal-page section ul { margin-block: 0; color: var(--ink-dim); font-size: 1rem; }
.legal-page section p + p, .legal-page section p + ul { margin-block-start: .9rem; }
.legal-page section li + li { margin-block-start: .6rem; }
.legal-page section strong { color: var(--ink); }
.legal-page section a { color: var(--ink); font-weight: 600; }

/* --- Discord ---------------------------------------------------------------
 * Discord's mark is one of the colours Ember does not get to choose: the
 * monochrome mark ships in black. The plate around it is ours. */

.discord-action {
  display: inline-flex;
  min-block-size: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .55rem 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  font-family: var(--ui);
  font-size: .85rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color 160ms cubic-bezier(.16, 1, .3, 1);
}
.discord-action:hover { background: var(--rare); }
.discord-action svg { flex: none; inline-size: 1.15rem; block-size: auto; }

@media (max-width: 45rem) {
  .lineup-header nav > a.discord-action { display: inline-flex; }
  .discord-action { padding-inline: .7rem; font-size: .8rem; }
  .discord-action span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .lineup-close__actions .discord-action span { position: static; inline-size: auto; block-size: auto; clip-path: none; }
  .contact-form, .legal-page > section { grid-template-columns: 1fr; }
  .field--wide, .contact-submit, .legal-page section > :not(h2) { grid-column: 1; }
  .legal-page section h2 { margin-block-end: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skip-link, .discord-action { transition: none; }
}

@media (forced-colors: active) {
  .review-gate, .field input, .field textarea, .discord-action { forced-color-adjust: auto; }
}
