*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --rose: #9b7a6f;
  --rose-light: #b8958a;
  --rose-dark: #7d6158;
  --rose-glow: rgba(155, 122, 111, 0.28);
  --rose-tint: rgba(155, 122, 111, 0.1);
  --gray: #6c7072;
  --gray-light: #8a8e90;
  --bg: #faf6f3;
  --bg-warm: #f3ece6;
  --surface: #ffffff;
  --surface-hover: #fdf9f7;
  --border: rgba(155, 122, 111, 0.28);
  --border-focus: var(--rose);
  --text: #2c2826;
  --text-muted: #7a7572;
  --error: #c44;
  --radius: 14px;
  --font: "Outfit", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: linear-gradient(165deg, #faf6f3 0%, #f3ece6 45%, #faf6f3 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background decor ── */
.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-decor__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.bg-decor__orb--1 {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(155, 122, 111, 0.14) 0%, transparent 70%);
}

.bg-decor__orb--2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: -80px;
  background: radial-gradient(circle, rgba(184, 149, 138, 0.12) 0%, transparent 70%);
}

.bg-decor__pattern {
  position: absolute;
  bottom: -60px;
  right: -40px;
  width: 360px;
  height: 360px;
  color: var(--rose);
  opacity: 0.08;
}

/* ── Navbar ── */
.navbar {
  position: relative;
  z-index: 1;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.navbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar__brand {
  display: block;
  line-height: 0;
  transition: opacity 0.2s;
}

.navbar__brand:hover {
  opacity: 0.9;
}

.navbar__logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
  background: transparent;
}

/* ── Layout ── */
.layout {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 3.5rem;
  align-items: start;
}

/* ── Hero panel ── */
.hero {
  padding-top: 1rem;
}

.hero__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose-dark);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.75rem;
  background: var(--rose-tint);
}

.hero__title {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.hero__title em {
  font-style: normal;
  color: var(--rose);
  position: relative;
}

.hero__title em::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--rose), transparent);
  border-radius: 2px;
  opacity: 0.6;
}

.hero__text {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 340px;
}

.hero__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero__features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--gray);
}

.hero__features li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rose);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--rose-glow);
}

/* ── Form area ── */
.form-area {
  position: relative;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.form__section {
  position: relative;
  padding-left: 1.25rem;
  border-left: 2px solid transparent;
  border-image: linear-gradient(to bottom, var(--rose), rgba(155, 122, 111, 0.1)) 1;
}

.section-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head__num {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--rose);
  letter-spacing: 0.05em;
  padding-top: 0.25rem;
  opacity: 0.8;
}

.section-head h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.15rem;
}

.section-head p {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 300;
}

.form__row {
  display: grid;
  gap: 1rem;
}

.form__row--2 {
  grid-template-columns: 1fr 1fr;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.form__row .form__field {
  margin-bottom: 0;
}

.form__row + .form__field,
.form__row + .form__row {
  margin-top: 1rem;
}

label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gray);
}

.required {
  color: var(--rose);
}

.optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.form__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 300;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font);
  font-size: 0.975rem;
  font-weight: 400;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  box-shadow: 0 1px 3px rgba(44, 40, 38, 0.04);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

input::placeholder {
  color: #b8b2ae;
}

input:hover {
  background: var(--surface-hover);
  border-color: rgba(155, 122, 111, 0.45);
}

input:focus {
  border-color: var(--border-focus);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(155, 122, 111, 0.15);
}

input.field--autofilled {
  border-color: var(--rose);
  background: rgba(155, 122, 111, 0.06);
}

input:read-only {
  background: var(--bg-warm);
  cursor: default;
}

input:read-only:hover {
  background: var(--bg-warm);
  border-color: var(--border);
}

/* ── Phone input ── */
.phone-input {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.phone-input:hover {
  background: var(--surface-hover);
  border-color: rgba(155, 122, 111, 0.35);
}

.phone-input:focus-within {
  border-color: var(--border-focus);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(155, 122, 111, 0.15);
}

.phone-input.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(224, 112, 112, 0.12);
}

