:root {
  --ink: #122032;
  --muted: #65748a;
  --line: rgba(18, 32, 50, 0.12);
  --card: rgba(255, 255, 255, 0.82);
  --card-solid: #ffffff;
  --soft: #f6f8fb;
  --primary: rgb(0, 129, 161);
  --primary-dark: #136286;
  --accent: rgba(202, 28, 101, 0.568);
  --danger: #b83030;
  --success: #16834f;
  --shadow: 0 24px 50px rgba(0, 0, 0, 0.295);
  --radius: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%,  rgba(156, 36, 255, 0.322), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(150, 234, 255, 0.281), transparent 30%),
    linear-gradient(135deg, #fbfcf8 0%, #eef7f4 48%, #f8f2e3 100%);
  overflow-x: hidden;
}

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

a { color: inherit; }

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(12px);
  opacity: .7;
  pointer-events: none;
  animation: floaty 13s ease-in-out infinite;
  z-index: -1;
}

.ambient-one { width: 340px; height: 340px; left: -120px; top: 14%; background: rgba(23, 107, 87, .12); }
.ambient-two { width: 420px; height: 420px; right: -160px; top: 4%; background: rgba(214, 168, 75, .18); animation-delay: -4s; }
.ambient-three { width: 320px; height: 320px; right: 18%; bottom: -160px; background: rgba(41, 102, 181, .11); animation-delay: -7s; }

@keyframes floaty {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(22px, -26px, 0) scale(1.06); }
}

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

.reveal {
  animation: rise .72s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(270px, .75fr);
  gap: 28px;
  min-height: 320px;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid rgba(255, 220, 252, 0.541);
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(241, 230, 255, 0.589), rgba(255,255,255,.58));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  overflow: hidden;
  position: relative;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -80px -110px auto;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(23, 107, 87, .18), transparent 67%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-dark);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 7px rgba(214,168,75,.16);
}

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

h1 {
  margin: 18px 0 18px;
  max-width: 760px;
  font-size: clamp(2.2rem, 5.4vw, 4.85rem);
  line-height: .95;
  letter-spacing: -.06em;
}

.hero-copy p {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
  margin-bottom: 0;
}

.hero-graphic {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
}

.orb {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #58ad91);
  box-shadow: 0 28px 60px rgba(23,107,87,.28);
}

.orb-main { width: 190px; height: 190px; animation: pulse 4.8s ease-in-out infinite; }
.orb-small { width: 74px; height: 74px; right: 14%; top: 18%; background: linear-gradient(135deg, var(--accent), #f0d591); animation: floaty 7s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.family-card {
  position: absolute;
  min-width: 112px;
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 22px;
  background: rgba(255,255,255,.78);
  color: var(--ink);
  box-shadow: 0 16px 42px rgba(18,32,50,.13);
  font-weight: 800;
  backdrop-filter: blur(15px);
}

.mini-card-a { left: 8%; top: 22%; transform: rotate(-8deg); }
.mini-card-b { right: 4%; bottom: 18%; transform: rotate(7deg); }
.mini-card-c { left: 24%; bottom: 4%; transform: rotate(-2deg); }

.progress-wrap {
  position: sticky;
  top: 12px;
  z-index: 10;
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 22px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(18,32,50,.08);
}

.progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 10px;
}

.progress-top strong { color: var(--primary-dark); }

.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(18,32,50,.08);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 13%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: inherit;
  transition: width .35s ease;
}

.form-card {
  display: grid;
  gap: 20px;
}

.form-section {
  border: 1px solid rgba(255,255,255,.8);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 20px 60px rgba(18,32,50,.1);
  backdrop-filter: blur(20px);
  padding: clamp(20px, 4vw, 34px);
}

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

.section-heading.with-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.section-heading span {
  display: inline-flex;
  padding: 7px 12px;
  margin-bottom: 10px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(23,107,87,.1);
  font-weight: 850;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.section-heading h2 {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: -.035em;
}

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

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }

.field {
  display: grid;
  gap: 8px;
}

.field > span, .block-field > span {
  color: #31425a;
  font-size: .92rem;
  font-weight: 800;
}

.required > span::after, .required-file strong::after, .checkbox-line.required span::after, .married-required > span::after {
  content: " *";
  color: var(--danger);
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  color: var(--ink);
  padding: 15px 16px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: rgba(23,107,87,.55);
  box-shadow: 0 0 0 5px rgba(23,107,87,.1);
  background: #fff;
}

.locked input {
  color: var(--primary-dark);
  font-weight: 900;
  background: rgba(23,107,87,.08);
}

.block-field, .document-zone { margin-top: 18px; }

.other-field {
  margin-top: 16px;
  max-width: 540px;
  display: none;
}

.other-field.show { display: grid; animation: softDrop .28s ease both; }

