/* ==========================================================================
   Levanteestudio — hoja de estilos base
   Mobile-first. Sin frameworks.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #ffffff;
  --card: #ffffff;
  --text: #211d1a;
  --text-muted: rgba(33, 29, 26, 0.66);
  --text-soft: rgba(33, 29, 26, 0.45);
  --accent: #2a5ce0;
  --accent-dark: #1f45ad;
  --accent-soft: rgba(42, 92, 224, 0.12);
  --accent-2: #ffc93c;
  --accent-3: #ff8a3d;
  --line: rgba(33, 29, 26, 0.12);
  --line-strong: rgba(33, 29, 26, 0.22);
  --cream-soft: rgba(250, 245, 236, 0.14);

  --font-serif: 'Space Grotesk', -apple-system, sans-serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1080px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius: 18px;
  --radius-lg: 28px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 88px; }

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

img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

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

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { position: relative; }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
#videos-ia { padding-block: clamp(2.25rem, 4.5vw, 3.25rem); }
#videos-ia .section-head { margin-bottom: 1.75rem; }
.section--alt { background: var(--bg-alt); }
.section--accent { background: var(--accent); color: var(--bg); }
.section--dark { background: var(--text); color: var(--bg); }

.section--accent .lead, .section--accent p { color: rgba(250, 245, 236, 0.85); }
.section--dark .lead, .section--dark p { color: rgba(250, 245, 236, 0.72); }

.cta-final { text-align: center; background: var(--accent); color: #fff; }
.cta-final h2 { max-width: 20em; margin-inline: auto; margin-bottom: 1rem; color: #fff; }
.cta-final .lead { max-width: 34em; margin-inline: auto; margin-bottom: 2rem; color: rgba(255, 255, 255, 0.85); }
.cta-final .btn-primary { background: #fff; color: var(--accent); border-color: var(--text); }
.cta-final .btn-primary:hover { background: #f2f2f2; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.section--accent .eyebrow,
.section--dark .eyebrow {
  color: var(--bg);
  background: var(--cream-soft);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 6.4vw, 4.8rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-muted);
  max-width: 38em;
}

p { color: var(--text-muted); }

.section-head { margin-bottom: clamp(2rem, 4.5vw, 3rem); }
.section-head h2 { max-width: 22em; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95rem 1.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid var(--text);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: #fff; border-color: var(--text); }
.btn-primary:hover { background: var(--accent-dark); }

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

.btn-ghost { color: var(--accent); padding-inline: 0; font-weight: 600; border: none; }
.btn-ghost::after { content: '→'; margin-left: 0.4em; transition: transform 0.25s var(--ease); }
.btn-ghost:hover::after { transform: translateX(4px); }

.section--accent .btn-outline,
.section--dark .btn-outline { border-color: rgba(250, 245, 236, 0.45); color: var(--bg); }
.section--accent .btn-outline:hover,
.section--dark .btn-outline:hover { border-color: var(--bg); color: var(--bg); background: var(--cream-soft); }
.section--dark .btn-ghost { color: var(--bg); }

.btn-sm { padding: 0.6rem 1.3rem; font-size: 0.85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* ---- Polaroid (tira de fotomatón) ---- */
.polaroid {
  position: relative;
  background: #fff;
  border: 2px solid var(--text);
  border-radius: 8px;
  padding: 8px 8px 10px;
  box-shadow: 5px 6px 0 rgba(33, 29, 26, 0.1);
}
.polaroid .polaroid-media { position: relative; overflow: hidden; border-radius: 3px; background: #000; }
.polaroid .polaroid-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.polaroid-cap {
  display: block; padding-top: 8px; font-family: var(--font-serif);
  font-size: 0.85rem; font-weight: 700; color: var(--text); text-align: center;
}
.pin { position: absolute; width: 14px; height: 14px; border-radius: 50%; top: -7px; left: 50%; transform: translateX(-50%); border: 1px solid rgba(33, 29, 26, 0.25); }
.rot-1 { transform: rotate(-3deg); }
.rot-2 { transform: rotate(2.5deg); }
.rot-3 { transform: rotate(-2deg); }
.rot-4 { transform: rotate(3deg); }
.rot-5 { transform: rotate(-4deg); }
.rot-6 { transform: rotate(1.5deg); }
.scallop {
  height: 14px;
  background-image: radial-gradient(circle at 10px -4px, transparent 10px, var(--scallop-to, var(--bg)) 10.5px);
  background-size: 20px 14px;
  background-repeat: repeat-x;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}
.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 6px 24px rgba(33, 29, 26, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 76px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
.logo-img { height: 40px; width: auto; }
.logo-text { text-transform: lowercase; }

.main-nav ul {
  display: flex;
  gap: clamp(1.25rem, 2vw, 2.25rem);
}
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding-block: 0.4rem;
  transition: color 0.2s var(--ease);
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--text); }
.main-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 1rem; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px; /* área táctil recomendada (antes 32px, algo justo para el dedo) */
  height: 44px;
  background: none;
  border: none;
  padding: 0;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 899px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: 0;
    top: 76px;
    background: var(--bg);
    padding: 2.5rem var(--gutter);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .main-nav ul { flex-direction: column; gap: 1.75rem; }
  .main-nav a { font-size: 1.4rem; font-family: var(--font-serif); color: var(--text); }
  .nav-cta { display: none; }
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
}

