:root {
  --orange: #e64415;
  --orange-light: #ff5722;
  --orange-dark: #c62828;
  --bg: #0f1114;
  --bg-elevated: #171a1f;
  --bg-card: #1c2028;
  --surface: #242933;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f5f7;
  --text-muted: #9aa3b2;
  --text-soft: #6b7585;
  --success: #2ecc71;
  --error: #ff5252;
  --font: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --transition: 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(230, 68, 21, 0.18), transparent),
    radial-gradient(circle at 100% 100%, rgba(230, 68, 21, 0.08), transparent 40%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--orange-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #ff7043;
}

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(15, 17, 20, 0.82);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  transition: opacity var(--transition);
}

.brand:hover {
  color: inherit;
  opacity: 0.85;
}

.brand__logo {
  width: auto;
  height: 20px;
}

@media (min-width: 600px) {
  .brand__logo {
    height: 22px;
  }
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: rgba(230, 68, 21, 0.12);
  border: 1px solid rgba(230, 68, 21, 0.25);
  color: #ffb74d;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero {
  padding: 4rem 0 3rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero__title {
  margin: 0 0 1rem;
  font-family: var(--font);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero__title em {
  font-style: normal;
  color: var(--orange-light);
}

.hero__lead {
  margin: 0 0 1.75rem;
  max-width: 52ch;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.stat {
  flex: 1 1 140px;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.stat:hover {
  transform: translateY(-3px);
  border-color: rgba(230, 68, 21, 0.35);
  background: rgba(230, 68, 21, 0.06);
}

.stat__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.stat__label {
  font-size: 0.85rem;
  color: var(--text-soft);
}

.card {
  background: linear-gradient(180deg, rgba(36, 41, 51, 0.95), rgba(28, 32, 40, 0.98));
  border: 1px solid var(--border);
  overflow: hidden;
}

.card__header {
  padding: 1.5rem 1.75rem 0;
}

.card__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.card__subtitle {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.steps {
  display: flex;
  gap: 0.5rem;
  padding: 1.25rem 1.75rem 0;
}

.step-dot {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.step-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.step-dot.is-active::after,
.step-dot.is-done::after {
  transform: scaleX(1);
}

.card__body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.form-panel {
  display: none;
  animation: panel-in 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.form-panel.is-visible {
  display: block;
}

@keyframes panel-in {
  from {
    opacity: 0;
    translate: 0 12px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.input-wrap {
  position: relative;
}

.input-wrap svg {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  translate: 0 -50%;
  width: 18px;
  height: 18px;
  color: var(--text-soft);
  pointer-events: none;
  transition: color var(--transition);
}

.field input,
.field select {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.65rem;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  outline: none;
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition);
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239aa3b2' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 4 3.5-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

.field input:hover,
.field select:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.32);
}

.field input:focus,
.field select:focus {
  border-color: var(--orange-light);
  transform: translateY(-1px);
}

.field:focus-within svg {
  color: var(--orange-light);
}

.field input:user-valid:not(:placeholder-shown),
.field select:user-valid:not([value=""]) {
  border-color: rgba(46, 204, 113, 0.45);
}

.field input:user-invalid:not(:placeholder-shown):not(:focus),
.field select:user-invalid:not(:focus) {
  border-color: rgba(255, 82, 82, 0.55);
}

.field-error {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--error);
}

.field.is-invalid .field-error {
  display: block;
}

.field.is-invalid input,
.field.is-invalid select {
  border-color: rgba(255, 82, 82, 0.65);
  animation: shake 380ms ease;
}

@keyframes shake {
  0%, 100% { translate: 0; }
  25% { translate: -4px; }
  75% { translate: 4px; }
}

.summary-list {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  overflow: hidden;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.summary-list li:last-child {
  border-bottom: none;
}

.summary-list span:first-child {
  color: var(--text-muted);
}

.field-optional {
  font-weight: 400;
  color: var(--text-soft);
}

.optional-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.optional-banner__tag {
  flex-shrink: 0;
  padding: 0.2rem 0.5rem;
  background: rgba(230, 68, 21, 0.15);
  border: 1px solid rgba(230, 68, 21, 0.3);
  color: #ffb74d;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.optional-banner__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.ancestors-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.ancestor-row {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
  transition: border-color var(--transition), background var(--transition);
}

.ancestor-row:focus-within {
  border-color: rgba(230, 68, 21, 0.35);
  background: rgba(230, 68, 21, 0.04);
}

.ancestor-row__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.ancestor-row__label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.ancestor-row__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.ancestor-row__remove:hover {
  color: var(--error);
  border-color: rgba(255, 82, 82, 0.45);
  background: rgba(255, 82, 82, 0.08);
}

.ancestor-row .field input,
.ancestor-row .field select {
  padding-left: 1rem;
}

.ancestor-row__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.75rem;
}

@media (max-width: 560px) {
  .ancestor-row__grid {
    grid-template-columns: 1fr;
  }
}

.btn--add {
  width: 100%;
  margin-bottom: 1.25rem;
}

.summary-list span:last-child {
  font-weight: 600;
  text-align: right;
  max-width: 55%;
  word-break: break-word;
}

.price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  background: rgba(230, 68, 21, 0.1);
  border: 1px solid rgba(230, 68, 21, 0.28);
}

.price-box__label {
  color: var(--text-muted);
}

.price-box__amount {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffb74d;
  letter-spacing: -0.02em;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border: none;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform var(--transition),
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  flex: 1 1 auto;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
}

.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.22), transparent 70%);
  translate: -120% 0;
  transition: translate 600ms ease;
}

.btn--primary:hover {
  transform: translateY(-2px);
}

.btn--primary:hover::before {
  translate: 120% 0;
}

.btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--ghost {
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-strong);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.btn__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  display: none;
}

.btn.is-loading .btn__spinner {
  display: block;
}

.btn.is-loading .btn__label {
  opacity: 0.75;
}

@keyframes spin {
  to { rotate: 360deg; }
}

.features {
  padding: 1rem 0 4rem;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 800px) {
  .features__grid {
    grid-template-columns: 1fr;
  }
}

.feature {
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.feature:hover {
  transform: translateY(-4px);
  border-color: rgba(230, 68, 21, 0.25);
  background: rgba(230, 68, 21, 0.04);
}

.feature__icon {
  width: 42px;
  height: 42px;
  margin-bottom: 0.85rem;
  display: grid;
  place-items: center;
  background: rgba(230, 68, 21, 0.12);
  color: var(--orange-light);
}

.feature h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.88rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  max-width: 360px;
  padding: 0.9rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  translate: 0 120%;
  opacity: 0;
  transition:
    translate 420ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 420ms ease;
}

.toast.is-visible {
  translate: 0 0;
  opacity: 1;
}

.toast--error {
  border-color: rgba(255, 82, 82, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
