/* connect.closd.org. Colours and type from brand/tokens.css (logo v1, brain decision #24), as on closd.org. */

@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #0C1411;
  --emerald: #059669;
  --emerald-dark: #047857;
  --paper: #F5F4EE;
  --white: #FFFFFF;
  --muted: #5B6460;
  --line: #E3E1D8;
  --error: #B42318;
  --brand: "Outfit", system-ui, sans-serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 32px);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--gutter) 32px;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration-color: var(--emerald); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--emerald-dark); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }

.top { width: 100%; max-width: 40rem; padding-block: 28px 20px; }
.logo { display: inline-block; line-height: 0; }
.logo img { width: 104px; height: auto; }

.card {
  width: 100%;
  max-width: 40rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(22px, 5vw, 40px);
}

h1 { font: 600 clamp(24px, 4.5vw, 30px)/1.2 var(--brand); letter-spacing: -0.02em; margin: 0 0 12px; }
p { margin: 0 0 12px; }
.lead { font-size: 17px; }
.hint { color: var(--muted); }
.aside { color: var(--muted); font-size: 14px; margin-top: 20px; }
.badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #E7F6EF;
  color: var(--emerald-dark);
  font-size: 14px;
  font-weight: 600;
}

.terms { margin: 24px 0; padding: 0; border-top: 1px solid var(--line); }
.terms dt { font: 600 16px/1.3 var(--brand); margin-top: 18px; }
.terms dd { margin: 4px 0 0; color: #2B3430; }

form { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }

.check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--emerald); cursor: pointer; }
.check em { color: var(--muted); font-style: normal; font-size: 14px; }

.error {
  padding: 10px 14px;
  border-radius: 8px;
  background: #FEF3F2;
  color: var(--error);
  font-weight: 500;
}

/* Google's sign-in button, light theme (Google's sign-in branding guidelines). */
.gsi {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  margin-top: 8px;
  padding: 0 12px;
  border: 1px solid #747775;
  border-radius: 20px;
  background: #FFFFFF;
  color: #1F1F1F;
  font: 500 14px/20px Roboto, Arial, sans-serif;
  letter-spacing: 0.25px;
  cursor: pointer;
  transition: background-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.gsi .g { width: 20px; height: 20px; }
.gsi:hover { background: #F7F8F8; box-shadow: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15); }
/* Dimmed until the required box is ticked; the browser and the Worker both refuse an unticked form. */
form:has(input[name="read_access"]:not(:checked)) .gsi { opacity: .45; box-shadow: none; }

.foot {
  width: 100%;
  max-width: 40rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 20px;
  font-size: 14px;
  color: var(--muted);
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
