/* ===== Base */
:root {
  /* Colores principales */
  --brand: #1e40af; /* Marrón grisáceo oscuro para botones/texto importante */
  --brand-dark: #1e3a8a;
  
  /* Fondos */
  --bg: #fff; /* Fondo general */
  --bg-card: #f3f3f3;
  --bg-section: #fff;
  --bg-hero: #e9e4df;
  --bg-thanks: #f8f8f8;
  --bg-field-focus: #f7f9fc;
  --bg-date-input: #ffffff;
  
  /* Textos */
  --white: #ffffff;
  --text: #333333;
  --text-hero: #fff;
  --text-muted: #4b5563;
  --text-features: #444;
  --text-icon: #777;
  --text-thanks-title: #1f2937;
  --ink: #333333;
  --muted: #666666;
  
  /* Bordes */
  --border: #ccc;
  --border-section: #eef1f6;
  --line: #e5e7eb;
  
  /* Sombras y overlays */
  --shadow-hero-start: rgba(0, 0, 0, 0.25);
  --shadow-hero-end: rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: "Plus Jakarta Sans", "Noto Sans", system-ui, -apple-system,
    Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.container {
  width: min(1100px, 94%);
  margin-inline: auto;
}
.stack {
  display: grid;
  gap: 18px;
  padding: 24px 0 56px;
} /* columna única, espacio entre bloques */

/* ===== Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: 0.2s ease;
}
.btn--primary {
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  color: var(--white);
}
.btn--primary:hover {
  filter: brightness(1.05);
}
.btn--ghost {
  background: var(--white);
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover {
  background: var(--bg-field-focus);
}

/* ===== Hero */
.hero {
  display: flex;
  align-items: end;
  color: var(--text-hero);
  background-image: linear-gradient(var(--shadow-hero-start), var(--shadow-hero-end)),
    url("img/logo2.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: top center;
  background-color: var(--bg-hero);
  min-height: 250px;
}
.hero__content {
  max-width: 720px;
  padding: 56px 0;
  margin-top: 11rem;
}
.hero__content h1 {
  font-size: clamp(28px, 5vw, 44px);
  margin: 0 0 0.4rem;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.hero__content p {
  margin: 0 0 1.2rem;
  font-size: clamp(15px, 2.2vw, 18px);
  opacity: 0.95;
}

/* ===== Features (versión compacta dentro de la card superior) */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0;
}
.features--tight {
  margin-top: 16px;
}
@media (max-width: 800px) {
  .features {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .card--fixed {
    padding: 0.25rem;
    max-width: 100%;
    overflow: hidden;
  }

  .features.scroll-x {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    height: 100px;
    align-items: center;
    scroll-padding-left: 0;
    scroll-behavior: smooth;
    transition: scroll-left 2s ease-in-out;
  }

  .feature {
    scroll-snap-align: center;
    flex: 0 0 100%;
    padding: 1rem;
    justify-content: center;
    text-align: left;
    gap: 0.75rem;
  }

  .feature__icon {
    font-size: 1.4rem;
    margin: 0;
  }

  .feature p {
    font-size: 0.95rem;
    margin: 0;
  }
}

/* ===== Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.card--fixed {
  min-height: 150px; /* más pequeña ya que solo muestra las features */
  display: grid;
  align-content: start;
}

.features--tight .feature {
  text-align: center;
  margin-bottom: 1rem;
}

.features--tight .feature__icon i {
  font-size: 1.2rem;
  color: var(--text-icon);
  margin-bottom: 0.3rem;
}

.features--tight p {
  font-size: 0.95rem;
  color: var(--text-features);
}

.card h2 {
  margin: 0.5rem 0;
  font-size: 22px;
}
.muted {
  color: var(--muted);
}
.list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 8px;
}
.list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.list i {
  color: var(--brand);
  margin-top: 2px;
}

/* ===== Form */
form {
  display: grid;
  gap: 18px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
legend {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 700;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 1.2rem;
}
.field > span {
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
}
input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 16px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 30%, transparent);
}
input[type="date"] {
  background-color: var(--bg-date-input) !important;
  width: 95%;
}
textarea {
  min-height: 120px;
  resize: vertical;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 700px) {
  .row {
    grid-template-columns: 1fr;
  }
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== Sections */
.section {
  border: 1px solid var(--border-section);
  background: var(--bg-section);
  border-radius: 12px;
  padding: 14px;
}
.section__title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hidden {
  display: none !important;
}

/* ===== Tiles (multi-select) */
.tiles {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
@media (max-width: 1000px) {
  .tiles {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 560px) {
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tile {
  position: relative;
  display: block;
  cursor: pointer;
  user-select: none;
}
.tile__check {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.tile__box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 14px;
  text-align: center;
  display: grid;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.06s,
    background 0.2s;
}
.tile:hover .tile__box {
  transform: translateY(-1px);
}
.tile__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: var(--white);
}
.tile__label {
  font-weight: 800;
  font-size: 14px;
}

/* Seleccionado: borde rojo único + halo */
.tile__check:focus-visible + .tile__box {
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--brand) 35%, transparent);
}
.tile__check:checked + .tile__box {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 30%, transparent);
  background: var(--white);
}

/* ===== Footer */
.footer {
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  padding: 28px 16px;
  font-size: 14px;
}

/* Utility */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.list {
  margin-bottom: 2rem; /* separa de lo que venga después */
}

/* Página de gracias */
.thanks-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
  background-color: var(--bg-thanks);
}

.thanks-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-thanks-title);
}

.thanks-page p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.thanks-logo {
  max-width: 160px;
  margin-bottom: 2rem;
}

@media (max-width: 600px) {
  .thanks-page h1 {
    font-size: 1.5rem;
  }

  .thanks-page p {
    font-size: 1rem;
  }

  .thanks-logo {
    max-width: 120px;
    margin-bottom: 1.5rem;
  }
}