/* ---- Hero (tira de fotomatón + titular) ---- */
.hero { position: relative; padding-block: clamp(2.5rem, 6vw, 4rem); overflow: hidden; min-height: clamp(480px, 62vw, 640px); display: flex; align-items: center; }

/* ---- Fondo del hero: los 4 vídeos reales, uno junto a otro, a pantalla completa ---- */
.hero-video-bg { position: absolute; inset: 0; z-index: 0; display: flex; overflow: hidden; background: #14110e; }
.hero-video-bg video { flex: 1 1 0; width: 25%; height: 100%; object-fit: cover; display: block; }
.hero-video-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(15, 13, 11, 0.4) 0%, rgba(15, 13, 11, 0.62) 45%, rgba(15, 13, 11, 0.82) 100%),
    linear-gradient(180deg, rgba(15, 13, 11, 0.5) 0%, rgba(15, 13, 11, 0.6) 55%, rgba(15, 13, 11, 0.78) 100%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; width: 100%; }
.hero-strip { position: relative; display: flex; gap: 14px; justify-content: center; }
.hero-strip .polaroid { width: 104px; flex-shrink: 0; }
.hero-strip .polaroid-media { aspect-ratio: 3 / 4; }
.hero-strip .polaroid:nth-child(1) { transform: rotate(-6deg); }
.hero-strip .polaroid:nth-child(2) { transform: rotate(3deg) translateY(10px); }
.hero-strip .polaroid:nth-child(3) { transform: rotate(-3deg); }
.hero-badge {
  position: absolute;
  top: -34px;
  left: 4px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--accent-2);
  border: 2px solid var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text);
  white-space: nowrap;
  transform: rotate(-7deg);
  box-shadow: 3px 4px 0 rgba(33, 29, 26, 0.15);
}
.hero-badge svg { width: 14px; height: 14px; flex-shrink: 0; }
@media (max-width: 760px) {
  .hero-badge { top: -30px; left: 0; font-size: 0.72rem; padding: 0.4rem 0.75rem; }
}
.hero-copy { position: relative; max-width: 32em; text-align: left; }
.hero-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.75rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 3.2rem); margin-bottom: 1.25rem; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55); }
.hero .lead { margin-bottom: 1.75rem; color: rgba(255, 255, 255, 0.78); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5); }
.hero-burst { position: absolute; top: -22px; right: 4px; width: 30px; height: 30px; }
@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-strip { margin-bottom: 1.75rem; }
}
@media (max-width: 640px) {
  /* En móvil, con solo 4 columnas finas los vídeos se ven demasiado estrechos:
     mostramos únicamente los 2 primeros, cada uno a la mitad del ancho. */
  .hero-video-bg video:nth-child(n + 3) { display: none; }
  .hero-video-bg video { width: 50%; }
}

