/* Huella & Manada · corporate site. Mobile and tablet first (memoria v1.2, chapter 2): base styles are for
   phones and only min-width media queries add columns: 600 px (large phone), 768 px (tablet),
   1024 px (laptop). Design and colours of the current site (prototype in Files). */
:root {
  --primary: #10b981; --primary-dark: #059669; --dark-green: #064e3b; --bg-soft: #f6faf8;
  --text-main: #111827; --text-muted: #6b7280; --border: #e5e7eb; --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,0.06); --header-h: 64px; --focus: #f59e0b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif; font-size: 16px;
  color: var(--text-main); background: #fff; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img, video { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
section { scroll-margin-top: calc(var(--header-h) + 8px); }
h1, h2, h3 { overflow-wrap: anywhere; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 300; background: #fff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 20px;
  border-radius: 10px; font-weight: 700; font-size: 0.95rem; cursor: pointer; border: none; font-family: inherit;
  transition: transform .15s, box-shadow .15s, background .15s; text-align: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(16,185,129,.35); }
.btn-outline { background: #fff; color: var(--text-main); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-block { width: 100%; }
.enlace { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }

/* Header */
header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.96); border-bottom: 1px solid var(--border); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--header-h);
  padding: 8px 16px; max-width: 1180px; margin: 0 auto; }
.logo { display: flex; align-items: center; font-weight: 800; font-size: 1.1rem; }
.logo img { height: 32px; width: auto; }
nav.main-nav { display: none; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.btn-cabecera { display: none; }
.hamburger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px;
  background: none; border: none; cursor: pointer; padding: 10px; }
.hamburger span { width: 24px; height: 2px; background: var(--text-main); border-radius: 2px; }
.mobile-nav { display: none; flex-direction: column; gap: 4px; padding: 8px 16px 16px; border-top: 1px solid var(--border); background: #fff; }
.mobile-nav a { padding: 12px 4px; font-weight: 600; min-height: 44px; }
.mobile-nav .btn { margin-top: 6px; }
.mobile-nav.open { display: flex; }

/* Hero */
.hero { position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
  overflow: hidden; padding: 64px 16px 72px; min-height: calc(100svh - var(--header-h)); background: var(--dark-green); }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(4,30,22,0.6) 0%, rgba(4,30,22,0.78) 100%); }
.hero-content { position: relative; z-index: 2; max-width: 720px; }
.hero h1 { font-size: 1.85rem; font-weight: 800; line-height: 1.2; margin: 0 0 16px; color: #fff; }
.hero p.lead { color: rgba(255,255,255,0.92); font-size: 1rem; line-height: 1.6; margin: 0 auto 16px; max-width: 560px; }
.hero-aviso { display: inline-block; color: #ecfdf5; background: rgba(16,185,129,0.25); border: 1px solid rgba(167,243,208,0.5);
  border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 0.9rem; margin: 0 0 22px; }
.hero-ctas { display: flex; flex-direction: column; gap: 12px; }
.hero-ctas .btn-outline { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.6); }
.hero-ctas .btn-outline:hover { background: rgba(255,255,255,0.2); border-color: #fff; color: #fff; }
.video-toggle { position: absolute; right: 12px; bottom: 12px; z-index: 3; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.7); background: rgba(4,30,22,0.55); color: #fff; font-size: 0.8rem; cursor: pointer; }
.video-toggle:hover, .video-toggle:focus-visible { background: rgba(4,30,22,0.8); border-color: #fff; }

/* Section heading */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.eyebrow { color: var(--primary-dark); font-weight: 800; font-size: 0.78rem; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px; }
.section-head h2 { font-size: 1.6rem; font-weight: 800; margin: 0 0 12px; }
.section-head p { color: var(--text-muted); line-height: 1.6; margin: 0; }

/* Cards and grids: one column on phones */
.why, .modules, .manada, .steps, .pricing { padding: 56px 0; }
.modules, .steps { background: var(--bg-soft); }
.why-grid, .modules-grid, .steps-grid, .pricing-grid, .manada-grid, .demo-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.why-card, .module-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.check-badge, .module-icon, .manada-check { display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: #ecfdf5; color: var(--primary-dark); }
.check-badge { width: 30px; height: 30px; border-radius: 50%; margin-bottom: 12px; }
.why-card h3 { font-size: 1rem; margin: 0 0 8px; }
.why-card p, .module-card p, .step-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.55; margin: 0; }
.module-card .row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.module-icon { width: 34px; height: 34px; border-radius: 8px; }
.module-card h3 { font-size: 1rem; margin: 0; }
.manada-grid { gap: 32px; align-items: center; }
.manada-img { border-radius: 20px; overflow: hidden; }
.manada-img img { width: 100%; height: auto; }
.manada-list { display: flex; flex-direction: column; gap: 18px; }
.manada-item { display: flex; gap: 14px; }
.manada-check { width: 24px; height: 24px; border-radius: 50%; font-size: 0.8rem; margin-top: 2px; }
.manada-item h3.h4 { margin: 0 0 4px; font-size: 1rem; }
.manada-item p { margin: 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.55; }
.steps-grid { list-style: none; padding: 0; margin: 0; gap: 24px; }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--dark-green); color: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 800; margin-bottom: 14px; }
.step-card h3 { font-size: 1rem; margin: 0 0 8px; }

