:root {
  --bg: #080a0d;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --text: #f7f7f2;
  --muted: #a9b0ad;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #c7ff4a;
  --accent-2: #86f7c5;
  --danger: #ff6b6b;
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(199, 255, 74, 0.20), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(134, 247, 197, 0.16), transparent 28rem),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: center;
  padding: 36px 0;
}

.hero-panel,
.form-panel {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045));
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.hero-panel {
  min-height: 720px;
  border-radius: var(--radius-xl);
  padding: 42px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -140px;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  border: 1px solid rgba(199, 255, 74, 0.35);
  box-shadow: inset 0 0 80px rgba(199, 255, 74, 0.08);
}

.brand-logo {
  height: 64px;
  width: auto;
  display: block;
  align-self: flex-start;
  margin-bottom: 16px;
  animation: flotar 4s ease-in-out infinite;
}

@keyframes flotar {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(-8px); }
}

.modal-logo {
  height: 48px;
  margin: 0 auto 20px;
  animation: none;
}

.brand-pill,
.eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(199, 255, 74, 0.28);
  color: var(--accent);
  background: rgba(199, 255, 74, 0.08);
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-panel h1 {
  max-width: 520px;
  margin: 28px 0 16px;
  font-size: clamp(48px, 7vw, 84px);
  line-height: 0.88;
  letter-spacing: -0.075em;
}

.hero-panel p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.hero-stats article {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.18);
}

.hero-stats strong {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #10130d;
  background: var(--accent);
}

.hero-stats span {
  color: #e8ece7;
  font-weight: 600;
}

.form-panel {
  border-radius: var(--radius-xl);
  padding: 28px;
  min-height: 720px;
}

.form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.form-header h2 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.05em;
}


.progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  margin-bottom: 12px;
}

.step-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}

.step-dot {
  height: 6px;
  width: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transition: width 260ms ease, background 260ms ease;
}

.step-dot.is-done {
  background: rgba(199, 255, 74, 0.45);
}

.step-dot.is-active {
  width: 22px;
  background: var(--accent);
}

.progress-bar {
  height: 100%;
  width: 25%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 260ms ease;
}