.chip-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip-group label { cursor: pointer; }
.chip-group input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.chip-group span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.64);
  color: #40526a;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.chip-group input:checked + span {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(23, 107, 87, 0.192);
  transform: translateY(-1px);
}

.soft-panel {
  border: 1px solid rgba(18,32,50,.09);
  border-radius: 24px;
  background: rgba(255,255,255,.62);
  padding: 22px;
}

.soft-panel h3, .document-zone h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
}

.soft-panel p { color: var(--muted); line-height: 1.6; }

.conditional-panel { margin-top: 18px; }

.hidden { display: none !important; }

@keyframes softDrop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.document-zone {
  padding-top: 22px;
  border-top: 1px dashed rgba(18,32,50,.14);
}

.upload-card {
  position: relative;
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 154px;
  padding: 22px;
  border: 1.5px dashed rgba(23,107,87,.26);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,.75), rgba(246,248,251,.75));
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, background .2s ease, box-shadow .2s ease;
  overflow: hidden;
}

.upload-card:hover {
  border-color: rgba(23,107,87,.6);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(18,32,50,.08);
}

.upload-card input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(23,107,87,.12);
  color: var(--primary-dark);
  font-weight: 900;
}

.upload-card strong { font-size: 1rem; }
.upload-card small { color: var(--muted); line-height: 1.4; word-break: break-word; }
.upload-card.compact { min-height: 120px; padding: 18px; }
.wide-upload { max-width: 520px; }

.upload-card.is-selected {
  border-style: solid;
  border-color: rgba(23,107,87,.5);
  background: rgba(23,107,87,.06);
}

.upload-card.is-uploading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
  transform: translateX(-100%);
  animation: shine 1.1s linear infinite;
}

.upload-card.is-complete {
  border-style: solid;
  border-color: rgba(22,131,79,.55);
}

.upload-card.is-failed {
  border-style: solid;
  border-color: rgba(184,48,48,.6);
}

@keyframes shine { to { transform: translateX(100%); } }

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

.doc-mini-grid { margin-top: 16px; }

.children-list {
  display: grid;
  gap: 18px;
}

.child-card {
  animation: softDrop .28s ease both;
}

.child-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.child-card-top h3 { margin: 0; }

.remove-child {
  border: 0;
  border-radius: 999px;
  background: rgba(184,48,48,.1);
  color: var(--danger);
  padding: 10px 14px;
  font-weight: 850;
  cursor: pointer;
}

.declaration-box {
  display: grid;
  gap: 18px;
  border: 1px solid rgba(23,107,87,.16);
  border-radius: 24px;
  padding: 22px;
  background: rgba(23,107,87,.06);
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #31425a;
  font-weight: 700;
  line-height: 1.55;
}

.checkbox-line input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}

.approval-grid {
  display: grid;
  grid-template-columns: 150px repeat(3, 1fr);
  gap: 10px;
  align-items: center;
}

.approval-header {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.form-message {
  min-height: 0;
  display: none;
  border-radius: 20px;
  padding: 16px 18px;
  font-weight: 800;
  line-height: 1.5;
}

.form-message.show { display: block; animation: softDrop .25s ease both; }
.form-message.error { color: #7a1414; background: rgba(184,48,48,.1); border: 1px solid rgba(184,48,48,.18); }
.form-message.info { color: var(--primary-dark); background: rgba(23,107,87,.1); border: 1px solid rgba(23,107,87,.18); }

.submit-row {
  position: sticky;
  bottom: 12px;
  display: flex;
  justify-content: flex-end;
  z-index: 9;
}

.primary-btn, .secondary-btn, .ghost-btn {
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 230px;
  min-height: 58px;
  padding: 16px 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 40px rgba(23,107,87,.28);
  overflow: hidden;
}

.primary-btn:hover, .secondary-btn:hover, .ghost-btn:hover { transform: translateY(-2px); }
.primary-btn:disabled { cursor: not-allowed; opacity: .82; transform: none; }

.secondary-btn {
  padding: 13px 18px;
  color: var(--primary-dark);
  background: rgba(23,107,87,.1);
}

.ghost-btn {
  padding: 11px 15px;
  color: var(--muted);
  background: rgba(18,32,50,.06);
}

.btn-loader {
  display: none;
  width: 23px;
  height: 23px;
  border: 3px solid rgba(255,255,255,.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .72s linear infinite;
}

.primary-btn.loading .btn-label { display: none; }
.primary-btn.loading .btn-loader { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 880px) {
  .hero-card, .grid.two, .grid.three, .split-panels { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .hero-graphic {
  display: none;
  }
  .approval-grid { grid-template-columns: 1fr; }
  .approval-header { display: none; }
  .section-heading.with-action { flex-direction: column; }
  .submit-row { position: static; justify-content: stretch; }
  .primary-btn { width: 100%; }
  .orb-main,
  .orb-small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
