:root {
  --navy-950: #081a2c;
  --navy-900: #0d243b;
  --navy-800: #173651;
  --blue: #1f6f8b;
  --teal: #2a8c8a;
  --gold: #dc9f37;
  --gold-light: #f7e7c9;
  --cream: #f8f5ef;
  --paper: #fffdfa;
  --ink: #122235;
  --muted: #657386;
  --line: #dfe5e8;
  --success: #17805f;
  --danger: #b8473f;
  --shadow: 0 24px 70px rgba(8, 26, 44, 0.12);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 8%, rgba(220, 159, 55, 0.13), transparent 28rem),
    var(--cream);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

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

.site-header {
  width: min(720px, calc(100% - 40px));
  height: 88px;
  margin: auto;
  display: flex;
  align-items: center;
}

.brand {
  color: var(--navy-950);
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
  font-family: "Manrope", sans-serif;
  line-height: 1;
}

.brand strong {
  font-size: 20px;
  letter-spacing: -0.025em;
}

.brand small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.19em;
  margin-top: 5px;
}

.brand-mark {
  width: 58px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.hero {
  width: min(720px, calc(100% - 40px));
  margin: 18px auto 88px;
}

.eyebrow,
.step-label {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Manrope", sans-serif;
}

.form-shell {
  background: var(--paper);
  border: 1px solid rgba(13, 36, 59, 0.09);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.language-bar {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(170px, 220px);
  gap: 8px 14px;
  align-items: center;
  padding: 14px 46px;
  color: var(--navy-900);
  background: var(--navy-950);
}

.language-bar label {
  color: white;
  margin: 0;
}

.language-bar select {
  height: 43px;
  margin: 0;
  border-color: rgba(255, 255, 255, 0.32);
}

.language-bar select:disabled {
  cursor: wait;
  opacity: 0.72;
}

#translation-status {
  grid-column: 1 / -1;
  color: #d6e4eb;
  font-size: 12px;
}

.form-heading {
  padding: 42px 46px 34px;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.98), rgba(247, 231, 201, 0.45));
  border-bottom: 1px solid var(--line);
}

.form-heading h2 {
  color: var(--navy-950);
  font-size: 30px;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.form-heading > p:last-child {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

form {
  padding: 0 46px 46px;
}

.form-section {
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
}

.section-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 25px;
}

.section-title > span {
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--navy-900);
  border-radius: 50%;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.section-title h3 {
  font-size: 18px;
  margin: 2px 0 3px;
}

.section-title p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

label {
  display: block;
  color: var(--navy-900);
  font-size: 13px;
  font-weight: 700;
  margin-top: 20px;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfd8de;
  border-radius: 9px;
  outline: 0;
  padding: 0 14px;
  margin-top: 8px;
  transition: border-color 160ms, box-shadow 160ms;
}

input,
select {
  height: 49px;
}

textarea {
  min-height: 92px;
  resize: vertical;
  padding-top: 13px;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42, 140, 138, 0.14);
}

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

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

.phone-grid {
  grid-template-columns: 0.88fr 1.12fr;
}

.field-help,
.privacy-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0 0;
}

.baptism-section {
  padding-bottom: 38px;
}

.photo-upload {
  min-height: 132px;
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 15px;
  align-items: center;
  padding: 20px;
  overflow: hidden;
  color: var(--navy-900);
  background: #fbfcfb;
  border: 1.5px dashed #bdcbd0;
  border-radius: 13px;
  cursor: pointer;
  transition: border-color 160ms, background 160ms, box-shadow 160ms;
}

.photo-upload:hover,
.photo-upload:focus-within {
  background: #f6faf9;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42, 140, 138, 0.1);
}

.photo-upload input {
  width: 1px;
  height: 1px;
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.photo-upload-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: #e5f3f1;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 500;
}

.photo-upload-copy {
  min-width: 0;
}

.photo-upload-copy strong,
.photo-upload-copy small {
  display: block;
}

.photo-upload-copy strong {
  font-size: 14px;
}

.photo-upload-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

.photo-upload.has-photo {
  min-height: 178px;
  grid-template-columns: 1fr 142px;
  border-style: solid;
}