form {
  display: block;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.form-step {
  display: none;
  animation: fadeUp 240ms ease;
}

.form-step.is-active {
  display: grid;
  gap: 18px;
}

.field,
.field-group {
  display: grid;
  gap: 10px;
}

.field span,
.field-group p {
  margin: 0;
  color: #f6f8f3;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: none;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  padding: 16px 17px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

input[type="date"] {
  color-scheme: dark;
}

textarea {
  resize: vertical;
  min-height: 116px;
}

input:focus,
textarea:focus {
  border-color: rgba(199, 255, 74, 0.78);
  background: rgba(0, 0, 0, 0.34);
}

input::placeholder,
textarea::placeholder {
  color: rgba(247, 247, 242, 0.36);
}

.options-grid,
.options-stack {
  display: grid;
  gap: 12px;
}

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

.option-card {
  position: relative;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.22);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.option-card.wide {
  justify-content: flex-start;
  text-align: left;
}

.option-card:hover {
  transform: translateY(-1px);
  border-color: rgba(199, 255, 74, 0.36);
  background: rgba(255, 255, 255, 0.08);
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card span {
  color: #edf0ea;
  font-size: 14px;
  font-weight: 700;
}

.option-card span em {
  display: block;
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.option-card:has(input:checked) {
  border-color: rgba(199, 255, 74, 0.85);
  background: rgba(199, 255, 74, 0.12);
}

.option-card:has(input:checked)::after {
  content: "✓";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: auto;
  border-radius: 999px;
  color: #10130d;
  background: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.error {
  display: none;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.field.is-invalid input,
.field.is-invalid textarea,
.field-group.is-invalid .option-card {
  border-color: rgba(255, 107, 107, 0.78);
}

.field.is-invalid .error,
.field-group.is-invalid .error {
  display: block;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.btn {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  cursor: pointer;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  color: #10130d;
  background: var(--accent);
}

.form-actions .btn.primary {
  margin-left: auto;
}

.btn.ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.option-card:focus-within,
.btn:focus-visible,
.btn-link:focus-visible {
  outline: 2px solid rgba(199, 255, 74, 0.9);
  outline-offset: 3px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.privacy-note,
.form-status {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.privacy-note a {
  color: var(--accent);
  font-weight: 700;
}

.form-status {
  min-height: 20px;
  font-weight: 700;
}

.form-status:empty {
  display: none;
}

.form-status.is-error {
  color: var(--danger);
}

.form-status.is-success {
  color: var(--accent);
}

.is-hidden {
  display: none !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 10, 13, 0.72);
  backdrop-filter: blur(14px);
  animation: fadeIn 220ms ease;
}

.modal-overlay[hidden] {
  display: none;
}

.success-card {
  max-width: 480px;
  width: 100%;
  padding: 40px 36px;
  border: 1px solid rgba(199, 255, 74, 0.28);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(255,255,255,0.13), rgba(255,255,255,0.05));
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  text-align: center;
  animation: fadeUp 300ms ease;
}

.success-check {
  width: 72px;
  height: 72px;
  display: block;
  margin: 0 auto 24px;
}

.check-circle {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.1s forwards;
}

.check-mark {
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawMark 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.65s forwards;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 8px 0 4px;
}

.modal-actions .btn {
  width: 100%;
}

.modal-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wa-btn {
  background: #25d366;
  color: #fff;
}

.wa-btn:hover {
  background: #1ebe5c;
}

.btn-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 8px;
  text-decoration: underline;
}

.btn-link:hover {
  color: var(--text);
}

.success-card h3 {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.success-card p {
  max-width: 460px;
  margin: 0 auto 22px;
  color: var(--muted);
  line-height: 1.6;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes drawMark {
  to { stroke-dashoffset: 0; }
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 0;
  }

  .hero-panel,
  .form-panel {
    min-height: auto;
  }

  .hero-panel {
    padding: 28px;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 32px, 1180px);
    gap: 12px;
  }

  .hero-panel {
    border-radius: 24px;
    padding: 22px 22px 18px;
  }

  .hero-panel::after {
    display: none;
  }

  .hero-panel h1 {
    font-size: 38px;
    margin: 18px 0 12px;
  }

  .hero-panel p {
    font-size: 14px;
    line-height: 1.6;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 16px;
    gap: 8px;
  }

  .hero-stats article {
    padding: 12px 14px;
  }

  .hero-stats strong {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .form-panel {
    border-radius: 24px;
    padding: 22px;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .form-header {
    align-items: center;
  }

  .form-step.is-active {
    padding-bottom: 88px;
  }

  .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-inline: -22px;
    padding: 14px 22px max(14px, env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(8, 10, 13, 0.97) 40%, rgba(8, 10, 13, 0.75), transparent);
    backdrop-filter: blur(12px);
  }

  .form-actions .btn {
    flex: 1;
    padding-inline: 16px;
  }

  /* Modal como bottom sheet en móvil */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .success-card {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 92vh;
    overflow-y: auto;
    padding: 32px 24px max(28px, env(safe-area-inset-bottom));
    animation: slideUp 320ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .modal-logo {
    height: 40px;
    margin-bottom: 16px;
  }

  .success-check {
    width: 58px;
    height: 58px;
    margin-bottom: 16px;
  }
}

@media (max-width: 400px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
  }

  .hero-panel {
    padding: 18px;
  }

  .hero-panel h1 {
    font-size: 30px;
    margin: 14px 0 10px;
  }

  .hero-panel p {
    display: none;
  }

  .hero-stats article {
    padding: 10px 12px;
  }

  .form-panel {
    border-radius: 20px;
    padding: 18px;
  }

  .form-actions {
    margin-inline: -18px;
    padding: 14px 18px max(12px, env(safe-area-inset-bottom));
  }

  .brand-pill {
    font-size: 10px;
    padding: 7px 11px;
  }

  .form-header h2 {
    font-size: 26px;
  }

  .modal-split {
    grid-template-columns: 1fr;
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
