@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --bg-top: #f8fbf6;
  --bg-bottom: #eaf5ef;
  --ink-900: #17261d;
  --ink-700: #2f4939;
  --ink-500: #567365;
  --brand-700: #0b8d62;
  --brand-600: #0faa77;
  --accent-500: #f29e4c;
  --accent-100: #fff4e6;
  --card: #ffffff;
  --border: #cde3d3;
  --danger: #b62828;
  --success: #0d7a3b;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 24px 52px rgba(23, 38, 29, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink-900);
  background:
    radial-gradient(circle at 10% 5%, rgba(242, 158, 76, 0.16), transparent 45%),
    radial-gradient(circle at 90% 0%, rgba(11, 141, 98, 0.2), transparent 40%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.page-shell {
  width: min(960px, 100% - 2.5rem);
  margin: 2rem auto 4rem;
  display: grid;
  gap: 1.2rem;
}

.hero {
  background: linear-gradient(130deg, #0a6d4d, #18ad78 62%, #f2b36e);
  color: #f8fff9;
  border-radius: var(--radius-lg);
  padding: 1.7rem;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0.2rem 0 0.7rem;
  font-family: "Fraunces", serif;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.12;
}

.hero-kicker {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.hero-copy {
  margin: 0;
  max-width: 64ch;
  color: #ecfff2;
}

.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.role-card h2,
.form-card h2 {
  margin: 0;
  font-family: "Fraunces", serif;
}

.role-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.role-tile {
  border: 1px solid #9ec7af;
  background: #f5fbf7;
  color: var(--ink-700);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.role-tile:hover {
  transform: translateY(-1px);
  border-color: var(--brand-700);
}

.role-tile.active {
  background: linear-gradient(120deg, #effff7, #e4faef);
  border-color: var(--brand-600);
  color: var(--brand-700);
}

.meta {
  margin: 0.7rem 0 0;
  color: var(--ink-500);
  font-size: 0.9rem;
}

.section-head {
  margin: 0.5rem 0 0.9rem;
}

.section-head h2 {
  margin-bottom: 0.2rem;
}

.section-head p {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.93rem;
}

.grid {
  display: grid;
  gap: 0.8rem;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  margin-top: 0.8rem;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 11px;
  border: 1px solid #bcd8c5;
  padding: 0.72rem 0.8rem;
  color: var(--ink-900);
  background: #fff;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 170, 119, 0.23);
  border-color: var(--brand-600);
}

.role-section {
  margin-top: 1rem;
  padding-top: 0.6rem;
  border-top: 1px dashed #bfdbc8;
}

.service-fieldset {
  margin-top: 0.85rem;
  border: 1px solid #d1e6d8;
  border-radius: var(--radius-md);
  padding: 0.8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.service-fieldset legend {
  padding: 0 0.35rem;
  font-weight: 700;
}

.service-fieldset label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}

.service-fieldset input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

.consent-wrap {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.5rem;
  background: var(--accent-100);
  border: 1px solid #f0cfaa;
  border-radius: var(--radius-md);
  padding: 0.7rem;
}

.consent-wrap label {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.consent-wrap input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
}

.actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

button {
  border: none;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--brand-700), var(--brand-600));
  color: #fff;
  padding: 0.72rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
}

button.ghost {
  background: #fff;
  color: var(--ink-700);
  border: 1px solid #afcdb8;
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.form-message {
  min-height: 1.2rem;
  margin: 0.9rem 0 0;
  font-weight: 600;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--success);
}

.form-message.warn {
  color: #915b08;
}

.payload-preview {
  margin-top: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid #d1e6d8;
  background: #f8fffb;
  padding: 0.9rem;
  color: #244234;
  max-height: 260px;
  overflow: auto;
}

.hidden {
  display: none;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(960px, 100% - 1.1rem);
    margin-top: 1rem;
  }

  .hero,
  .card {
    padding: 1rem;
  }

  .two-col,
  .service-fieldset {
    grid-template-columns: 1fr;
  }
}