.phone-input__prefix {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  background: var(--rose-tint);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.phone-input__flag {
  border-radius: 2px;
  display: block;
}

.phone-input__code {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--rose-dark);
}

.phone-input__select {
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--rose-dark);
  cursor: pointer;
  padding: 0;
  min-width: 3.25rem;
  max-width: 4.5rem;
}

.phone-input__select:focus {
  outline: none;
}

.phone-input input {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  flex: 1;
}

.phone-input input:focus {
  box-shadow: none;
  background: transparent;
}

/* ── Country input ── */
.country-input {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 1rem 0 1rem;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.country-input:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(155, 122, 111, 0.15);
}

.country-input__flag {
  border-radius: 2px;
  flex-shrink: 0;
}

.country-input__select {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.8rem 0;
  font-family: var(--font);
  font-size: 0.975rem;
  color: var(--text);
  cursor: pointer;
  box-shadow: none !important;
}

.country-input__select:focus {
  outline: none;
}

.form__field.invalid input,
.form__field.invalid .country-input,
.form__field.invalid .phone-input {
  border-color: var(--error);
}

/* ── Consent checkboxes ── */
.consent-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.consent-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 1rem 1.125rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(44, 40, 38, 0.04);
  transition: border-color 0.2s, background 0.2s;
}

.consent-item:hover {
  background: var(--surface-hover);
  border-color: rgba(155, 122, 111, 0.45);
}

.consent-item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.consent-item__box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 2px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}

.consent-item input:checked + .consent-item__box {
  background: var(--rose);
  border-color: var(--rose);
}

.consent-item input:checked + .consent-item__box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.consent-item input:focus-visible + .consent-item__box {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.consent-item.invalid {
  border-color: var(--error);
  background: rgba(204, 68, 68, 0.04);
}

.consent-item__text {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.link-btn {
  font-family: var(--font);
  font-size: inherit;
  font-weight: 600;
  color: var(--rose-dark);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* ── Modal ── */
.modal {
  width: min(680px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  margin: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(44, 40, 38, 0.18);
  background: var(--surface);
  color: var(--text);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
}

.modal:not([open]) {
  display: none;
}

.modal--result {
  width: min(420px, calc(100vw - 2rem));
}

.modal::backdrop {
  background: rgba(44, 40, 38, 0.45);
  backdrop-filter: blur(4px);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.modal__header h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.modal__close:hover {
  background: var(--rose-tint);
  color: var(--rose-dark);
}

.modal__body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(100vh - 12rem);
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text);
}

.modal__body p {
  margin-bottom: 1rem;
}

.modal__body h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--rose-dark);
  margin: 1.5rem 0 0.75rem;
}

.modal__body h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray);
  margin: 1.25rem 0 0.5rem;
}

.modal__body ul {
  margin: 0 0 1rem 1.25rem;
}

.modal__body li {
  margin-bottom: 0.35rem;
}

.modal__footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
}

.modal--result .modal__body {
  text-align: center;
  font-size: 0.975rem;
  padding-top: 0.5rem;
}

.modal--result .modal__header h2 {
  width: 100%;
  text-align: center;
  padding-right: 2rem;
}

.modal--success .modal__header {
  background: linear-gradient(180deg, rgba(155, 122, 111, 0.12), transparent);
}

.modal--error .modal__header {
  background: linear-gradient(180deg, rgba(224, 112, 112, 0.12), transparent);
}

.modal--error .modal__header h2 {
  color: #b84a4a;
}

.btn--secondary {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
}

.btn--secondary:hover {
  background: var(--surface-hover);
}

.btn--inline {
  width: auto;
}

