:root {
  --bg: #f7f4ef;
  --bg-accent: #ebe4d8;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --text: #16222b;
  --muted: #66717a;
  --line: rgba(22, 34, 43, 0.1);
  --primary: #0a5b8b;
  --primary-strong: #083f61;
  --shadow: 0 20px 60px rgba(22, 34, 43, 0.08);
  --radius-xl: 28px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(10, 91, 139, 0.08), transparent 24%),
    radial-gradient(circle at right center, rgba(198, 172, 120, 0.18), transparent 22%),
    linear-gradient(180deg, var(--bg-accent), var(--bg));
}

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

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

.page-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 44px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  width: clamp(120px, 14vw, 165px);
}

.language-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.language-toggle:hover {
  background: rgba(255, 255, 255, 0.94);
  transform: translateY(-1px);
}

.hero,
.form-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero {
  border-radius: var(--radius-xl);
  padding: 40px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}

h1,
h2 {
  font-family: "Fraunces", serif;
  line-height: 1.06;
}

h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
}

.intro {
  max-width: 56ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.form-card {
  border-radius: calc(var(--radius-xl) + 2px);
  padding: 32px;
}

.form-section + .form-section {
  margin-top: 30px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0 0 8px;
  font-size: 1.75rem;
}

.section-heading h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  line-height: 1.1;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.section-heading-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-wide {
  grid-column: 1 / -1;
}

.address-block {
  margin-top: 18px;
}

.field span {
  font-weight: 700;
  font-size: 0.95rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  color: var(--text);
  background: var(--surface-strong);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(10, 91, 139, 0.42);
  box-shadow: 0 0 0 4px rgba(10, 91, 139, 0.1);
  transform: translateY(-1px);
}

.subfield-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

textarea {
  resize: vertical;
  min-height: 144px;
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 28px;
}

.consent-block {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

.consent-block input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  flex: 0 0 auto;
}

.consent-block a {
  color: var(--primary);
}

.secondary-guardian-controls {
  margin-top: 20px;
}

.secondary-guardian {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.secondary-action {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease, border-color 150ms ease;
}

.secondary-action:hover {
  background: rgba(255, 255, 255, 0.94);
  transform: translateY(-1px);
}

.secondary-action-muted {
  color: var(--muted);
}

.is-hidden {
  display: none;
}

#submit-button {
  border: 0;
  border-radius: 999px;
  padding: 15px 24px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(10, 91, 139, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

#submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(10, 91, 139, 0.24);
}

#submit-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.form-status {
  min-height: 1.2em;
  margin: 0;
  font-weight: 600;
}

.form-status.error {
  color: #a33636;
}

.form-status.success {
  color: #216b43;
}

@media (max-width: 980px) {
  .page-shell {
    width: min(100%, calc(100% - 24px));
    padding: 24px 0 48px;
  }

  .hero {
    padding: 32px 28px;
  }

  h1 {
    max-width: 100%;
  }
}

@media (max-width: 800px) {
  .page-shell {
    width: min(100%, calc(100% - 20px));
    padding: 20px 0 40px;
  }

  .site-header {
    align-items: center;
    margin-bottom: 24px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .hero,
  .form-card {
    padding: 24px;
  }

  .brand-logo {
    width: clamp(106px, 28vw, 138px);
  }

  h1 {
    font-size: clamp(1.65rem, 7vw, 2.15rem);
    line-height: 1.12;
  }

  .intro {
    margin-top: 14px;
    font-size: 0.96rem;
    line-height: 1.6;
  }

  .section-heading h2 {
    font-size: 1.45rem;
  }

  .section-heading-inline {
    align-items: flex-start;
    flex-direction: column;
  }

  input,
  select,
  textarea {
    padding: 13px 14px;
  }

  .subfield-grid {
    grid-template-columns: 1fr;
  }

  .language-toggle,
  #submit-button {
    min-height: 46px;
  }

  #submit-button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100%, calc(100% - 16px));
    padding: 16px 0 32px;
  }

  .site-header {
    margin-bottom: 18px;
  }

  .hero {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .form-card {
    padding: 20px 18px 22px;
    border-radius: 24px;
  }

  .eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.13em;
  }

  h1 {
    font-size: clamp(1.5rem, 8vw, 1.95rem);
  }

  .intro {
    font-size: 0.92rem;
  }

  .section-heading {
    margin-bottom: 14px;
  }

  .section-heading h2 {
    font-size: 1.3rem;
  }

  .section-heading h3 {
    font-size: 1.15rem;
  }

  .form-section + .form-section {
    margin-top: 24px;
  }

  .field-grid {
    gap: 14px;
  }

  .form-actions {
    margin-top: 24px;
  }
}
