/* ==========================================================================
   Laguntzak · Hoja de estilos
   Diseño "mobile first": primero se escribe para móvil y, más abajo,
   los ajustes para pantallas grandes (@media min-width).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES: cambia aquí los colores y tamaños de toda la web
   -------------------------------------------------------------------------- */
:root {
  --color-accent: #0f5e57;        /* Color de acento (botones, enlaces, detalles) */
  --color-accent-dark: #0a4540;   /* Acento al pasar el ratón */
  --color-accent-soft: #e3efec;   /* Fondo suave del acento */
  --color-text: #1f2928;          /* Texto principal */
  --color-muted: #4a5654;         /* Texto secundario */
  --color-bg: #fbf8f3;            /* Fondo principal (crema cálido) */
  --color-bg-alt: #ffffff;        /* Fondo de secciones alternas */
  --color-border: #d9d3c9;        /* Bordes de campos y tarjetas */
  --color-error: #a3261d;         /* Mensajes de error */

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-size-base: 1.125rem;     /* 18 px */
  --radius: 12px;
  --space: 1.5rem;
  --max-width: 68rem;
  --max-width-narrow: 44rem;
}

/* --------------------------------------------------------------------------
   2. BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

/* Desplazamiento suave al pulsar "Cuéntanos tu idea" (salvo si el usuario prefiere menos movimiento) */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 1rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 7vw, 3.4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1.1rem;
}

a {
  color: var(--color-accent);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--color-accent-dark);
}

/* Foco visible para quien navega con teclado */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Secciones de texto: mismo borde izquierdo que el resto, pero líneas más cortas para leer mejor */
.container.narrow > * {
  max-width: var(--max-width-narrow);
}

.accent {
  color: var(--color-accent);
}

/* Enlace "Saltar al formulario": solo aparece al tabular */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

/* --------------------------------------------------------------------------
   3. CABECERA Y PIE
   -------------------------------------------------------------------------- */
.site-header {
  padding: 1.25rem 0 0;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-accent);
  text-decoration: none;
}

.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border);
  font-size: 1rem;
  color: var(--color-muted);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-links a {
  display: inline-block;
  padding: 0.25rem 0;   /* zona táctil más cómoda */
  color: var(--color-muted);
}

/* --------------------------------------------------------------------------
   4. BOTONES
   -------------------------------------------------------------------------- */
.button {
  display: inline-block;
  padding: 0.95rem 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.button:hover {
  background: var(--color-accent-dark);
  color: #fff;
}

.button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.button-full {
  width: 100%;
}

/* --------------------------------------------------------------------------
   5. SECCIONES
   -------------------------------------------------------------------------- */
.hero {
  padding: 3.5rem 0 4rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section .button {
  margin-top: 0.75rem;
}

/* Ejemplos */
.examples {
  list-style: none;
  margin: 2rem 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.examples li {
  padding: 1.4rem 1.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-accent);
  border-radius: var(--radius);
}

.examples strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.examples span {
  color: var(--color-muted);
}

.examples-close {
  font-size: 1.15rem;
  max-width: var(--max-width-narrow);
}

/* Pasos numerados */
.steps {
  list-style: none;
  counter-reset: paso;
  margin: 2rem 0 0;
  padding: 0;
}

.steps li {
  counter-increment: paso;
  position: relative;
  padding: 0 0 2rem 4rem;
  min-height: 3rem;
}

.steps li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-weight: 700;
}

.steps strong {
  display: block;
  font-size: 1.15rem;
}

.steps span {
  color: var(--color-muted);
}

/* Preguntas frecuentes */
.faq details {
  border-bottom: 1px solid var(--color-border);
}

.faq summary {
  position: relative;
  padding: 1.15rem 2.5rem 1.15rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--color-accent);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  color: var(--color-muted);
  padding-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   6. FORMULARIO
   -------------------------------------------------------------------------- */
.section-form {
  background: var(--color-accent-soft);
  scroll-margin-top: 0;
}

.form {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  box-shadow: 0 2px 16px rgba(15, 94, 87, 0.08);
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.optional {
  font-weight: 400;
  color: var(--color-muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 0.8rem 0.9rem;
  font: inherit;
  font-size: 1rem;          /* 16 px mínimo: evita el zoom automático en iPhone */
  color: var(--color-text);
  background: #fff;
  border: 1.5px solid #8a8f8d;
  border-radius: 8px;
}

select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%230f5e57' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

textarea {
  resize: vertical;
  min-height: 8rem;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 1px;
  border-color: var(--color-accent);
}

::placeholder {
  color: #6b7371;
}

.field-check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.field-check input {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  margin: 0.2rem 0 0;
  accent-color: var(--color-accent);
}

.field-check label {
  margin: 0;
  font-weight: 400;
}

/* Reserva el hueco de la casilla hCaptcha para que la página no "salte" al cargarla */
.captcha {
  min-height: 78px;
}

.form-note {
  font-size: 1rem;
  color: var(--color-muted);
}

/* Honeypot antispam: oculto para las personas */
.honeypot {
  display: none !important;
}

.form-message {
  margin: 1.25rem 0 0;
  padding: 1rem 1.25rem;
  border-radius: 8px;
}

.form-error {
  background: #fbeceb;
  color: var(--color-error);
  border: 1px solid #e8b9b5;
}

.form-error a {
  color: var(--color-error);
}

.form-success {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--color-bg-alt);
  border-left: 5px solid var(--color-accent);
  font-size: 1.15rem;
}

.form-success p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   7. PÁGINAS LEGALES
   -------------------------------------------------------------------------- */
.legal {
  padding: 3rem 0 4rem;
}

.legal h1 {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  margin-bottom: 0.5rem;
}

.legal h2 {
  font-size: 1.35rem;
  margin-top: 2.25rem;
}

.legal ul {
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

.legal .updated {
  color: var(--color-muted);
  font-size: 1rem;
}

.back-link {
  display: inline-block;
  margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   8. PANTALLAS GRANDES (tablet y escritorio)
   -------------------------------------------------------------------------- */
@media (min-width: 48rem) {
  .container {
    padding: 0 2rem;
  }

  .hero {
    padding: 6rem 0 6.5rem;
  }

  .hero h1,
  .hero .lead {
    max-width: 48rem;
  }

  .lead {
    font-size: 1.3rem;
  }

  .section {
    padding: 6rem 0;
  }

  .examples {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .form {
    padding: 2.5rem;
  }
}

@media (min-width: 64rem) {
  .examples {
    grid-template-columns: repeat(3, 1fr);
  }
}
