/* Estilos del sitio público de HatoControl (portada, privacidad y soporte).
   Nada de esto entra al bundle de Flutter: son páginas estáticas que se
   sirven antes de que el usuario decida entrar a la app. */

:root {
  --azul: #1B3A5B;
  --azul-osc: #12283F;
  --verde: #3C8C56;
  --verde-osc: #2E6E43;
  --crema: #F6F3EC;
  --crema-clara: #FCFBF8;
  --tinta: #14202C;
  --gris: #5A6B7A;
  --borde: #E4DED2;
  --radio: 18px;
  --ancho: 1120px;
  --sombra: 0 1px 2px rgba(20, 32, 44, .05), 0 12px 32px rgba(20, 32, 44, .07);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--crema-clara);
  color: var(--tinta);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* El `height: auto` es obligatorio: las imágenes llevan sus atributos width y
   height para que el navegador reserve el espacio antes de bajarlas, pero sin
   esto ese alto se toma al pie de la letra y la imagen sale estirada cuando el
   CSS le cambia el ancho. */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--verde-osc); text-decoration-thickness: 1px; text-underline-offset: 3px; }

h1, h2, h3 {
  font-family: Fraunces, Georgia, "Times New Roman", serif;
  color: var(--azul);
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Barra superior ---------- */

.barra {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(252, 251, 248, .9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--borde);
}

.barra .contenedor {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.marca img { height: 42px; width: auto; }
.marca span {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--azul);
  letter-spacing: -.01em;
}

.barra nav { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.barra nav a {
  color: var(--azul);
  text-decoration: none;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 10px;
}
.barra nav a:hover { background: var(--crema); }
.barra nav a.boton { color: #fff; }

/* ---------- Botones ---------- */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space: nowrap;
}
.boton:hover { transform: translateY(-1px); }

.boton-verde {
  background: var(--verde);
  color: #fff;
  box-shadow: 0 6px 18px rgba(60, 140, 86, .28);
}
.boton-verde:hover { background: var(--verde-osc); }

.boton-linea {
  background: #fff;
  color: var(--azul);
  border-color: var(--borde);
}
.boton-linea:hover { border-color: var(--azul); background: var(--crema); }

.barra nav a.boton { padding: 12px 22px; }

/* ---------- Portada ---------- */

.portada {
  position: relative;
  overflow: hidden;
  background: var(--crema);
  border-bottom: 1px solid var(--borde);
}

/* Lomas suaves de fondo: la finca insinuada, sin robarle atención al texto. */
.portada::before {
  content: "";
  position: absolute;
  inset: auto -10% -30% -10%;
  height: 420px;
  background:
    radial-gradient(60% 100% at 20% 100%, rgba(60, 140, 86, .16), transparent 70%),
    radial-gradient(55% 100% at 80% 100%, rgba(27, 58, 91, .13), transparent 70%);
  pointer-events: none;
}

.portada .contenedor {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 56px;
  padding-top: 84px;
  padding-bottom: 96px;
}

.etiqueta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--borde);
  color: var(--verde-osc);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: .92rem;
  font-weight: 600;
  margin-bottom: 22px;
}
.etiqueta::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--verde);
}

.entrada { font-size: 1.18rem; color: var(--gris); max-width: 33em; }

