/* supportpraxeis.org: one shell for every page.
   Left: the gathering photo (sticky on wide screens). Right: the page's content column. */

:root {
  --ink: #10303a;          /* deep teal from the praxeis.org footer */
  --ink-2: #2e4f59;
  --muted: #4f6b73;
  --line: #cfdcda;
  --surface: #eef3f2;      /* cool, teal-tinted page background */
  --paper: #fafcfb;
  --teal: #007280;         /* praxeis.org link colour */
  --sky: #1cc0ff;          /* praxeis.org button colour, used for focus and highlights */
  --ember: #c4472a;        /* deeper version of the praxeis.org coral, for the give button */
  --ember-dark: #a63a21;
  --error: #a3261b;

  --display: "Young Serif", Georgia, serif;
  --body: "Schibsted Grotesk", system-ui, sans-serif;

  --radius: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}

img { display: block; max-width: 100%; }

a { color: var(--teal); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

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

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

/* ---------- shell ---------- */

.shell { display: grid; min-height: 100vh; }

.photo {
  position: relative;
  min-height: 21rem;
  color: var(--paper);
  background: var(--ink);
  overflow: hidden;
}
.photo picture, .photo picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.photo picture img { object-fit: cover; object-position: 30% 30%; } /* keep the face in frame */
.photo::after { /* scrim so the logo and tagline stay legible over the photo */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgb(16 48 58 / 0.55), rgb(16 48 58 / 0) 30%),
    linear-gradient(to top, rgb(16 48 58 / 0.85), rgb(16 48 58 / 0) 55%);
}
.photo__inner {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.25rem 1rem;
  gap: 2rem;
}
.photo__logo { width: 92px; height: auto; }
.photo__tagline {
  margin: 0; max-width: 18ch;
  font: 400 clamp(1.6rem, 3.2vw, 2.6rem)/1.12 var(--display);
}

.content {
  padding: 2.5rem 1rem 3rem;
  background: var(--paper);
}
.content__inner { max-width: 34rem; margin: 0 auto; }

@media (min-width: 960px) {
  .shell { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .photo { position: sticky; top: 0; height: 100vh; }
  .photo__inner { padding: 2rem 2.5rem 2.75rem; }
  .photo__logo { width: 112px; }
  .content { padding: 4.5rem 3.5rem 4rem; }
  .content__inner { margin: 0; }
}

/* ---------- type ---------- */

h1, h2, legend.section-title {
  font-family: var(--display); font-weight: 400; color: var(--ink);
}
h1 { margin: 0 0 0.75rem; font-size: clamp(2.2rem, 4.5vw, 3.1rem); line-height: 1.05; }
h2 { margin: 0 0 0.5rem; font-size: 1.6rem; line-height: 1.2; }
.lede { margin: 0 0 2.25rem; color: var(--ink-2); font-size: 1.125rem; max-width: 60ch; }
.small { font-size: 0.9375rem; color: var(--muted); }

/* ---------- form structure ---------- */

form { margin: 0; }

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

.step { padding: 1.75rem 0; border-top: 1px solid var(--line); }
.step:first-of-type { border-top: 0; padding-top: 0; }

/* float the legend so it sits inside the fieldset like a normal heading (no border notch) */
legend.section-title { float: left; width: 100%; }
legend.section-title + * { clear: both; }
legend.section-title, .section-title {
  padding: 0; margin: 0 0 0.9rem;
  font: 400 1.3rem/1.25 var(--display);
}

.field { display: grid; align-content: start; gap: 0.35rem; margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }
.field label, .label { font-weight: 700; font-size: 0.9375rem; }
.field .hint { font-size: 0.875rem; color: var(--muted); }
.req { color: var(--ember); font-weight: 400; }

.row-2 { display: grid; gap: 0 1rem; }
@media (min-width: 520px) { .row-2 { grid-template-columns: 1fr 1fr; } }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="number"], select, textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  font: inherit; color: var(--ink);
  background: #fff;
  border: 1px solid #a9bcbb;
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 7.5rem; resize: vertical; }
select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2310303a' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.95rem center;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(28 192 255 / 0.45);
}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--error); box-shadow: 0 0 0 1px var(--error);
}

/* Segmented choices (frequency, amount, payment method). Real radios, styled labels. */
.choices { display: grid; gap: 0.5rem; }
.choices--3 { grid-template-columns: repeat(3, 1fr); }
.choices--4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 420px) { .choices--4 { grid-template-columns: repeat(4, 1fr); } }
.choices--2 { grid-template-columns: 1fr; }
@media (min-width: 420px) { .choices--2 { grid-template-columns: 1fr 1fr; } }

