/* =========================================================
   PruebaGrupuff · estilos
   Enfoque "mobile first": los estilos base son para móvil
   y las media queries (min-width) añaden mejoras en pantallas
   más grandes.
   ========================================================= */

/* ---------- 1. Variables (colores, tipografía, espacios) ---------- */
:root {
  --ink: #14213d;          /* texto principal / azul noche */
  --ink-soft: #4a5571;     /* texto secundario */
  --accent: #ff8a5b;       /* coral: botones y detalles */
  --accent-dark: #e8693a;
  --blue: #3a86ff;
  --green: #2ec4b6;
  --bg: #ffffff;
  --bg-tint: #fbf6f2;      /* fondo cálido de secciones alternas */
  --line: #e7e3ef;
  --error: #c0392b;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(20, 33, 61, .18);
  --container: 1120px;
  --gutter: 20px;
  --section-y: 72px;
}

/* ---------- 2. Reset y base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 7vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }
a  { color: inherit; }
svg { display: block; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: .75em;
}

/* ---------- 3. Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 14px 24px;
  font: inherit; font-weight: 700; font-size: 1rem;
  color: #fff; background: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-small { padding: 9px 18px; font-size: .95rem; }
.btn-block { width: 100%; }

/* ---------- 4. Cabecera y menú ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; font-size: 1.1rem; }
.logo-mark { width: 32px; height: 32px; color: var(--ink); }

/* Botón hamburguesa (solo móvil) */
.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menú desplegable en móvil */
.nav {
  position: absolute; left: 0; right: 0; top: 64px;
  display: none; flex-direction: column; gap: 4px;
  padding: 12px var(--gutter) 20px;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.nav.is-open { display: flex; }
.nav a { padding: 12px 4px; text-decoration: none; font-weight: 600; }
.nav a:not(.btn):hover { color: var(--accent-dark); }
.nav .btn { margin-top: 8px; color: #fff; }

/* ---------- 5. Banner principal (hero) ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 48px 0 64px;
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(255, 138, 91, .18), transparent 70%),
    radial-gradient(500px 300px at 0% 100%, rgba(58, 134, 255, .10), transparent 70%);
}
.hero-inner { display: grid; gap: 40px; align-items: center; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 38em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }

.hero-facts {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  color: var(--ink-soft); font-size: .95rem;
}
.hero-facts strong { display: block; color: var(--ink); font-size: 1.4rem; }

.hero-art { max-width: 340px; margin: 0 auto; width: 100%; }
.phone { width: 100%; height: auto; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- 6. Secciones genéricas ---------- */
.section { padding: var(--section-y) 0; }
.section--tinted { background: var(--bg-tint); }
.section--dark { background: var(--ink); color: #e9ecf5; }
.section--dark h2 { color: #fff; }
.section--dark .eyebrow { color: var(--accent); }

.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p:last-child { color: var(--ink-soft); }

.grid { display: grid; gap: 20px; }

/* ---------- 7. Por qué elegirme (comparativa) ---------- */
.compare { display: grid; gap: 20px; }
.compare-card {
  position: relative;
  padding: 28px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff;
}
.compare-card h3 { color: var(--ink-soft); }
.compare-card ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); }
.compare-card li + li { margin-top: .4em; }
.compare-card--me { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.compare-card--me h3 { color: var(--ink); font-size: 1.4rem; }

.badge {
  position: absolute; top: -13px; left: 24px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
}

/* Listas con check SVG */
.checks { list-style: none; padding: 0 !important; margin: 0; color: var(--ink) !important; }
.checks li { position: relative; padding-left: 30px; }
.checks li + li { margin-top: .55em; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .3em;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* ---------- 8. Servicios ---------- */
.card {
  padding: 28px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card p { color: var(--ink-soft); margin: 0; }

.icon {
  width: 48px; height: 48px; margin-bottom: 18px;
  display: grid; place-items: center;
  border-radius: 14px; background: rgba(255, 138, 91, .14);
}
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent-dark); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 9. Precios ---------- */
.price-card {
  position: relative; display: flex; flex-direction: column;
  padding: 32px 28px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line);
}
.price-card .checks { flex: 1; margin-bottom: 28px; }
.price { font-size: 2.4rem; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.price span { font-size: 1rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.price-note { color: var(--ink-soft); margin-bottom: 24px; }
.price-card--featured { border: 2px solid var(--ink); box-shadow: var(--shadow); }

/* ---------- 10. Sobre mí ---------- */
.about { display: grid; gap: 32px; align-items: center; }
.avatar { width: 120px; height: 120px; }
.avatar svg { width: 100%; height: 100%; }
.about p { color: #c9cfdf; max-width: 40em; }

.tags { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; font-size: .9rem; }

/* ---------- 11. Contacto y formulario ---------- */
.contact { display: grid; gap: 40px; }
.contact-info p { color: var(--ink-soft); }

.contact-mail {
  display: flex; gap: 14px; align-items: flex-start;
  margin-top: 28px; padding: 18px 20px;
  background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--line);
}
.contact-mail svg { flex: none; width: 26px; height: 26px; fill: none; stroke: var(--accent-dark); stroke-width: 2; }
.contact-mail a { font-weight: 700; font-size: 1.15rem; color: var(--ink); word-break: break-all; }

.form {
  padding: 28px 22px; border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 13px 14px;
  font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(58, 134, 255, .15); }
.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.field-error { color: var(--error); font-size: .88rem; margin: 6px 0 0; min-height: 0; }
.field-error:empty { display: none; }

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

.form-legal { font-size: .85rem; color: var(--ink-soft); text-align: center; margin: 14px 0 0; }

.form-status { margin-top: 18px; padding: 16px 18px; border-radius: var(--radius-sm); font-weight: 600; }
.form-status.is-success { background: rgba(46, 196, 182, .12); color: #137a70; border: 1px solid rgba(46, 196, 182, .4); }
.form-status.is-error { background: rgba(192, 57, 43, .08); color: var(--error); border: 1px solid rgba(192, 57, 43, .3); }

/* ---------- 12. Pie ---------- */
.site-footer { padding: 28px 0; border-top: 1px solid var(--line); font-size: .92rem; color: var(--ink-soft); }
.footer-inner { display: flex; flex-direction: column; gap: 6px; }
.footer-inner p { margin: 0; }

/* =========================================================
   Tablet (≥ 720px)
   ========================================================= */
@media (min-width: 720px) {
  :root { --gutter: 32px; --section-y: 96px; }

  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 > :last-child { grid-column: 1 / -1; }

  .about { grid-template-columns: auto 1fr; gap: 48px; }
  .avatar { width: 160px; height: 160px; }

  .form { padding: 36px; }
  .footer-inner { flex-direction: row; justify-content: space-between; }
}

/* =========================================================
   Escritorio (≥ 1000px)
   ========================================================= */
@media (min-width: 1000px) {
  /* El menú deja de ser desplegable */
  .nav-toggle { display: none; }
  .nav {
    position: static; display: flex; flex-direction: row; align-items: center; gap: 28px;
    padding: 0; background: none; border: 0; box-shadow: none;
  }
  .nav a { padding: 0; }
  .nav .btn { margin: 0; padding: 9px 18px; }

  .hero { padding: 96px 0 112px; }
  .hero-inner { grid-template-columns: 1.15fr .85fr; gap: 56px; }
  .hero-art { max-width: 400px; }

  .compare { grid-template-columns: 1fr 1.25fr 1fr; align-items: center; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .grid-3 > :last-child { grid-column: auto; }
  .price-card--featured { transform: scale(1.04); }

  .contact { grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
}
