/* =========================================================
   NartoEV — Design tokens
   Fondo blanco para contraste, verde de marca (tomado del
   logo) como acento, y un panel oscuro puntual como vitrina
   para la publicación — eco de la textura del logo y del local.
   ========================================================= */
:root {
  --bg: #ffffff;
  --bg-elevated: #f5f8f1;
  --bg-elevated-2: #eaf0e2;
  --line: #dde5d3;

  --accent: #4f9227;
  --accent-bright: #6fbf3a;
  --accent-dim: #3c6f1d;
  --accent-soft: rgba(79, 146, 39, 0.1);

  --text: #12160f;
  --text-muted: #5c6653;

  /* Panel oscuro: eco de la textura del logo y la foto del local,
     usado como vitrina puntual para destacar la publicación */
  --panel-dark: #12160f;
  --panel-dark-2: #1c2216;
  --panel-line: #2a3221;
  --panel-text: #f4f7f1;

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --wrap: 1160px;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

/* Elementos que aparecen animados al hacer scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s ease-out, transform 0.65s ease-out;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--text-muted); }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

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

.public-publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 34px;
}

.public-publication-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.public-publication-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  min-height: 230px;
  padding: 8px;
  background: var(--bg-elevated-2);
}

.public-publication-media img,
.public-publication-media video {
  width: 100%;
  height: 220px;
  border: 0;
  border-radius: 8px;
  background: var(--panel-dark);
  object-fit: cover;
}

.public-publication-media:has(> :only-child) img,
.public-publication-media:has(> :only-child) video {
  grid-column: 1 / -1;
}

.media-placeholder,
.catalog-status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  color: var(--text-muted);
  text-align: center;
}

.public-publication-content { padding: 22px; }
.public-publication-content h3 { margin-bottom: 9px; }
.public-publication-content p { min-height: 52px; }
.public-publication-content strong { color: var(--accent-dim); font-family: var(--font-mono); }
.public-publication-media img { cursor: zoom-in; }
.public-publication-content { cursor: pointer; }
.public-publication-content:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.modal-open { overflow: hidden; }
.catalog-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(8, 11, 8, 0.86);
  animation: catalog-modal-in 0.18s ease-out;
}
.catalog-modal[hidden] { display: none; }
.catalog-image-modal img {
  display: block;
  max-width: min(94vw, 1200px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}
.catalog-modal-close {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  background: rgba(8, 11, 8, 0.58);
  color: #ffffff;
  cursor: pointer;
  font-size: 1.05rem;
}
.catalog-modal-close:hover { background: var(--accent); border-color: var(--accent); }
.catalog-details-panel {
  position: relative;
  width: min(680px, 94vw);
  max-height: 86vh;
  overflow: auto;
  padding: 42px 46px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}
.catalog-details-panel .catalog-modal-close { top: 16px; right: 16px; background: var(--panel-dark); }
.catalog-details-panel h2 { max-width: calc(100% - 24px); }
.catalog-details-panel #catalog-details-content {
  white-space: pre-wrap;
  color: var(--text-muted);
  line-height: 1.75;
}
@keyframes catalog-modal-in { from { opacity: 0; } to { opacity: 1; } }

.public-publications-slider {
  position: relative;
  padding: 0 54px;
}

.public-publications-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  gap: 24px;
  margin-top: 34px;
}

.public-publication-card {
  min-width: 0;
}

.public-publication-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  min-height: 0;
  padding: 0;
  background: #ffffff;
}

.public-publication-media img,
.public-publication-media video {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  background: #ffffff;
  object-fit: cover;
}

.public-publication-media .media-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(18, 22, 15, 0.78);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.public-publication-media .media-placeholder {
  min-height: 100%;
}

.catalog-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 4px 14px rgba(18, 22, 15, 0.12);
  cursor: pointer;
  font-size: 1.35rem;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.catalog-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-50%) scale(1.05);
}

.catalog-arrow-left { left: 0; }
.catalog-arrow-right { right: 0; }
.catalog-arrow[hidden] { display: none; }

@media (max-width: 1050px) {
  .public-publications-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .public-publications-slider { padding: 0 42px; }
  .public-publications-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .public-publications-slider { padding: 0 34px; }
  .public-publications-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .public-publication-content { padding: 15px; }
  .public-publication-content p { min-height: 0; }
  .catalog-arrow { width: 34px; height: 34px; }
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 36px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0));
  pointer-events: none;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

.site-nav {
  display: flex;
  gap: 32px;
}

.site-nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--text); }

@media (max-width: 780px) {
  .site-nav { display: none; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-login:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.login-icon {
  width: 24px;
  height: 24px;
  display: block;
}

/* Íconos sociales: header y footer */
.social-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: all 0.15s ease;
}

.social-icon:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.social-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.footer-social { order: 2; }

