/* Welcome card. Colours come from the Grace logo (navy #140a64, red #d70000)
   and the fonts match the livestream overlays (Gabarito headings, Figtree
   text). Sizes are in rem so the browser's text-size setting scales
   everything; 1rem = 20px at the default setting. */

@font-face {
  font-family: "Figtree";
  src: url("/fonts/Figtree-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Gabarito";
  src: url("/fonts/Gabarito-Variable.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --navy: #140a64;         /* 15:1 on white */
  --navy-hover: #23178a;
  --red: #d70000;          /* 5.9:1 on white */
  --red-hover: #b30000;
  --ink: #17142f;
  --muted: #4a4766;        /* 8:1 on white */
  --line: #77739c;         /* input borders, 4.4:1 on white */
  --page: #f1f0f8;
  --card: #ffffff;
  --panel: #f6f5fc;
  --tint: #ebe9f7;
  --error-bg: #fdecec;
  --error-text: #8a0f0f;
  --focus: #d70000;
  --heading: "Gabarito", "Figtree", system-ui, sans-serif;
  --body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
}

/* ---------- layout ---------- */

.card {
  max-width: 34rem;
  margin: 0 auto;
  padding: 1.25rem 0.8rem 2.5rem;
  background: var(--card);
  min-height: 100vh;
}

@media (min-width: 40rem) {
  body { padding: 2rem 1rem; }
  .card {
    min-height: 0;
    padding: 2rem 2.25rem 2.5rem;
    border-radius: 1.1rem;
    box-shadow: 0 0.1rem 0.3rem rgba(20, 10, 100, 0.06), 0 1rem 2.5rem rgba(20, 10, 100, 0.10);
  }
}

/* Logo, with a red rule under it that echoes the arrows in the logo. */
.brand {
  text-align: center;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 0.2rem solid var(--red);
}
.brand .grace-logo {
  max-width: 15rem;
  margin: 0 auto;
}

h1, h2 {
  font-family: var(--heading);
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: 1.6rem; margin: 0 0 0.4rem; }
h2 { font-size: 1.35rem; margin: 0 0 0.5rem; }

.lead { margin: 0 0 1.5rem; color: var(--muted); font-size: 1.05rem; }
.opt { font-weight: 400; color: var(--muted); }

/* ---------- fields ---------- */

label, legend {
  display: block;
  font-weight: 700;
  color: var(--ink);
  margin: 1.2rem 0 0.4rem;
}

input[type="text"], input[type="tel"], textarea {
  display: block;
  width: 100%;
  min-height: 2.6rem;      /* 52px */
  padding: 0.5rem 0.7rem;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 0.55rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 6rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: #6f6b8f; }
input[type="text"]:focus, input[type="tel"]:focus, textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 0.2rem rgba(20, 10, 100, 0.15);
  outline: none;
}

:focus-visible { outline: 0.2rem solid var(--focus); outline-offset: 0.15rem; }

/* Category buttons: real radio inputs, styled as large buttons. */
fieldset.choices { border: 0; margin: 0; padding: 0; min-width: 0; }
.choices legend { padding: 0; }
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.55rem;
}
.choice { margin: 0; font-weight: 600; }
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.choice span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.8rem;
  padding: 0.5rem 0.8rem;
  border: 2px solid var(--line);
  border-radius: 0.7rem;
  background: var(--card);
  color: var(--navy);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.choice span:hover { background: var(--tint); }
.choice input:checked + span {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 0.3rem 0.8rem rgba(20, 10, 100, 0.25);
}
.choice input:focus-visible + span { outline: 0.2rem solid var(--focus); outline-offset: 0.15rem; }

/* The "reach out" checkbox and its phone/email fields, grouped visually.
   Always visible: nothing appears or disappears. */
.panel {
  margin-top: 1.5rem;
  padding: 0.25rem 1rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--tint);
  border-radius: 0.8rem;
}

.check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-weight: 600;
  cursor: pointer;
}
.check input {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.1rem 0 0;
  accent-color: var(--navy);
}

/* ---------- buttons ---------- */

button, .button-link {
  display: block;
  width: 100%;
  min-height: 2.8rem;      /* 56px */
  margin-top: 1.6rem;
  padding: 0.55rem 1rem;
  font-family: var(--heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 0.7rem;
  box-shadow: 0 0.3rem 0.9rem rgba(215, 0, 0, 0.25);
  cursor: pointer;
  transition: background-color 0.15s, transform 0.05s;
}
button:hover, .button-link:hover { background: var(--red-hover); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.75; cursor: wait; }

a { color: var(--navy); font-weight: 600; }

.status {
  margin: 1rem 0 0;
  padding: 0.8rem 1rem;
  background: var(--error-bg);
  color: var(--error-text);
  border-left: 0.3rem solid var(--red);
  border-radius: 0.5rem;
  font-weight: 600;
}

/* ---------- thank you ---------- */

.thanks { text-align: center; padding: 1rem 0 0.5rem; }
.thanks:focus { outline: none; }
.thanks-icon {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1rem;
}
.thanks p { color: var(--muted); }
.thanks .again { display: inline-block; margin-top: 0.5rem; }

/* ---------- misc ---------- */

.foot {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Off-screen rather than display:none, which some bots skip. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cf-turnstile { margin-top: 1.2rem; }

[hidden] { display: none !important; }
