:root {
  color-scheme: light;
  --ink: #0a1914;
  --deep: #0e3028;
  --leaf: #147453;
  --mint: #62d39b;
  --gold: #eac85f;
  --coral: #ef6a52;
  --paper: #f8f4e6;
  --paper-strong: #fffaf0;
  --line: rgba(10, 25, 20, 0.16);
  --muted: #5f6f67;
  --shadow: rgba(8, 28, 21, 0.22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--deep);
  color: var(--ink);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(5, 21, 17, 0.24), rgba(5, 21, 17, 0.04) 52%, rgba(248, 244, 230, 0.96) 80%),
    radial-gradient(circle at 78% 12%, rgba(234, 200, 95, 0.34), transparent 26rem),
    radial-gradient(circle at 16% 26%, rgba(98, 211, 155, 0.28), transparent 22rem);
}

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

button {
  cursor: pointer;
}

.money-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background: #0b251e;
}

.page {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 76svh;
  display: grid;
  align-items: center;
  padding: 72px 20px 52px;
  color: #fffaf0;
}

.hero__content {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.eyebrow,
.kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 980px;
  margin-bottom: 24px;
  color: #fffaf0;
  font-size: 3.5rem;
  line-height: 0.92;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

.hero__lead {
  max-width: 660px;
  margin-bottom: 36px;
  color: rgba(255, 250, 240, 0.88);
  font-size: 1.1rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.hero__stats {
  width: 100%;
  max-width: 760px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 250, 240, 0.28);
  border-bottom: 1px solid rgba(255, 250, 240, 0.22);
  background: rgba(10, 25, 20, 0.18);
  backdrop-filter: blur(12px);
}

.hero__stats div {
  min-width: 0;
  padding: 18px 22px;
  border-right: 1px solid rgba(255, 250, 240, 0.2);
}

.hero__stats div:last-child {
  border-right: 0;
}

.hero__stats strong,
.hero__stats span {
  display: block;
}

.hero__stats strong {
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 1.25rem;
}

.hero__stats span {
  color: rgba(255, 250, 240, 0.78);
  font-size: 0.92rem;
}

.form-section {
  min-height: 48vh;
  padding: 40px 20px 72px;
  background:
    linear-gradient(180deg, rgba(248, 244, 230, 0.94), var(--paper) 24%, #eef9f0);
}

.application {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.88);
  box-shadow: 0 24px 70px rgba(10, 25, 20, 0.12);
}

.form-heading {
  max-width: 700px;
  margin-bottom: 26px;
}

.form-heading h2 {
  margin-bottom: 10px;
  color: var(--deep);
  font-size: 2.2rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.form-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

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

.field,
.choice-group {
  min-width: 0;
}

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

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

.field span,
.choice-group legend {
  color: #203d33;
  font-size: 0.9rem;
  font-weight: 800;
}

.field small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.field-error {
  display: none;
  color: var(--coral) !important;
  font-weight: 800;
}

.field-error.is-visible {
  display: block;
}

.contact-field small {
  text-align: center;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  color: var(--ink);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.field input,
.field select {
  height: 48px;
  padding: 0 14px;
}

.field textarea {
  min-height: 116px;
  resize: vertical;
  padding: 13px 14px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(20, 116, 83, 0.66);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(98, 211, 155, 0.18);
}

.amount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 14px;
  align-items: center;
}

.amount-row input {
  padding: 0;
  accent-color: var(--leaf);
}

.amount-row output {
  min-height: 48px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(20, 116, 83, 0.2);
  border-radius: 8px;
  color: var(--deep);
  background: #edf8ee;
  font-weight: 900;
}

.choice-group,
.bank-section {
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group legend,
.bank-section legend {
  margin-bottom: 8px;
  padding: 0;
  color: #203d33;
  font-size: 0.9rem;
  font-weight: 800;
}

.segments,
.checks {
  display: grid;
  gap: 8px;
}

.segments {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.checks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.messenger-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bank-section {
  display: grid;
  gap: 8px;
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bank-grid--transfer {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.segments label,
.checks label,
.bank-tile,
.consent {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  color: var(--deep);
  font-weight: 700;
}

.segments label,
.checks label,
.bank-tile {
  padding: 0 12px;
}

.segments input,
.checks input,
.bank-tile input,
.consent input {
  flex: 0 0 auto;
  accent-color: var(--leaf);
}

.segments span,
.checks span,
.bank-tile span,
.consent span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.segments label:has(input:checked),
.checks label:has(input:checked),
.bank-tile:has(input:checked) {
  border-color: rgba(20, 116, 83, 0.48);
  background: #e7f8eb;
}

.bank-tile--other {
  border-style: dashed;
  color: #5a4520;
  background: #fff6d8;
}

.bank-section.is-invalid .bank-tile {
  border-color: rgba(239, 106, 82, 0.68);
}

.bank-choice-error {
  display: none;
  grid-column: 1 / -1;
  margin: -6px 0 0;
  color: var(--coral);
  font-size: 0.9rem;
  font-weight: 800;
}

.bank-choice-error.is-visible {
  display: block;
}

.is-hidden {
  display: none;
}

.consent {
  margin-top: 20px;
  padding: 12px 14px;
  line-height: 1.45;
}

.form-actions {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 22px;
}

.form-actions button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  font-weight: 900;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.form-actions button[type="submit"] {
  color: #fffaf0;
  background: var(--leaf);
  box-shadow: 0 14px 26px rgba(20, 116, 83, 0.22);
}

.form-actions button[type="reset"] {
  border: 1px solid var(--line);
  color: var(--deep);
  background: transparent;
}

.form-actions button:hover {
  transform: translateY(-1px);
}

.form-actions button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.form-actions button[type="submit"]:hover {
  background: #0f6348;
}

.form-actions p {
  min-width: 0;
  margin: 0;
  color: var(--leaf);
  font-weight: 800;
  line-height: 1.4;
}

.application.was-validated input:invalid,
.application.was-validated select:invalid,
.application.was-validated .consent:has(input:invalid) {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(239, 106, 82, 0.12);
}

@media (min-width: 760px) {
  h1 {
    font-size: 5.2rem;
  }
}

@media (min-width: 1100px) {
  h1 {
    font-size: 7rem;
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: 72svh;
    padding-top: 54px;
  }

  .hero__lead {
    font-size: 1rem;
  }

  .hero__stats,
  .form-grid,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .hero__stats div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 250, 240, 0.2);
  }

  .hero__stats div:last-child {
    border-bottom: 0;
  }

  .application {
    padding: 24px;
  }

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

  .checks,
  .bank-grid,
  .bank-grid--transfer {
    grid-template-columns: 1fr;
  }

  .amount-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hero {
    padding: 42px 16px 34px;
  }

  h1 {
    font-size: 2.75rem;
    max-width: 21rem;
    overflow-wrap: anywhere;
  }

  .hero__lead,
  .form-heading p:last-child {
    max-width: 21rem;
  }

  .form-section {
    padding: 28px 12px 52px;
  }

  .application {
    padding: 18px;
  }

  .form-heading h2 {
    font-size: 1.8rem;
  }

  .segments,
  .messenger-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
