/* ============================================================
   Protección Adarga — Estilos globales (marca, base, header, footer)
   Mobile-first. Breakpoints: 640px (tablet), 1024px (desktop), 1280px.
   ============================================================ */

:root {
  /* Marca */
  --ink: #241a15;
  --ink-90: rgba(36, 26, 21, 0.92);
  --ink-70: rgba(36, 26, 21, 0.7);
  --ember: #e87b41;
  --ember-deep: #b35a2a;
  --bone: #f8f4ee;
  --bone-90: rgba(248, 244, 238, 0.92);
  --bone-70: rgba(248, 244, 238, 0.75);
  --bone-55: rgba(248, 244, 238, 0.55);
  --bone-15: rgba(248, 244, 238, 0.15);
  --bone-08: rgba(248, 244, 238, 0.08);
  --whatsapp: #25d366;

  /* Sistema */
  --bg: var(--bone);
  --fg: var(--ink);
  --card: #ffffff;
  --muted: #ede7de;
  --muted-fg: #6b5f55;
  --border: #e2d9cd;
  --primary: var(--ember);
  --primary-fg: #ffffff;

  /* Tipografías */
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Radios / sombras */
  --radius-sm: 0.375rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 12px 30px -12px rgba(232, 123, 65, 0.5);
  --shadow-lg: 0 24px 60px -30px rgba(36, 26, 21, 0.45);

  /* Layout */
  --container: 1200px;
  --pad-x: 1.25rem;
}

@media (min-width: 640px) {
  :root { --pad-x: 2rem; }
}

/* ------------------------------- Reset ------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }

/* Tipografía */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.1;
}
h1 { font-size: clamp(2rem, 5vw + 1rem, 4.5rem); }
h2 { font-size: clamp(1.75rem, 3vw + 1rem, 3rem); }
h3 { font-size: clamp(1.25rem, 1vw + 1rem, 1.75rem); }
p  { text-wrap: pretty; }

.italic { font-style: italic; }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

/* --------------------------- Container --------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* --------------------------- Botones --------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-align: center;
}
.btn:hover  { transform: scale(1.02); }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { background: var(--ember-deep); }

.btn-outline {
  background: transparent;
  color: var(--fg);
  border-color: rgba(36, 26, 21, 0.22);
}
.btn-outline:hover { border-color: rgba(36, 26, 21, 0.55); background: rgba(36, 26, 21, 0.04); }

.btn-dark {
  background: var(--ink);
  color: var(--bone);
}
.btn-dark:hover { background: rgba(36, 26, 21, 0.9); }

.btn-ghost-light {
  background: rgba(248, 244, 238, 0.05);
  color: var(--bone);
  border-color: rgba(248, 244, 238, 0.25);
  backdrop-filter: blur(4px);
}
.btn-ghost-light:hover { border-color: rgba(248, 244, 238, 0.5); background: rgba(248, 244, 238, 0.12); }

.btn-lg { padding: 1.1rem 2rem; font-size: 1.05rem; }

/* --------------------------- Header (topbar) --------------------------- */
.topbar {
  position: relative;
  z-index: 40;
  background: var(--bone);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo {
  height: 3rem;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}
@media (min-width: 640px) {
  .topbar-inner { padding-block: 1rem; }
  .brand-logo { height: 4rem; }
}
@media (min-width: 1024px) {
  .brand-logo { height: 5rem; }
}

.topbar-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bone);
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 44px;
  transition: background 0.15s ease;
}
.topbar-wa:hover { background: rgba(36, 26, 21, 0.9); }
.topbar-wa svg { width: 1rem; height: 1rem; }
@media (min-width: 640px) { .topbar-wa { font-size: 1rem; } }

/* --------------------------- Footer --------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.site-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 2.5rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
}
.site-footer .brand-logo { height: 4rem; }
@media (min-width: 640px) {
  .site-footer-inner { flex-direction: row; align-items: center; }
}

/* --------------------------- FAB WhatsApp --------------------------- */
.wa-fab {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  background: var(--whatsapp);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease;
  animation: pulse-ring 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.wa-fab:hover  { transform: scale(1.03); }
.wa-fab:active { transform: scale(0.98); }
.wa-fab svg { width: 1.25rem; height: 1.25rem; }
@media (min-width: 640px) {
  .wa-fab { padding: 1rem 1.5rem; font-size: 1rem; }
  .wa-fab svg { width: 1.5rem; height: 1.5rem; }
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70%  { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --------------------------- Utilidades globales --------------------------- */
.eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--primary);
}

.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/></svg>");
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up 0.9s ease-out both; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