/* ---- Lo que hacemos ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.service-card {
  background: #fff;
  border: 2px solid var(--text);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: 5px 6px 0 rgba(33, 29, 26, 0.08);
}
.service-card:nth-child(2n) { transform: rotate(1deg); }
.service-card:nth-child(2n+1) { transform: rotate(-1deg); }
.service-num {
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.service-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.service-card p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .services-grid { grid-template-columns: 1fr; }
  .service-card:nth-child(2n), .service-card:nth-child(2n+1) { transform: none; }
}

/* ---- Vídeos reales bajo "Lo que hacemos" ---- */
.service-reels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.service-reel-card {
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--text);
  box-shadow: 5px 6px 0 rgba(33, 29, 26, 0.08);
}
.service-reel-views { display: block; margin-top: 0.6rem; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-align: center; }
@media (max-width: 900px) {
  .service-reels { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .service-reels { grid-template-columns: 1fr; max-width: 220px; margin-inline: auto; }
}

/* ---- Placeholder photo blocks (hasta incorporar más fotografía propia) ---- */
.ph-block {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(150deg, #c1502e 0%, #9c3f24 60%, #6f2c19 100%);
}
.ph-block::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.09) 1px, transparent 0);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
}

/* ---- IA feature section ---- */
.ia-points { display: grid; gap: 1.1rem; margin-bottom: 0; }
.ia-points li { display: flex; gap: 0.9rem; font-size: 0.98rem; color: rgba(250, 245, 236, 0.9); }
.ia-points li::before { content: '—'; color: var(--bg); opacity: 0.6; flex-shrink: 0; }