/* Pricing: same order on every device (Básico, Avanzado, Clínica lista), as set in the CMS */
.pricing-grid { gap: 28px; max-width: 1100px; margin: 0 auto; }
.plan { border: 1.5px solid var(--border); border-radius: 20px; padding: 28px 22px; background: #fff; display: flex; flex-direction: column; position: relative; }
.plan.featured { border-color: var(--primary); box-shadow: 0 16px 40px rgba(16,185,129,.15); }
.plan-badge { position: absolute; top: -13px; right: 20px; background: var(--primary); color: #fff; font-size: 0.72rem; font-weight: 800;
  padding: 5px 12px; border-radius: 999px; letter-spacing: .5px; }
.plan h3 { margin: 0 0 6px; font-size: 1.2rem; }
.plan .plan-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }
.plan .price { font-size: 2rem; font-weight: 800; margin-bottom: 4px; }
.plan .price span { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); }
.plan .included { font-weight: 700; font-size: 0.88rem; color: var(--primary-dark); background: #ecfdf5; padding: 8px 12px; border-radius: 8px; margin: 14px 0 18px; }
.plan ul { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan ul li { display: flex; gap: 9px; font-size: 0.9rem; align-items: flex-start; }
.plan ul li::before { content: "✓"; color: var(--primary-dark); font-weight: 800; }
.nota { text-align: center; margin: 20px auto 0; max-width: 760px; color: var(--text-muted); font-size: 0.9rem; }
.nota-prueba { color: var(--primary-dark); font-weight: 700; }

/* Request form */
.demo { padding: 56px 0 72px; background: var(--bg-soft); }
.demo-grid { gap: 32px; align-items: start; }
.demo-left h2 { font-size: 1.6rem; font-weight: 800; margin: 0 0 12px; }
.demo-left p.lead { color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }
.demo-left .manada-item { margin-bottom: 14px; }
.demo-form { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 20px; }
.demo-form label { font-size: 0.88rem; font-weight: 700; display: block; margin: 14px 0 6px; }
.demo-form .field:first-child label { margin-top: 0; }
.demo-form input[type=text], .demo-form input[type=tel], .demo-form input[type=email], .demo-form select {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid #9ca3af; border-radius: 9px; font-size: 1rem; font-family: inherit; background: #fff; }
.demo-form input:focus, .demo-form select:focus { border-color: var(--primary-dark); }
.demo-form .check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; margin-top: 18px; }
.demo-form .check input { width: 22px; height: 22px; flex-shrink: 0; margin: 0; }
.demo-form .check a { color: var(--primary-dark); text-decoration: underline; }
.demo-form .error { color: #b91c1c; font-size: 0.82rem; margin-top: 4px; display: none; }
.demo-form .field.invalid input, .demo-form .field.invalid select { border-color: #b91c1c; }
.demo-form .field.invalid .error { display: block; }
.demo-form button[type=submit] { margin-top: 20px; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { color: #b91c1c; font-size: .9rem; min-height: 1.2em; margin: 10px 0 0; }
.form-success { display: none; text-align: center; padding: 20px 10px; }
.form-success.show { display: block; }
.form-success .tick { width: 52px; height: 52px; border-radius: 50%; background: #ecfdf5; color: var(--primary-dark); display: flex;
  align-items: center; justify-content: center; font-size: 1.5rem; margin: 0 auto 14px; }
.form-success h3 { margin: 0 0 8px; }
.form-success p { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* Legal pages */
.legal { padding: 40px 16px 64px; max-width: 820px; line-height: 1.65; }
.legal h1 { font-size: 1.7rem; margin: 0 0 8px; }
.legal h2 { font-size: 1.2rem; margin: 28px 0 8px; }
.legal h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.legal a { color: var(--primary-dark); text-decoration: underline; }
.legal-fecha { color: var(--text-muted); font-size: 0.9rem; }

/* Footer */
footer { background: var(--dark-green); color: #d1fae5; padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; margin-bottom: 32px; }
.footer-brand img { height: 32px; width: auto; }
.pie-h { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: .6px; margin: 0 0 14px; }
footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
footer ul a, footer ul .enlace { display: inline-block; padding: 8px 0; font-size: 0.92rem; color: #a7f3d0; }
footer ul a:hover, footer ul .enlace:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 20px; font-size: 0.85rem; color: #a7f3d0; }

/* Cookie banner */
.cookies { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; padding: 12px; }
.cookies[hidden] { display: none; }
.cookies-in { max-width: 860px; margin: 0 auto; background: #fff; color: var(--text-main); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 -4px 30px rgba(0,0,0,.15); padding: 16px; }
.cookies-t { font-size: 1.05rem; margin: 0 0 6px; }
.cookies p { margin: 0 0 12px; font-size: 0.92rem; line-height: 1.5; color: var(--text-muted); }
.cookies p a { color: var(--primary-dark); text-decoration: underline; }
.cookies-cfg { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; font-size: 0.92rem; }
.cookies-cfg[hidden] { display: none; }
.cookies-cfg label { display: flex; gap: 10px; align-items: center; min-height: 32px; }
.cookies-cfg input { width: 20px; height: 20px; }
.cookies-acc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cookies-acc .btn { width: 100%; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* ≥ 600 px: large phones */
@media (min-width: 600px) {
  .container { padding: 0 24px; }
  .hero-ctas { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .why-grid, .modules-grid, .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cookies-acc { display: flex; justify-content: flex-end; flex-wrap: wrap; }
  .cookies-acc .btn { width: auto; }
}

/* ≥ 768 px: tablets */
@media (min-width: 768px) {
  :root { --header-h: 72px; }
  .nav-wrap { padding: 12px 24px; }
  .btn-cabecera { display: inline-flex; }
  .hero { padding: 96px 24px; }
  .hero h1 { font-size: 2.4rem; }
  .hero p.lead { font-size: 1.08rem; }
  .why, .modules, .manada, .steps, .pricing { padding: 80px 0; }
  .section-head { margin-bottom: 44px; }
  .section-head h2, .demo-left h2 { font-size: 2rem; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .demo-form { padding: 28px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .video-toggle { right: 20px; bottom: 20px; }
}

/* ≥ 1024 px: laptops and desktops */
@media (min-width: 1024px) {
  nav.main-nav { display: flex; gap: 32px; }
  nav.main-nav a { font-weight: 600; font-size: 0.95rem; padding: 10px 0; }
  nav.main-nav a:hover { color: var(--primary-dark); }
  .hamburger, .mobile-nav, .mobile-nav.open { display: none; }
  .hero h1 { font-size: 2.7rem; }
  .why-grid { grid-template-columns: repeat(5, 1fr); }
  .modules-grid { grid-template-columns: repeat(3, 1fr); }
  .steps-grid { grid-template-columns: repeat(4, 1fr); }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
  .manada-grid { grid-template-columns: 1fr 1.1fr; gap: 56px; }
  .demo-grid { grid-template-columns: 1fr 1fr; gap: 56px; }
  .why-card, .module-card { transition: transform .2s, box-shadow .2s; }
  .why-card:hover, .module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
}
