/* VESXEL Studio: donate site
   Palette pulled from the logo: coral, cream, white, ink, grey, yellow. */

:root {
  --coral: #ee6c61;
  --coral-dark: #c4443a;
  --cream: #fffcf1;
  --white: #ffffff;
  --ink: #1f1c1c;
  --grey: #69605f;
  --yellow: #f4b63f;

  --display: "Red Hat Display", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --text: "Red Hat Text", "Segoe UI", system-ui, sans-serif;
}

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

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: var(--coral);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- Background decor: grey tail circle + small yellow disc ----------
   Both copy the logo's sticker look: dark outline, white outer border. */

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 11px var(--white);
  pointer-events: none;
}

body::before {
  width: 46vmin;
  height: 46vmin;
  right: -12vmin;
  bottom: -13vmin;
  background: var(--grey);
}

body::after {
  width: 11vmin;
  height: 11vmin;
  left: 6vw;
  top: 9vh;
  background: var(--yellow);
}

/* ---------- Donate page ---------- */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 22px;
  padding: 64px 32px;
}

.panel {
  width: min(1000px, 100%);
  display: grid;
  grid-template-columns: 5fr 7fr;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 34px;
  box-shadow: 0 0 0 12px var(--white);
}

.intro {
  padding: 40px 32px 40px 44px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.home-link {
  display: block;
  width: 210px;
  margin: -6px 0 18px -14px;
  transform: rotate(-3deg);
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.home-link:hover,
.home-link:focus-visible {
  transform: rotate(1deg) scale(1.03);
}

.home-link img {
  display: block;
  width: 100%;
  height: auto;
}

h1 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 900;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.intro p {
  margin: 0 0 12px;
  max-width: 34ch;
}

.tiers {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.tiers li {
  display: block;
  padding: 8px 14px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  transform: rotate(-1.5deg);
}

.tier-benefits {
  margin-top: 3px;
  font-weight: 500;
  font-size: 13px;
  opacity: 0.85;
}

.card {
  margin: 22px 22px 22px 0;
  padding: 28px;
  display: grid;
  gap: 22px;
  align-content: start;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 22px;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

legend,
.field-label {
  display: block;
  padding: 0;
  margin: 0 0 9px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Amount buttons: real radios, styled */

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.amt {
  position: relative;
  display: block;
}

.amt input,
.seg input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.amt span {
  display: block;
  padding: 12px 0;
  text-align: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 14px;
  transition: background 0.12s, transform 0.12s, box-shadow 0.12s;
}

.amt:hover span {
  background: var(--cream);
}

.amt input:checked + span {
  background: var(--yellow);
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.amt input:focus-visible + span,
.seg input:focus-visible + span {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.custom {
  position: relative;
  display: block;
  margin-top: 10px;
}

.tier-note {
  min-height: 1.5em;
  margin: 10px 0 0;
  font-weight: 700;
  font-size: 15px;
}

/* One-time / monthly */

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 14px;
}

.seg label {
  position: relative;
  display: block;
}

.seg span {
  display: block;
  padding: 10px 0;
  text-align: center;
  font-weight: 700;
  border-radius: 9px;
  transition: background 0.12s, color 0.12s;
}

.seg input:checked + span {
  background: var(--ink);
  color: var(--cream);
}

/* Text inputs */

input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 10px;
}

input[type="text"]::placeholder {
  color: var(--grey);
  opacity: 0.85;
}

input[type="text"]:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.hint {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--grey);
}

/* Submit */

.error {
  margin: 0;
  padding: 10px 14px;
  font-weight: 500;
  font-size: 15px;
  background: #ffe6e2;
  border: 2px solid var(--coral-dark);
  border-radius: 10px;
}

.cta {
  width: 100%;
  padding: 16px 24px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  color: var(--cream);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

.cta:hover {
  background: var(--yellow);
  color: var(--ink);
}

.cta:active {
  transform: translateY(1px);
}

.pay-note {
  margin: -10px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--grey);
}

noscript p {
  margin: 0;
  padding: 10px 14px;
  background: #ffe6e2;
  border: 2px solid var(--coral-dark);
  border-radius: 10px;
}

/* ---------- Rankings opt-in (bottom of the donate page) ---------- */

.vx-rank-card {
  width: min(1000px, 100%);
  padding: 26px 30px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 26px;
  box-shadow: 0 0 0 8px var(--white);
}

.vx-rank-question {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 18px;
}

.vx-rank-choice {
  display: flex;
  gap: 12px;
}
.vx-rank-choice .btn {
  padding: 10px 24px;
  font-size: 15px;
}
.vx-rank-choice .btn.vx-selected {
  background: var(--ink);
  color: var(--cream);
}

#vx-rank-form .cta { width: 100%; margin-top: 4px; }

/* ---------- Popup mode (?embed=1): shown inside the dialog on the main site ---------- */

html.embed body {
  background: var(--cream);
  min-height: 0;
}

html.embed body::before,
html.embed body::after {
  display: none;
}

html.embed .page {
  display: block;
  min-height: 0;
  padding: 0;
}

html.embed .panel {
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

html.embed .vx-rank-card {
  width: 100%;
  margin-top: 18px;
  padding-top: 22px;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  box-shadow: none;
}

/* ---------- Narrow screens: not designed yet, just won't break ---------- */

@media (max-width: 900px) {
  .panel {
    grid-template-columns: 1fr;
  }

  .intro {
    padding: 32px 28px 8px;
  }

  .card {
    margin: 12px 18px 18px;
    padding: 22px;
  }

  body::before {
    width: 60vmin;
    height: 60vmin;
  }
}