/* ---- Portfolio ---- */
.portfolio-feature {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: center;
}
.portfolio-feature .media-frame { aspect-ratio: 4 / 5; }
@media (min-width: 900px) {
  .portfolio-feature { grid-template-columns: 0.95fr 1.05fr; }
  .portfolio-feature .media-frame { aspect-ratio: 4 / 5; }
}
.tag-list { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

/* ---- Tira de logos (fotos sueltas de fotomatón) ---- */
.logos-grid { display: flex; flex-wrap: wrap; gap: 1.75rem; padding-top: 0.5rem; }
.logo-card {
  background: #fff;
  border: 2px solid var(--text);
  border-radius: 8px;
  width: 148px;
  padding: 10px 10px 12px;
  box-shadow: 5px 6px 0 rgba(33, 29, 26, 0.1);
  transition: transform 0.2s var(--ease);
}
.logo-card:hover { transform: translateY(-3px) rotate(0deg) !important; }
.logo-card:nth-child(6n+1) { transform: rotate(-4deg); }
.logo-card:nth-child(6n+2) { transform: rotate(3deg) translateY(8px); }
.logo-card:nth-child(6n+3) { transform: rotate(-2deg) translateY(4px); }
.logo-card:nth-child(6n+4) { transform: rotate(4deg); }
.logo-card:nth-child(6n+5) { transform: rotate(-3deg) translateY(6px); }
.logo-card:nth-child(6n+6) { transform: rotate(2deg); }
.logo-card .logo-frame {
  aspect-ratio: 4 / 3;
  background: #fdfaf6;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}
.logo-card img { max-width: 78%; max-height: 78%; width: auto; height: auto; object-fit: contain; }
.logo-card .logo-text {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.25;
}
.logo-card--cta {
  text-decoration: none;
  cursor: pointer;
}
.logo-card--cta .logo-frame {
  background: var(--accent-soft);
  border: 2px dashed var(--accent);
  flex-direction: column;
  gap: 0.5rem;
}
.logo-cta-text {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  line-height: 1.25;
}
.logo-cta-arrow {
  width: 20px;
  height: 20px;
  color: var(--accent);
  transition: transform 0.2s var(--ease);
}
.logo-card--cta:hover .logo-cta-arrow { transform: translateX(4px); }
@media (min-width: 640px) {
  .logos-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Casos de éxito (selector interactivo) ---- */
.case-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}
.case-tab {
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.case-tab:hover { border-color: var(--accent); color: var(--text); }
.case-tab.is-active { background: var(--text); border-color: var(--text); color: var(--bg); }

.case-panel { display: none; }
.case-panel.is-active { display: block; animation: case-fade-in 0.4s var(--ease); }
@keyframes case-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.case-panel-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
}
@media (min-width: 900px) {
  .case-panel-grid { grid-template-columns: 1fr 1fr; }
}

.case-panel h3 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-bottom: 0.75rem; }
.case-panel > .case-panel-grid > div:first-child > p { margin-bottom: 1.5rem; }

/* ---- Gráfica interactiva de casos de éxito ---- */
.case-chart { display: flex; flex-direction: column; gap: 1rem; }
.chart-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chart-tab {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--text);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.chart-tab.is-active { background: var(--accent); border-color: var(--text); color: #fff; }
.chart-tab:hover:not(.is-active) { color: var(--text); }

.chart-card {
  position: relative;
  background: #fff;
  border: 2px solid var(--text);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 0.5rem;
  box-shadow: 5px 6px 0 rgba(33, 29, 26, 0.08);
}
.chart-meta { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 0.75rem; }
.chart-metric-label { font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; color: var(--text); }
.chart-metric-sub { font-size: 0.8rem; color: var(--text-soft); }

.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-svg .chart-line { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.chart-svg .chart-area { fill: var(--accent-soft); stroke: none; }
.chart-svg .chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-svg .chart-axis-label { font-family: var(--font-sans); font-size: 9px; fill: var(--text-soft); }
.chart-svg .chart-point { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.chart-svg .chart-hit { fill: transparent; cursor: pointer; }
.chart-svg .chart-point.is-hover { fill: var(--accent); }

.chart-tooltip {
  position: absolute;
  transform: translate(-50%, -110%);
  background: var(--text);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
}
.chart-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text);
}

.chart-table-toggle { margin-top: 0.75rem; font-size: 0.8rem; }
.chart-table-toggle summary { cursor: pointer; font-weight: 700; color: var(--accent); padding-block: 0.5rem; }
.table-scroll { overflow-x: auto; margin-top: 0.5rem; }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.table-scroll th, .table-scroll td { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-scroll th { color: var(--text-soft); font-weight: 700; }

.case-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.case-kpis > div {
  background: #fff;
  border: 2px solid var(--text);
  border-radius: 10px;
  padding: 1rem 0.9rem;
  text-align: center;
  box-shadow: 4px 5px 0 rgba(33, 29, 26, 0.1);
}
.case-kpis > div:nth-child(4n+1) { transform: rotate(-1.5deg); }
.case-kpis > div:nth-child(4n+2) { transform: rotate(1.5deg); }
.case-kpis > div:nth-child(4n+3) { transform: rotate(1deg); }
.case-kpis > div:nth-child(4n+4) { transform: rotate(-1deg); }
.case-kpi-num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.5vw, 2.4rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.case-kpi-label { font-size: 0.85rem; color: var(--text-muted); }

.case-pending-note {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-soft);
}

.case-chart-pending {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.4rem;
  min-height: 180px;
  color: var(--text-soft);
}
.case-chart-pending p { color: var(--text-muted); font-weight: 600; margin: 0; }
.case-chart-pending span { font-size: 0.85rem; max-width: 26em; }

.case-videos-pending {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-soft);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--text);
  color: rgba(250, 245, 236, 0.75);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 2rem;
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(250, 245, 236, 0.14);
  margin-bottom: 1.5rem;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--bg);
  margin-bottom: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  text-transform: lowercase;
}
.footer-logo .spark { color: var(--accent); font-size: 0.85em; }
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(250, 245, 236, 0.5);
  margin-bottom: 1rem;
}
.footer-col ul { display: grid; gap: 0.65rem; }
.footer-col a, .footer-col address, .footer-col p { font-size: 0.92rem; color: rgba(250, 245, 236, 0.75); }
.footer-col a:hover { color: var(--bg); }
address { font-style: normal; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: rgba(250, 245, 236, 0.45);
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* ---- WhatsApp float ---- */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(33, 29, 26, 0.25);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.whatsapp-float:hover { transform: translateY(-2px); background: var(--accent-dark); }
.whatsapp-float svg { width: 26px; height: 26px; }

/* ---- Reveal on scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }

/* ---- Barra de progreso de scroll ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: var(--accent);
  z-index: 300;
}

/* ---- Cursor de acento (solo dispositivos con puntero fino) ---- */
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 250;
  opacity: 0;
  transform: translate(0, 0) scale(1);
  transition: opacity 0.25s var(--ease), transform 0.2s var(--ease), background 0.25s var(--ease);
}
.cursor-ring.is-active { opacity: 1; }
.cursor-ring.is-hover { background: var(--accent-soft); transform: scale(1.6); }
@media (hover: none), (pointer: coarse) {
  .cursor-ring { display: none; }
}