.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-height: 3.1rem; padding: 0.55rem 0.75rem;
  border: 1px solid #a9bcbb; border-radius: var(--radius);
  background: #fff;
  font-weight: 700; text-align: center; line-height: 1.25;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s;
}
.choice small { font-weight: 400; font-size: 0.8125rem; color: var(--muted); margin-top: 0.1rem; }
.choice input:hover + span { border-color: var(--ink); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.choice input:checked + span small { color: #c6d8d7; }
.choice input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }

/* Plain radio / checkbox lists */
.option-list { display: grid; gap: 0.6rem; }
.check {
  display: grid; grid-template-columns: 1.35rem 1fr; gap: 0.7rem; align-items: start;
  cursor: pointer;
}
.check input { width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; accent-color: var(--ink); }
.check b { display: block; }
.check .small { display: block; }

.reveal[hidden], .check[hidden] { display: none; }
.spaced { margin-top: 1.25rem; }
.reveal { margin-top: 0.9rem; }

.other-amount { margin-top: 0.75rem; display: grid; grid-template-columns: auto 1fr; align-items: center; }
.other-amount .prefix {
  padding: 0 0.75rem; height: 100%; display: grid; place-items: center;
  border: 1px solid #a9bcbb; border-right: 0; border-radius: var(--radius) 0 0 var(--radius);
  background: var(--surface); font-weight: 700;
}
.other-amount input { border-radius: 0 var(--radius) var(--radius) 0; }

/* ---------- submit ---------- */

.submit-area { padding-top: 1.75rem; border-top: 1px solid var(--line); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; min-height: 3.6rem; padding: 0.9rem 1.5rem;
  border: 0; border-radius: var(--radius);
  background: var(--ember); color: #fff;
  font: 700 1.1875rem/1.2 var(--body);
  cursor: pointer; text-decoration: none;
  transition: background-color 0.18s, transform 0.18s var(--ease);
}
.button:hover { background: var(--ember-dark); color: #fff; }
.button:active { transform: translateY(1px); }
.button[disabled] { opacity: 0.65; cursor: progress; }
.button--quiet { background: var(--ink); }
.button--quiet:hover { background: var(--ink-2); }

.error-box {
  margin: 0 0 1rem; padding: 0.8rem 1rem;
  border-radius: var(--radius);
  background: #fbe9e5; color: var(--error); font-weight: 700;
}
.error-box:empty { display: none; }

.reassure { margin: 1.1rem 0 0; display: grid; gap: 0.35rem; }
.reassure p { margin: 0; }

.turnstile { margin: 1rem 0 0; min-height: 0; }

/* ---------- result panels (bank details, thank-you) ---------- */

.bank {
  margin: 1.5rem 0; padding: 0;
  display: grid; gap: 0;
  border-top: 1px solid var(--line);
}
.bank > div {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.25rem 1rem;
  padding: 0.95rem 0; border-bottom: 1px solid var(--line);
}
.bank dt { grid-column: 1; font-size: 0.875rem; color: var(--muted); }
.bank dd {
  grid-column: 1; margin: 0;
  font: 700 1.35rem/1.25 var(--body);
  font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0.02em;
}
.bank .is-reference dd { color: var(--ember); }
.copy {
  grid-column: 2; grid-row: 1 / span 2;
  padding: 0.5rem 0.85rem; border-radius: var(--radius);
  border: 1px solid #a9bcbb; background: #fff; color: var(--ink);
  font: 700 0.875rem var(--body); cursor: pointer;
}
.copy:hover { border-color: var(--ink); }
.copy[data-copied] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.next-steps { margin: 1.5rem 0 0; padding-left: 1.2rem; }
.next-steps li { margin-bottom: 0.5rem; }

.footer-note { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }

/* ---------- load-in ---------- */

@media (prefers-reduced-motion: no-preference) {
  .content__inner > * { animation: rise 0.6s var(--ease) both; }
  .content__inner > *:nth-child(2) { animation-delay: 0.06s; }
  .content__inner > *:nth-child(3) { animation-delay: 0.12s; }
  .content__inner > *:nth-child(4) { animation-delay: 0.18s; }
  .photo__tagline { animation: rise 0.9s 0.15s var(--ease) both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