/* Cuadro flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px 14px 14px;
  background: linear-gradient(155deg, #25f08a, #00e676);
  border: none;
  border-radius: 999px;
  box-shadow:
    0 12px 34px rgba(0, 230, 118, 0.45),
    0 0 0 6px rgba(0, 230, 118, 0.18),
    0 0 30px 4px rgba(0, 230, 118, 0.55);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  animation: whatsapp-glow 2.4s ease-in-out infinite;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.whatsapp-float:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 16px 40px rgba(0, 230, 118, 0.55),
    0 0 0 8px rgba(0, 230, 118, 0.22),
    0 0 42px 8px rgba(0, 230, 118, 0.7);
}

@keyframes whatsapp-glow {
  0%, 100% {
    box-shadow:
      0 12px 34px rgba(0, 230, 118, 0.45),
      0 0 0 6px rgba(0, 230, 118, 0.18),
      0 0 30px 4px rgba(0, 230, 118, 0.55);
  }
  50% {
    box-shadow:
      0 12px 34px rgba(0, 230, 118, 0.45),
      0 0 0 10px rgba(0, 230, 118, 0.1),
      0 0 42px 10px rgba(0, 230, 118, 0.75);
  }
}

.whatsapp-float-icon {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-float { animation: none; }
}

@media (max-width: 480px) {
  .whatsapp-float span { display: none; }
  .whatsapp-float { padding: 12px; }
}

/* =========================================================
   Botones
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-accent {
  background: var(--accent);
  color: #ffffff;
}
.btn-accent:hover { background: var(--accent-dim); }

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.1rem);
  color: var(--text);
}

/* =========================================================
   Hero (banner con imagen de fondo)
   ========================================================= */
.hero-banner {
  position: relative;
  width: 100%;
  min-height: 93vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-banner-bg {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  z-index: -2;
  animation: hero-bg-reveal 1.6s ease-out both;
}

.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 20, 13, 0.6) 0%, rgba(15, 20, 13, 0.78) 100%);
  z-index: -1;
}

.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  top: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--bg) 100%);
  z-index: -1;
  pointer-events: none;
}

.hero-banner-content {
  color: #ffffff;
  max-width: 640px;
  padding: 96px 0;
}

.hero-banner .eyebrow {
  color: var(--accent-bright);
  animation: hero-fade-up 0.7s ease-out both;
  animation-delay: 0.25s;
}

.hero-banner h1 {
  color: #ffffff;
  margin-bottom: 20px;
  animation: hero-fade-up 0.8s ease-out both;
  animation-delay: 0.4s;
}

.hero-banner-lead {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 46ch;
  margin-bottom: 30px;
  animation: hero-fade-up 0.8s ease-out both;
  animation-delay: 0.55s;
}

.hero-banner-content .btn {
  animation: hero-fade-up 0.8s ease-out both;
  animation-delay: 0.7s;
}

@keyframes hero-bg-reveal {
  from {
    opacity: 0;
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .hero-banner { min-height: 75vh; }
  .hero-banner-content { padding: 64px 0; }
}

/* =========================================================
   Secciones genéricas
   ========================================================= */
.section {
  padding: 88px 0;
  border-top: 1px solid var(--line);
}
.section-alt { background: var(--bg-elevated); }

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-lead {
  max-width: 52ch;
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* Cómo funciona */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 28px;
  border-top: 2px solid var(--line);
}

.step-plug {
  position: absolute;
  top: -7px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px rgba(79, 146, 39, 0.55);
}

.step h3 { font-size: 1.15rem; margin-top: 12px; }

@media (max-width: 780px) {
  .steps { grid-template-columns: 1fr; }
}

/* Catálogo */
.publication-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.publication-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.publication-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.publication-card-featured {
  border-color: var(--accent);
  background: linear-gradient(165deg, var(--accent-soft), transparent);
}

.publication-icon { font-size: 1.6rem; margin-bottom: 14px; }

.publication-card h3 { font-size: 1.2rem; }

.publication-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.publication-specs span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 10px;
  border-radius: 6px;
}

@media (max-width: 860px) {
  .publication-grid { grid-template-columns: 1fr; }
}

/* Beneficios */
.benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 40px;
  max-width: 820px;
}
.benefits li {
  padding-left: 22px;
  position: relative;
  color: var(--text-muted);
}
.benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.benefits strong { color: var(--text); }

@media (max-width: 640px) {
  .benefits { grid-template-columns: 1fr; }
}

/* Contacto */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--text);
  padding: 14px 22px 14px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: fit-content;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.contact-link:hover {
  transform: translateY(-2px);
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  transition: box-shadow 0.2s ease;
}

.contact-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-link-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.contact-link-text strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text);
}

.contact-link-text span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Colores dinámicos por marca, al pasar el mouse */
.contact-link-whatsapp:hover {
  border-color: #00e676;
  box-shadow: 0 8px 24px rgba(0, 230, 118, 0.25);
}
.contact-link-whatsapp:hover .contact-icon {
  box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.18);
}

.contact-link-instagram:hover {
  border-color: #dd2a7b;
  box-shadow: 0 8px 24px rgba(221, 42, 123, 0.22);
}
.contact-link-instagram:hover .contact-icon {
  box-shadow: 0 0 0 4px rgba(221, 42, 123, 0.16);
}

.contact-link-gmail:hover {
  border-color: #ea4335;
  box-shadow: 0 8px 24px rgba(234, 67, 53, 0.2);
}
.contact-link-gmail:hover .contact-icon {
  box-shadow: 0 0 0 4px rgba(234, 67, 53, 0.15);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-copy {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-muted);
}