/* ---- Zoom en hover para bloques de foto dentro de una tarjeta ---- */
.media-frame { overflow: hidden; border-radius: var(--radius-lg); }
.media-frame .ph-block,
.media-frame img {
  transition: transform 0.6s var(--ease);
}
.portfolio-feature:hover .media-frame .ph-block,
.portfolio-feature:hover .media-frame img {
  transform: scale(1.05);
}

/* ---- Reel de vídeos IA ---- */
.reel {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  overflow-y: visible; /* si no se fija, el navegador la trata como "auto" y recorta las tarjetas giradas */
  scroll-snap-type: x mandatory;
  margin: 0 calc(var(--gutter) * -1);
  padding: 14px var(--gutter) 18px; /* aire vertical para que quepa el giro sin tocar los bordes */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.reel::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  /* Con los 4 vídeos caben de sobra sin deslizar — se centran en vez de
     quedarse pegados a la izquierda con un hueco vacío a la derecha. */
  .reel { justify-content: center; overflow-x: visible; }
}

.reel-item {
  position: relative;
  flex: 0 0 auto;
  width: min(60vw, 200px);
  scroll-snap-align: start;
  background: #fff;
  border: 2px solid var(--text);
  border-radius: 8px;
  padding: 8px 8px 12px;
  box-shadow: 5px 6px 0 rgba(33, 29, 26, 0.16);
}
.reel-item:nth-child(4n+1) { transform: rotate(-3deg); }
.reel-item:nth-child(4n+2) { transform: rotate(2deg); }
.reel-item:nth-child(4n+3) { transform: rotate(-2deg); }
.reel-item:nth-child(4n+4) { transform: rotate(3deg); }
.reel-item .reel-views { display: block; margin-top: 0.5rem; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-align: center; }
.reel-card {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 3px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}
.reel-card img,
.reel-card video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reel-card .reel-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 14, 10, 0.22);
  transition: background 0.25s var(--ease), opacity 0.25s var(--ease);
}
.reel-card:hover .reel-overlay { background: rgba(20, 14, 10, 0.08); }
.reel-card.is-playing .reel-overlay { opacity: 0; pointer-events: none; }

.reel-play {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(250, 245, 236, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease);
}
.reel-card:hover .reel-play { transform: scale(1.08); }
.reel-play svg { width: 18px; height: 18px; fill: var(--accent); margin-left: 2px; }

.reel-item .reel-caption {
  display: block;
  padding-top: 0.6rem;
  font-family: var(--font-serif);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.reel-hint {
  font-size: 0.82rem;
  color: rgba(250, 245, 236, 0.6);
  margin-top: 1.25rem;
}