.acciones { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.nota-portada { margin-top: 20px; font-size: .95rem; color: var(--gris); }

.portada figure { margin: 0; text-align: center; }
.portada figure img { width: min(400px, 100%); margin: 0 auto; }

/* ---------- Secciones ---------- */

section { padding: 88px 0; }
.seccion-titulo { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.seccion-titulo p { color: var(--gris); margin: 0; }

.rejilla {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.tarjeta {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 26px 24px;
  box-shadow: var(--sombra);
}
.tarjeta h3 { margin-bottom: .35em; }
.tarjeta p { margin: 0; color: var(--gris); font-size: .98rem; }

.icono {
  width: 58px; height: 58px;
  border-radius: 14px;
  background: var(--crema);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.icono img, .icono svg { width: 32px; height: 32px; }

.franja-crema {
  background: var(--crema);
  border-top: 1px solid var(--borde);
  border-bottom: 1px solid var(--borde);
}

/* Pasos numerados */
.pasos {
  counter-reset: paso;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}
.paso h3 { display: flex; align-items: center; gap: 12px; }
.paso h3::before {
  counter-increment: paso;
  content: counter(paso);
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--azul);
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.paso p { color: var(--gris); margin: 0; }

/* Banda de legal y soporte: los dos enlaces que pide la tienda de apps */
.enlaces-tienda {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.enlace-grande {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 24px 26px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--sombra);
  transition: border-color .12s ease, transform .12s ease;
}
.enlace-grande:hover { border-color: var(--verde); transform: translateY(-2px); }
.enlace-grande .icono { margin: 0; flex: none; }
.enlace-grande strong {
  display: block;
  color: var(--azul);
  font-size: 1.12rem;
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
}
.enlace-grande span { color: var(--gris); font-size: .96rem; }
.enlace-grande .flecha { margin-left: auto; color: var(--verde); font-size: 1.5rem; line-height: 1; }

/* Llamado final */
.cierre { background: var(--azul); color: #fff; text-align: center; }
.cierre h2 { color: #fff; }
.cierre p { color: rgba(255, 255, 255, .78); max-width: 34em; margin: 0 auto 32px; }
.cierre .boton-linea { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.cierre .boton-linea:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.cierre .acciones { justify-content: center; margin-top: 0; }

/* ---------- Pie ---------- */

.pie {
  background: var(--azul-osc);
  color: rgba(255, 255, 255, .7);
  padding: 54px 0 40px;
  font-size: .95rem;
}
.pie .contenedor { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.pie h4 {
  color: #fff;
  font-size: .82rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.pie a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.pie a:hover { color: #fff; text-decoration: underline; }
.pie ul { list-style: none; margin: 0; padding: 0; }
.pie li { margin-bottom: 9px; }
.pie .marca span { color: #fff; }
.pie .marca { margin-bottom: 14px; }
.pie .legal {
  border-top: 1px solid rgba(255, 255, 255, .14);
  margin-top: 40px;
  padding-top: 22px;
  font-size: .88rem;
  color: rgba(255, 255, 255, .55);
}

/* ---------- Páginas de documento (privacidad, soporte) ---------- */

.documento { padding: 60px 0 90px; }
.documento .contenedor { max-width: 760px; }
.documento h1 { margin-bottom: .3em; }
.documento h2 { font-size: 1.42rem; margin-top: 2.1em; }
.documento h3 { margin-top: 1.9em; }
.documento ul { padding-left: 1.25em; }
.documento li { margin-bottom: .5em; }
.fecha { color: var(--gris); font-size: .95rem; margin-bottom: 2.4em; }
.volver { display: inline-block; margin-bottom: 26px; color: var(--gris); text-decoration: none; font-weight: 500; }
.volver:hover { color: var(--azul); }

.destacado {
  background: var(--crema);
  border: 1px solid var(--borde);
  border-left: 4px solid var(--verde);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 28px 0;
}
.destacado p:last-child { margin-bottom: 0; }
.correo { font-size: 1.12rem; font-weight: 600; }

/* ---------- Pantallas angostas ---------- */

@media (max-width: 900px) {
  .portada .contenedor {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 52px;
    padding-bottom: 64px;
    text-align: center;
  }
  .portada .entrada { margin-left: auto; margin-right: auto; }
  .portada .acciones { justify-content: center; }
  .portada figure { order: -1; }
  .portada figure img { width: min(260px, 62%); }
  section { padding: 62px 0; }
  .pie .contenedor { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 560px) {
  .barra .contenedor { min-height: 0; }
  .barra nav { width: 100%; margin-left: 0; justify-content: space-between; }
  .barra nav a { padding: 10px 8px; font-size: .95rem; }
  .barra nav a.boton { padding: 11px 20px; }
  .acciones .boton { width: 100%; }
}
