/* =====================================================
   Kerning Publicidad — Estilos principales
   Minimalista · Editorial · Premium
   ===================================================== */

:root {
  /* Marca Kerning: Negro · Blanco · Rojo */
  --color-bg: #000000;
  --color-bg-alt: #0d0d0d;
  --color-surface: #141414;
  --color-text: #ffffff;
  --color-text-muted: #b0b0b0;
  --color-accent: #e30613;
  --color-accent-hover: #ff1a28;
  --color-accent-soft: rgba(227, 6, 19, 0.12);
  --color-border: #2a2a2a;
  --color-whatsapp: #25d366;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --container: min(1280px, 92vw);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 4px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container { width: var(--container); margin-inline: auto; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin-bottom: 1.5rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 42rem;
  line-height: 1.7;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.2s var(--ease);
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--color-accent);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.btn-sm { padding: 0.6rem 1.25rem; font-size: 0.8rem; }
.btn-lg { padding: 1rem 2rem; font-size: 0.95rem; }

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.site-header.scrolled {
  border-bottom-color: var(--color-border);
  background: rgba(10,10,10,0.95);
}

.header-inner {
  width: var(--container);
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
  /* Si el logo original es negro, se invierte a blanco sobre fondo oscuro.
     Si ya tiene rojo/blanco, comenta la línea filter. */
  /filter: brightness(0) invert(1);
}

.nav-desktop .nav-list {
  display: flex;
  gap: 1.75rem;
}

.nav-desktop a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.2s;
  position: relative;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s var(--ease);
}

.nav-desktop a:hover,
.nav-desktop a.active { color: var(--color-text); }
.nav-desktop a:hover::after,
.nav-desktop a.active::after { width: 100%; }

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text);
  position: absolute;
  left: 9px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.hamburger { top: 19px; }
.hamburger::before { content: ''; top: -7px; }
.hamburger::after { content: ''; top: 7px; }

.menu-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.menu-toggle[aria-expanded="true"] .hamburger::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .hamburger::after { top: 0; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-inner {
  text-align: center;
  padding: 2rem;
}

.mobile-nav-list {
  margin-bottom: 2.5rem;
}

.mobile-nav-list a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 600;
  padding: 0.6rem 0;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.mobile-menu.open .mobile-nav-list a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.open .mobile-nav-list li:nth-child(1) a { transition-delay: 0.05s; }
.mobile-menu.open .mobile-nav-list li:nth-child(2) a { transition-delay: 0.1s; }
.mobile-menu.open .mobile-nav-list li:nth-child(3) a { transition-delay: 0.15s; }
.mobile-menu.open .mobile-nav-list li:nth-child(4) a { transition-delay: 0.2s; }
.mobile-menu.open .mobile-nav-list li:nth-child(5) a { transition-delay: 0.25s; }
.mobile-menu.open .mobile-nav-list li:nth-child(6) a { transition-delay: 0.3s; }
.mobile-menu.open .mobile-nav-list li:nth-child(7) a { transition-delay: 0.35s; }
.mobile-menu.open .mobile-nav-list li:nth-child(8) a { transition-delay: 0.4s; }

.mobile-cta { margin-bottom: 1.5rem; }
.mobile-whatsapp {
  display: block;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(227, 6, 19, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 60%, #1a1a1a 0%, #000000 70%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: var(--container);
  text-align: center;
}

.hero-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero-disciplines {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2.5rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.hero-disciplines span {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ---- Sections ---- */
.section {
  padding: 6rem 0;
}

.section-alt { background: var(--color-bg-alt); }

.section-header {
  margin-bottom: 3.5rem;
  max-width: 40rem;
}

/* ---- Services grid ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.service-card:hover {
  border-color: #444;
  transform: translateY(-4px);
}

.service-number {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

.service-card .link-arrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-accent);
  transition: gap 0.25s, color 0.25s;
}

.service-card:hover .link-arrow { gap: 0.75rem; color: var(--color-accent-hover); }

/* ---- Integrated process ---- */
.process-flow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin: 3rem 0;
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.process-flow .arrow {
  color: var(--color-text-muted);
}

/* ---- Projects ---- */
.projects-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.5rem 1.15rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  color: var(--color-text-muted);
  transition: all 0.25s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  aspect-ratio: 4/3;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.project-card:hover img { transform: scale(1.05); }

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.35s;
}

.project-card:hover .project-card-overlay,
.project-card:focus-within .project-card-overlay { opacity: 1; }

.project-card-cat {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.project-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* ---- What do you need ---- */
.need-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.need-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}

.need-item:hover {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

/* ---- Process steps ---- */
.process-steps {
  display: grid;
  gap: 2rem;
  counter-reset: step;
}

.process-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.process-step:last-child { border-bottom: none; padding-bottom: 0; }

.step-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  min-width: 2.5rem;
}

.process-step h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.process-step p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.25s;
}

.form-control:focus {
  outline: none;
  border-color: #666;
}

.form-control::placeholder { color: #555; }

textarea.form-control { min-height: 140px; resize: vertical; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23a0a0a0'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-message {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: #25d366;
}

.form-message.error {
  display: block;
  background: rgba(220, 50, 50, 0.12);
  border: 1px solid rgba(220, 50, 50, 0.3);
  color: #ff6b6b;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 4rem 0 2rem;
}

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

.footer-tagline {
  font-family: var(--font-display);
  font-size: 0.9rem;
  margin: 0.75rem 0 0.5rem;
  letter-spacing: 0.05em;
}

.footer-location {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-heading {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.footer-nav a,
.footer-contact a {
  display: block;
  font-size: 0.9rem;
  padding: 0.3rem 0;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.footer-nav a:hover,
.footer-contact a:hover { color: var(--color-text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a:hover { color: var(--color-text); }

/* ---- WhatsApp float ---- */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.25s, box-shadow 0.25s;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

.whatsapp-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  border: 1px solid var(--color-border);
}

.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; }

/* ---- Animations (base) ---- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Page headers ---- */
.page-header {
  padding: calc(var(--header-h) + 4rem) 0 3rem;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.page-header p {
  color: var(--color-text-muted);
  max-width: 36rem;
  font-size: 1.1rem;
}

/* ---- Breadcrumbs ---- */
.breadcrumbs {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumbs a:hover { color: var(--color-text); }
.breadcrumbs span { margin: 0 0.4rem; }

/* ---- CTA block ---- */
.cta-block {
  text-align: center;
  padding: 5rem 0;
}

.cta-block h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}

.cta-block p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 32rem;
  margin-inline: auto;
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
