/* Base mínima compartida por todas las páginas. */
:root {
  --color-background: #ffffff;
  --color-text: #11110f;
  --color-muted: #62625d;
  --color-surface: #f3f3f0;
  --color-surface-strong: #e9e9e4;
  --color-border: #d8d8d2;
  --color-dark: #0b0b0a;
  --color-light: #ffffff;
  --font-sans: Inter, Montserrat, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1180px;
  --header-height: 75px;
  --radius: 3px;
  --space-section: clamp(4.5rem, 8vw, 8rem);
  --shadow-soft: 0 16px 40px rgb(10 10 8 / 7%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--color-text);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  transform: translateY(-150%);
  background: var(--color-dark);
  color: var(--color-light);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin-inline: auto;
}

.narrow {
  width: min(calc(100% - 2.5rem), 780px);
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 100;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.header-inner {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  color: var(--color-text);
  text-decoration: none;
}

.brand img {
  width: 190px;
  height: auto;
}

.site-nav,
.nav-list {
  display: flex;
  align-items: center;
}

.site-nav {
  gap: 1rem;
}

.nav-list {
  gap: clamp(0.7rem, 1.3vw, 1.3rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-list a[aria-current="page"] {
  background: #777777;
  color: white;
}


.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-background);
  color: var(--color-text);
  cursor: pointer;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  width: 21px;
  height: 2px;
  background: currentColor;
}

.menu-toggle-lines {
  position: relative;
}

.menu-toggle-lines::before,
.menu-toggle-lines::after {
  position: absolute;
  left: 0;
  content: "";
}

.menu-toggle-lines::before { top: -7px; }
.menu-toggle-lines::after { top: 7px; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.78rem 1.2rem;
  border: 1px solid var(--color-dark);
  border-radius: var(--radius);
  background: var(--color-dark);
  color: var(--color-light);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  background: #292926;
}

.site-footer {
  padding: 4rem 0 1.5rem;
  border-top: 1px solid #2f2f2c;
  background: var(--color-dark);
  color: var(--color-light);
}

.site-footer .brand img {
  filter: invert(1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-brand p {
  max-width: 370px;
  margin: 1.2rem 0 0;
  color: #bdbdb6;
}

.footer-brand a {
  display: inline-block;
  margin-top: 0.7rem;
  font-weight: 800;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem 2rem;
  justify-self: end;
  width: min(100%, 400px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--color-light);
  font-weight: 700;
}

.footer-nav a:hover {
  color: #cfcfc8;
}

.footer-legal {
  display: grid;
  gap: 0.55rem;
  padding-top: 1.5rem;
  border-top: 1px solid #343430;
  color: #bdbdb6;
  font-size: 0.86rem;
  text-align: center;
}

.footer-legal p {
  margin: 0;
}

.footer-copyright {
  color: var(--color-light);
  font-weight: 800;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}

.footer-legal-links a {
  color: var(--color-light);
  font-weight: 700;
}

.footer-location {
  padding-bottom: 0.1rem;
}

.back-to-top,
.whatsapp-float {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  z-index: 90;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-dark);
  animation: whatsapp-float-bob 3s ease-in-out infinite;
  transition: opacity 180ms ease, transform 180ms ease;
}

.back-to-top {
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 3.75rem);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-dark);
  text-decoration: none;
}

.whatsapp-float {
  bottom: max(1rem, env(safe-area-inset-bottom));
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.back-to-top svg {
  width: 30px;
  height: 30px;
}

.back-to-top:hover {
  animation: none;
  transform: translateY(-2px) scale(1.06);
}

.back-to-top:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.whatsapp-float img {
  width: 34px;
  height: 34px;
}

.whatsapp-float:hover {
  animation: none;
  transform: translateY(-2px) scale(1.06);
}

.whatsapp-float:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

@keyframes whatsapp-float-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}



@media (max-width: 1100px) {
  :root { --header-height: 78px; }
  .header-inner { min-height: var(--header-height); }
  .menu-toggle { display: grid; }
  .site-nav {
    position: absolute;
    top: 100%;
    right: max(1.25rem, calc((100vw - var(--max-width)) / 2));
    left: auto;
    display: none;
    width: min(310px, calc(100vw - 2.5rem));
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: .55rem 1rem .85rem;
    border: 1px solid var(--color-border);
    border-top: 0;
    border-radius: 0 0 0 var(--radius);
    background: rgb(255 255 255 / 98%);
    box-shadow: var(--shadow-soft);
  }
  .site-nav.is-open { display: block; animation: nav-panel-enter 180ms ease-out both; }
  .nav-list { display: grid; gap: 0; }
  .nav-list a {
    width: 100%;
    min-height: 48px;
    justify-content: flex-end;
    border-bottom: 1px solid var(--color-border);
    text-align: right;
  }
  .nav-list li:last-child a { border-bottom: 0; }
  .nav-list a[aria-current="page"] {
    padding-right: .7rem;
    border-right: 3px solid var(--color-text);
    border-bottom-color: var(--color-border);
  }
}

@keyframes nav-panel-enter {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-nav { justify-self: start; }
}

@media (max-width: 640px) {
  :root { --header-height: 72px; }
  .container,
  .narrow { width: min(calc(100% - 2rem), var(--max-width)); }
  .brand img { width: 175px; height: auto; }
  .footer-nav { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  .back-to-top,
  .whatsapp-float { animation: none; }
  .site-nav.is-open { animation: none; }
}