.photo-upload.has-photo .photo-upload-icon {
  display: none;
}

.photo-upload.has-photo img {
  width: 142px;
  height: 136px;
  display: block;
  grid-column: 2;
  grid-row: 1;
  object-fit: cover;
  border-radius: 10px;
}

.profile-photo-upload.has-photo img {
  aspect-ratio: 1;
  border-radius: 50%;
}

.permission-section {
  border-bottom: 0;
  padding-bottom: 24px;
}

.check-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--teal);
}

.check-row strong {
  color: var(--navy-900);
  display: block;
  font-size: 14px;
}

.radio-group {
  margin-top: 20px;
}

.radio-group > span {
  display: block;
  color: var(--navy-900);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
}

.radio-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.privacy-note {
  padding-left: 2px;
  margin-top: 16px;
}

.primary-button,
.secondary-button {
  border: 0;
  cursor: pointer;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
}

.primary-button {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background: var(--navy-900);
  border-radius: 10px;
  padding: 0 20px;
  transition: transform 160ms, background 160ms;
}

.primary-button:hover {
  background: var(--navy-800);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.form-message {
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 14px;
  padding: 13px 15px;
}

.form-message.error {
  color: #7f2e29;
  background: #fcede9;
  border: 1px solid #edc9c4;
}

.success-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(8, 26, 44, 0.76);
  backdrop-filter: blur(8px);
}

.success-screen[hidden] {
  display: none;
}

.success-card {
  width: min(560px, 100%);
  background: var(--paper);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.27);
  padding: 48px;
  text-align: center;
}

.success-logo {
  width: 128px;
  height: 88px;
  position: relative;
  margin: 0 auto 22px;
}

.success-logo > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.success-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--success);
  border: 3px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(8, 26, 44, 0.16);
  font-size: 14px;
  font-weight: 800;
  position: absolute;
  right: 5px;
  bottom: 1px;
}

.success-card h2 {
  color: var(--navy-950);
  font-size: 32px;
  margin-bottom: 14px;
}

.success-card > p {
  color: var(--muted);
  line-height: 1.65;
}

.next-steps {
  text-align: left;
  background: var(--cream);
  border-radius: 14px;
  margin: 28px 0;
  padding: 22px;
}

.next-steps h3 {
  font-size: 15px;
}

.next-steps ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.next-steps li {
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 10px;
  align-items: center;
  color: var(--navy-800);
  font-size: 14px;
  padding: 8px 0;
}

.next-steps li span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: white;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.next-steps li .next-step-copy {
  width: auto;
  height: auto;
  display: inline;
  color: var(--navy-800);
  background: transparent;
  border-radius: 0;
  font-size: 14px;
  font-weight: 400;
}

.secondary-button {
  min-height: 47px;
  color: var(--navy-900);
  background: transparent;
  border: 1px solid #cdd6dc;
  border-radius: 9px;
  padding: 0 20px;
}

footer {
  color: #aeb8c1;
  background: var(--navy-950);
  display: flex;
  justify-content: space-between;
  padding: 28px max(20px, calc((100% - 720px) / 2));
}

footer p {
  margin: 0;
  font-size: 13px;
}

@media (max-width: 580px) {
  .site-header,
  .hero {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    height: 78px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 47px;
    height: 40px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    font-size: 6px;
    letter-spacing: 0.15em;
  }

  .hero {
    margin-top: 8px;
    margin-bottom: 50px;
  }

  .form-heading,
  form {
    padding-left: 23px;
    padding-right: 23px;
  }

  .language-bar {
    grid-template-columns: 1fr;
    padding: 15px 23px;
  }

  .language-bar select {
    width: 100%;
  }

  .form-heading {
    padding-top: 30px;
  }

  .field-grid.two,
  .phone-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .photo-upload.has-photo {
    grid-template-columns: 1fr;
  }

  .photo-upload.has-photo img {
    width: 100%;
    height: 190px;
    grid-column: 1;
    grid-row: 2;
  }

  .profile-photo-upload.has-photo img {
    width: 190px;
    height: 190px;
    justify-self: center;
  }

  .success-card {
    padding: 34px 22px;
  }

  footer {
    gap: 10px;
    flex-direction: column;
  }
}
