@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-var.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("fonts/fredoka-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #FBF7EE;
  --surface: #FFFFFF;
  --sunk: #F3ECDD;
  --ink: #4A3423;
  --muted: #7D6652;
  --rule: #E6DAC4;
  --accent: #6B8F5E;
  --accent-ink: #FFFFFF;
  --accent-soft: #E3EEDC;
  --pop: #D9483B;
  --pop-soft: #FBE3DF;
  --good: #4F7A3F;
  --shadow: 0 2px 4px rgba(74, 52, 35, 0.06), 0 8px 24px rgba(74, 52, 35, 0.10);
  --hero-bg: #EEF3E8;
  --r: 18px;
  --r-sm: 12px;
  --f-display: "Fredoka", "Nunito", ui-rounded, system-ui, sans-serif;
  --f-body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--good); }

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

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }

.wrap {
  width: min(1040px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  padding: 20px 0 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.brand-name {
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 600;
}

.hero {
  background: var(--hero-bg);
  border-block: 1px solid var(--rule);
  padding: 48px 0 56px;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  max-width: 16ch;
  margin-bottom: 16px;
}

.lead {
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  max-width: 38rem;
  color: var(--ink);
}

.lead em {
  font-style: normal;
  color: var(--pop);
  font-weight: 700;
}

.sign {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 16px 8px 10px;
  box-shadow: var(--shadow);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.sign-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.how {
  padding: 56px 0 24px;
}

.how h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 24px;
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 22px 20px 24px;
  box-shadow: var(--shadow);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.card p { color: var(--ink); }

.signup {
  padding: 36px 0 64px;
}

.signup-panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 28px 22px;
  box-shadow: var(--shadow);
  max-width: 36rem;
}

.signup h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 8px;
}

.signup .hint {
  color: var(--muted);
  margin-bottom: 22px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

label, .legend {
  font-weight: 700;
  font-size: 0.95rem;
}

.optional { font-weight: 400; color: var(--muted); }

input[type="email"],
input[type="text"] {
  font: inherit;
  color: inherit;
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  min-height: 48px;
}

input:hover { border-color: var(--muted); }

input:focus {
  outline: 3px solid var(--accent-soft);
  border-color: var(--accent);
}

.roles {
  display: grid;
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 0 0 20px;
  min-inline-size: 0;
}

.legend { margin-bottom: 8px; }

.role {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sunk);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  cursor: pointer;
  min-height: 48px;
}

.role:hover { border-color: var(--accent); }

.role:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.role input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.btn {
  font: inherit;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.1rem;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  padding: 14px 22px;
  min-height: 52px;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 3px 0 #56744C;
}

.btn:hover { background: var(--good); }
.btn:active { transform: translateY(1px); box-shadow: 0 2px 0 #56744C; }
.btn:disabled { opacity: 0.6; cursor: wait; box-shadow: none; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.status {
  margin-top: 16px;
  min-height: 1.5em;
  color: var(--good);
  font-weight: 700;
}

.status.is-error { color: var(--pop); }

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--rule);
  padding: 24px 0 32px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p { margin: 0 0 6px; }

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .hero { padding: 72px 0 80px; }
  .btn { width: auto; min-width: 200px; }
  .roles { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:active { transform: none; }
}