/* ── Submit ── */
.form__actions {
  padding-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn--primary {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, var(--rose-light) 0%, var(--rose) 50%, var(--rose-dark) 100%);
  box-shadow: 0 4px 20px var(--rose-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px var(--rose-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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

.btn--primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn--primary svg {
  transition: transform 0.2s;
}

.btn--primary:hover svg {
  transform: translateX(3px);
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

.footer p {
  font-size: 0.8125rem;
  color: var(--gray);
  font-weight: 300;
}

/* Google Places autocomplete */
.autocomplete-wrap {
  width: 100%;
  max-width: 100%;
}

.autocomplete-wrap--ready {
  position: relative;
}

.pac-container--custom {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
}

.autocomplete-input {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font);
  font-size: 0.975rem;
  font-weight: 400;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  box-shadow: 0 1px 3px rgba(44, 40, 38, 0.04);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.autocomplete-input::placeholder {
  color: #b8b2ae;
}

.autocomplete-input:hover {
  background: var(--surface-hover);
  border-color: rgba(155, 122, 111, 0.45);
}

.autocomplete-input:focus {
  border-color: var(--border-focus);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(155, 122, 111, 0.15);
}

.autocomplete-input--loading {
  background-image: linear-gradient(
    90deg,
    var(--surface) 0%,
    var(--surface-hover) 50%,
    var(--surface) 100%
  );
  background-size: 200% 100%;
  animation: autocomplete-shimmer 0.9s ease-in-out infinite;
}

@keyframes autocomplete-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.autocomplete-widget {
  width: 100%;
  max-width: 100%;
  display: block;
  color-scheme: light;
  --gmpx-color-surface: #ffffff;
  --gmpx-color-on-surface: #2c2826;
  --gmpx-color-on-surface-variant: #7a7572;
  --gmpx-color-primary: #9b7a6f;
  --gmpx-color-outline: rgba(155, 122, 111, 0.28);
  --gmpx-font-family: "Outfit", system-ui, sans-serif;
  --gmpx-font-size-base: 0.975rem;
}

.autocomplete-error {
  margin: 0;
  padding: 0.8rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--bg-warm);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.pac-container {
  z-index: 10000;
  margin-top: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(44, 40, 38, 0.12);
  font-family: var(--font);
  background: var(--surface);
  box-sizing: border-box;
  max-width: calc(100vw - 2.25rem);
  overflow: hidden;
}

.pac-item {
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.4;
  cursor: pointer;
  border-top: 1px solid var(--border);
}

.pac-item:first-child {
  border-top: none;
}

.pac-item:hover,
.pac-item-selected {
  background: var(--rose-tint);
}

.pac-icon {
  display: none;
}

.pac-item-query {
  font-size: 0.875rem;
  color: var(--text);
}

.pac-item-secondary {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.pac-matched {
  font-weight: 600;
  color: var(--rose-dark);
}

.form__hint strong {
  color: var(--rose-dark);
  font-weight: 600;
}

/* Evitar que el modal de error de Google tape el formulario */
.gm-err-container {
  z-index: 1 !important;
  opacity: 0.35;
  pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 1.5rem;
  }

  .hero {
    text-align: center;
    padding-top: 0;
  }

  .hero__text {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__features {
    align-items: center;
  }

  .navbar__logo {
    height: 40px;
  }
}

@media (max-width: 560px) {
  .layout {
    padding-left: 1.125rem;
    padding-right: 1.125rem;
  }

  .form__row--2 {
    grid-template-columns: 1fr;
  }

  .form__row .form__field {
    margin-bottom: 1rem;
  }

  .form__row .form__field:last-child {
    margin-bottom: 0;
  }

  .section-head {
    flex-direction: column;
    gap: 0.25rem;
  }

  .autocomplete-input {
    font-size: 16px;
  }

  .autocomplete-widget {
    --gmpx-font-size-base: 16px;
  }

  .pac-container {
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    max-width: none;
  }

  .pac-container--custom {
    left: 0 !important;
    right: 0 !important;
  }
}
