:root {
  --ink: #1d2433;
  --muted: #677289;
  --line: #dde3f0;
  --panel: #ffffff;
  --soft: #f5f8fc;
  --primary: #5e6fb5;
  --primary-dark: #465796;
  --accent: #ee6196;
  --accent-dark: #d93b78;
  --cyan: #4cc4d8;
  --success: #17825b;
  --warning: #b45309;
  --danger: #c2414b;
  --shadow: 0 22px 70px rgba(37, 48, 84, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(94, 111, 181, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(76, 196, 216, 0.12), transparent 38%),
    #f8fafc;
  font-family: Barlow, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

.site-header,
.site-footer,
main {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: min(245px, 56vw);
  height: auto;
  display: block;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(94, 111, 181, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary-dark);
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(94, 111, 181, 0.08);
}

.header-status span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(23, 130, 91, 0.12);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 34px;
  align-items: center;
  min-height: 520px;
  overflow: hidden;
  padding: clamp(34px, 6vw, 74px);
  border-radius: 8px;
  background:
    radial-gradient(circle at 78% 18%, rgba(238, 97, 150, 0.22), transparent 24%),
    linear-gradient(135deg, #ffffff 0%, #eef4fb 56%, #e7ebf8 100%);
  box-shadow: var(--shadow);
}

.payment-hero {
  grid-template-areas:
    "copy form"
    "signal form";
  grid-template-columns: minmax(0, 0.78fr) minmax(520px, 1.22fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  min-height: 0;
  padding: clamp(24px, 3.6vw, 46px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(94, 111, 181, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 111, 181, 0.12) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, black, transparent 76%);
  pointer-events: none;
}

.hero-copy,
.payment-signal,
.form-section,
.trust-band,
.status-card,
.legal-content {
  position: relative;
}

.payment-hero .hero-copy {
  grid-area: copy;
  display: grid;
  align-content: start;
}

.payment-hero h1 {
  max-width: 460px;
  font-size: clamp(2.25rem, 3.9vw, 3.55rem);
  line-height: 0.98;
}

.payment-hero .lead {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  color: #212529;
  font-size: clamp(2.45rem, 7vw, 5.3rem);
  line-height: 0.94;
  font-weight: 800;
}

h2 {
  color: #212529;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.04;
  font-weight: 800;
}

.lead {
  max-width: 640px;
  color: #44506a;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.security-notice {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 16px;
  align-items: start;
  max-width: 680px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid rgba(94, 111, 181, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.security-notice p {
  margin: 0;
  color: #344059;
  font-weight: 600;
}

.icon-lock,
.trust-icon,
.status-mark {
  display: inline-block;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  position: relative;
}

.icon-lock::before,
.icon-lock::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.icon-lock::before {
  top: 11px;
  width: 16px;
  height: 15px;
  border: 3px solid #fff;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}

.icon-lock::after {
  top: 23px;
  width: 24px;
  height: 15px;
  border-radius: 4px;
  background: #fff;
}

.payment-signal {
  min-height: 340px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(35, 45, 76, 0.96), rgba(70, 87, 150, 0.94)),
    #29365e;
  color: #fff;
  box-shadow: 0 28px 70px rgba(58, 69, 122, 0.28);
}

.payment-hero .payment-signal {
  grid-area: signal;
  min-height: 250px;
  padding: 22px;
}

.payment-signal::after {
  content: "";
  position: absolute;
  right: -72px;
  bottom: -94px;
  width: 220px;
  height: 220px;
  border: 34px solid rgba(238, 97, 150, 0.38);
  border-radius: 50%;
}

.payment-hero .payment-signal::after {
  right: -86px;
  bottom: -118px;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 54px;
}

.payment-hero .signal-grid {
  gap: 10px;
  margin-bottom: 30px;
}

.payment-hero .signal-grid span {
  min-height: 58px;
}

.signal-grid span {
  min-height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    repeating-linear-gradient(90deg, transparent 0 13px, rgba(255, 255, 255, 0.08) 13px 14px);
}

.payment-signal p {
  margin-bottom: 6px;
  color: #b9c5f2;
  font-weight: 700;
  text-transform: uppercase;
}

.payment-signal strong {
  display: block;
  max-width: 260px;
  font-size: 2rem;
  line-height: 1;
}

.payment-signal small {
  display: block;
  max-width: 280px;
  margin-top: 18px;
  color: #e6ebff;
}

.trust-band {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: 28px 0;
}

.hero-trust {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}

.trust-band article {
  min-height: 214px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 36px rgba(40, 52, 92, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-trust article {
  min-height: 0;
  padding: 13px;
}

.hero-trust article:last-child {
  grid-column: 1 / -1;
}

.trust-band article:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(40, 52, 92, 0.11);
}

.trust-band strong {
  display: block;
  margin: 16px 0 8px;
  color: #273048;
  line-height: 1.12;
}

.hero-trust strong {
  margin: 10px 0 4px;
  font-size: 0.95rem;
}

.trust-band p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-trust p {
  font-size: 0.84rem;
  line-height: 1.35;
}

.trust-icon {
  width: 42px;
  height: 42px;
}

.hero-trust .trust-icon {
  width: 34px;
  height: 34px;
}

.hero-trust .trust-icon.shield::before {
  inset: 8px 10px 7px;
}

.hero-trust .trust-icon.stripe::before {
  left: 8px;
  top: 11px;
  width: 18px;
  height: 13px;
}

.hero-trust .trust-icon.stripe::after {
  left: 10px;
  top: 15px;
  width: 14px;
  height: 3px;
}

.hero-trust .trust-icon.card::before {
  left: 7px;
  top: 10px;
  width: 20px;
  height: 15px;
}

.hero-trust .trust-icon.card::after {
  left: 7px;
  top: 14px;
  width: 20px;
  height: 3px;
}

.hero-trust .trust-icon.signal::before {
  left: 9px;
  top: 10px;
  width: 16px;
  height: 16px;
}

.hero-trust .trust-icon.receipt::before {
  left: 9px;
  top: 7px;
  width: 16px;
  height: 21px;
}

.trust-icon::before,
.trust-icon::after {
  content: "";
  position: absolute;
  background: #fff;
}

.trust-icon.shield::before {
  inset: 9px 12px 8px;
  clip-path: polygon(50% 0, 100% 18%, 86% 78%, 50% 100%, 14% 78%, 0 18%);
}

.trust-icon.stripe::before {
  left: 10px;
  top: 13px;
  width: 22px;
  height: 16px;
  border-radius: 3px;
}

.trust-icon.stripe::after {
  left: 12px;
  top: 18px;
  width: 18px;
  height: 3px;
  background: var(--primary);
}

.trust-icon.card::before {
  left: 8px;
  top: 12px;
  width: 26px;
  height: 18px;
  border-radius: 3px;
}

.trust-icon.card::after {
  left: 8px;
  top: 17px;
  width: 26px;
  height: 4px;
  background: var(--primary-dark);
}

.trust-icon.signal::before {
  left: 11px;
  top: 13px;
  width: 20px;
  height: 20px;
  border: 4px solid #fff;
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  background: transparent;
  transform: rotate(-45deg);
}

.trust-icon.receipt::before {
  left: 11px;
  top: 8px;
  width: 20px;
  height: 26px;
  border-radius: 3px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 78% 88%, 55% 100%, 33% 88%, 0 100%);
}

.form-section {
  display: grid;
  grid-template-columns: minmax(230px, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(22px, 4vw, 44px);
  margin-bottom: 32px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.hero-form-card {
  grid-area: form;
  display: block;
  margin: 0;
  padding: clamp(18px, 2.2vw, 28px);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px rgba(40, 52, 92, 0.12);
}

.hero-form-card .section-intro {
  position: static;
  margin-bottom: 18px;
}

.hero-form-card h2 {
  margin-bottom: 8px;
  font-size: clamp(1.45rem, 2vw, 1.95rem);
}

.hero-form-card .section-intro p:last-child {
  margin-bottom: 0;
  font-size: 0.96rem;
}

.section-intro {
  position: sticky;
  top: 22px;
  align-self: start;
}

.section-intro p:last-child {
  color: var(--muted);
}

.payment-form {
  display: grid;
  gap: 22px;
}

.hero-form-card .payment-form {
  gap: 14px;
}

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

.hero-form-card .form-grid {
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
}

label.full {
  grid-column: 1 / -1;
}

label span {
  color: #2c354c;
  font-weight: 700;
}

.hero-form-card label span {
  font-size: 0.94rem;
}

label em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #cfd7e8;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.hero-form-card input {
  min-height: 44px;
  padding: 10px 12px;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(94, 111, 181, 0.14);
}

input[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fffafa;
}

.amount-input {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid #cfd7e8;
  border-radius: 8px;
  background: #fff;
}

.amount-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(94, 111, 181, 0.14);
}

.amount-input input {
  border: 0;
  box-shadow: none;
  background: transparent;
  font-size: 1.25rem;
  font-weight: 800;
}

.hero-form-card .amount-input input {
  font-size: 1.1rem;
}

.amount-input b {
  padding: 0 14px;
  color: var(--primary-dark);
}

.amount-field > small:not(.field-error) {
  color: var(--muted);
}

.field-error {
  min-height: 18px;
  color: var(--danger);
  font-weight: 700;
}

.acceptance {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(94, 111, 181, 0.16);
  border-radius: 8px;
  background: var(--soft);
}

.hero-form-card .acceptance {
  gap: 6px;
  padding: 14px;
}

.check-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
}

.check-row input {
  width: 20px;
  min-height: 20px;
  margin-top: 3px;
  accent-color: var(--primary);
}

.submit-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(94, 111, 181, 0.1), rgba(238, 97, 150, 0.08));
}

.hero-form-card .submit-panel {
  gap: 12px;
  padding: 16px;
}

.hero-form-card .submit-panel p {
  font-size: 0.96rem;
}

.submit-panel p {
  margin: 0;
  color: #39445e;
  font-weight: 600;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  min-height: 54px;
  padding: 14px 24px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 16px 34px rgba(94, 111, 181, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  filter: saturate(1.05);
  box-shadow: 0 20px 42px rgba(94, 111, 181, 0.34);
}

.primary-button:disabled {
  cursor: wait;
  filter: grayscale(0.2);
  opacity: 0.76;
  transform: none;
}

.primary-button span {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.primary-button span::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -9px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.form-message {
  min-height: 24px;
  color: var(--danger);
  font-weight: 800;
}

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

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 38px;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.status-page,
.legal-page {
  min-height: 58vh;
  display: grid;
  place-items: center;
}

.status-card,
.legal-content {
  width: min(820px, 100%);
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.status-card h1 {
  font-size: clamp(2rem, 5vw, 3.7rem);
}

.status-card p {
  color: #44506a;
  font-size: 1.12rem;
}

.status-mark {
  margin-bottom: 20px;
}

.status-mark::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 16px;
  width: 18px;
  height: 10px;
  border-left: 4px solid #fff;
  border-bottom: 4px solid #fff;
  transform: rotate(-45deg);
}

.cancel .status-mark {
  background: linear-gradient(135deg, var(--warning), var(--accent));
}

.cancel .status-mark::before,
.cancel .status-mark::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 11px;
  width: 4px;
  height: 24px;
  border: 0;
  background: #fff;
  transform: rotate(45deg);
}

.cancel .status-mark::after {
  transform: rotate(-45deg);
}

.payment-summary {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.payment-summary div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.payment-summary dt {
  color: var(--muted);
  font-weight: 700;
}

.payment-summary dd {
  margin: 0;
  font-weight: 800;
}

.secondary-link {
  display: inline-flex;
  margin-top: 8px;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}

.legal-page {
  align-items: start;
}

.legal-content {
  margin: 12px 0 36px;
}

.legal-content h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.legal-content h2 {
  margin-top: 28px;
  font-size: 1.35rem;
}

@media (max-width: 980px) {
  .payment-hero {
    grid-template-areas:
      "form"
      "copy"
      "signal";
  }

  .hero,
  .form-section {
    grid-template-columns: 1fr;
  }

  .payment-signal {
    min-height: 280px;
  }

  .trust-band {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .section-intro {
    position: static;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
    padding: 26px;
  }

  .security-notice {
    grid-template-columns: 1fr;
  }

  .payment-signal {
    min-height: 240px;
  }

  .signal-grid {
    margin-bottom: 28px;
  }

  .trust-band,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-trust {
    grid-template-columns: 1fr;
  }

  .trust-band article {
    min-height: auto;
  }

  .form-section {
    padding: 22px;
  }

  label.full {
    grid-column: auto;
  }

  .primary-button {
    width: 100%;
  }

  .payment-summary div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
