/* ════════════════════════════════════════════════════════════
   services-page.css
   Estilos compartidos para páginas de servicios y casos
   /servicios/*/index.html  /casos/*/index.html
   ════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   LAYOUT — body full-width (para backdrop) + bloques centrados
   Cada hijo directo del body se centra a max 1200px con padding lateral.
   Esto es más robusto que centrar el body (pseudo-elementos, scroll, etc).
   ═══════════════════════════════════════════════════════════════ */
html body {
  padding-top: 6vh !important;
  padding-bottom: 4vh !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  box-sizing: border-box;
  position: relative;
  overflow-x: hidden;
}

/* Centrado por bloque (header, main, aside, section, footer + manifesto divs) */
body > header,
body > main,
body > aside,
body > section,
body > footer,
body > .mf-header,
body > .mf-kicker,
body > .mf-title,
body > .mf-thesis,
body > .mf-rule,
body > .mf-end {
  max-width: 1200px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 4vw;
  padding-right: 4vw;
  box-sizing: border-box;
}

/* ════════════════════════════════════════════════════════════
   EFECTOS VISUALES — backdrop + partículas + reveals
   Aplican automáticamente a páginas que carguen este CSS
   Si JS no corre (html.bc-fx no se setea), nada queda invisible
   ════════════════════════════════════════════════════════════ */

/* ─────────── Backdrop copper glow (más visible) ─────────── */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 65vw;
  height: 90vh;
  background: radial-gradient(circle at center,
    rgba(232,116,58,0.28) 0%,
    rgba(232,116,58,0.10) 30%,
    rgba(232,116,58,0.03) 50%,
    transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: -2;
  animation: bc-drift 16s ease-in-out infinite alternate;
}
body::after {
  content: '';
  position: fixed;
  bottom: -15%;
  right: -15%;
  width: 60vw;
  height: 80vh;
  background: radial-gradient(circle at center,
    rgba(232,116,58,0.18) 0%,
    rgba(232,116,58,0.06) 35%,
    rgba(180,80,30,0.04) 55%,
    transparent 75%);
  filter: blur(70px);
  pointer-events: none;
  z-index: -2;
  animation: bc-drift 20s ease-in-out infinite alternate-reverse;
}

/* ─────────── Noise grain global (html::before, sin tocar HTML) ─────────── */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ─────────── Corner editorial glyph global (html::after, sin tocar HTML) ─────────── */
html::after {
  content: '';
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 56 56' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23E8743A' stroke-width='1.4'%3E%3Ccircle cx='28' cy='28' r='22'/%3E%3Ccircle cx='28' cy='28' r='14' opacity='0.5'/%3E%3Cline x1='28' y1='2' x2='28' y2='12'/%3E%3Cline x1='28' y1='44' x2='28' y2='54'/%3E%3Cline x1='2' y1='28' x2='12' y2='28'/%3E%3Cline x1='44' y1='28' x2='54' y2='28'/%3E%3Ccircle cx='28' cy='28' r='3' fill='%23E8743A'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: opacity 0.4s, transform 0.4s;
  animation: bc-mark-spin 60s linear infinite;
}
@keyframes bc-mark-spin {
  to { transform: rotate(360deg); }
}

/* ─────────── Subtle vertical grid lines (column rhythm) ─────────── */
body > main {
  position: relative;
}
body > main::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(245,241,234,0.025) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
  background-position: 4vw 0;
  z-index: -1;
}
@keyframes bc-drift {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(40px, -30px) scale(1.15); opacity: 0.85; }
}

/* ─────────── Partículas flotantes ─────────── */
.bc-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.bc-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--copper);
  border-radius: 50%;
  opacity: 0;
  animation: bc-float 12s ease-in-out infinite;
}
.bc-particle:nth-child(1) { top: 15%; left: 8%;  animation-delay: 0s;   width: 3px; height: 3px; }
.bc-particle:nth-child(2) { top: 40%; left: 92%; animation-delay: -3s;  width: 5px; height: 5px; }
.bc-particle:nth-child(3) { top: 70%; left: 5%;  animation-delay: -6s;  }
.bc-particle:nth-child(4) { top: 25%; left: 70%; animation-delay: -9s;  width: 2px; height: 2px; }
.bc-particle:nth-child(5) { top: 85%; left: 50%; animation-delay: -2s;  width: 3px; height: 3px; }
.bc-particle:nth-child(6) { top: 55%; left: 30%; animation-delay: -8s;  width: 2px; height: 2px; }
@keyframes bc-float {
  0%, 100% { transform: translateY(0) scale(1);    opacity: 0; }
  20%      { opacity: 0.5; }
  50%      { transform: translateY(-30px) scale(1.3); opacity: 0.9; }
  80%      { opacity: 0.4; }
}

/* ─────────── Hero title + lead reveal (on load) ─────────── */
html.bc-fx .svc-title,
html.bc-fx .mf-title {
  position: relative;
  opacity: 0;
  transform: translateY(15px);
  animation: bc-reveal 0.9s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
html.bc-fx .svc-lead {
  opacity: 0;
  transform: translateY(15px);
  animation: bc-reveal 0.8s 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes bc-reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* ─────────── Section + opt-in reveal on scroll ─────────── */
html.bc-fx .svc-section,
html.bc-fx .bc-reveal,
html.bc-fx .mf-rule,
html.bc-fx .mf-thesis {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
html.bc-fx .svc-section.bc-in,
html.bc-fx .bc-reveal.bc-in,
html.bc-fx .mf-rule.bc-in,
html.bc-fx .mf-thesis.bc-in {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────── Respect reduced-motion preference ─────────── */
@media (prefers-reduced-motion: reduce) {
  html.bc-fx .svc-title,
  html.bc-fx .mf-title,
  html.bc-fx .svc-lead,
  html.bc-fx .svc-section,
  html.bc-fx .bc-reveal,
  html.bc-fx .mf-rule,
  html.bc-fx .mf-thesis {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  body::before, body::after, .bc-particle, html::after {
    animation: none !important;
  }
}

/* ── Header con breadcrumbs y nav ─────────────────────────── */
.svc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8vh;
  flex-wrap: wrap;
  gap: 1rem;
}
.svc-back {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.svc-back:hover { color: var(--copper); }
.svc-back::before { content: '←'; font-family: inherit; }

.svc-breadcrumbs {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-1);
}
.svc-breadcrumbs a { color: var(--gray-2); text-decoration: none; }
.svc-breadcrumbs a:hover { color: var(--copper); }
.svc-breadcrumbs .current { color: var(--copper); }

/* ── Hero ─────────────────────────────────────────────────── */
.svc-kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-1);
  margin-bottom: 1.5rem;
}
.svc-title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--cream);
  margin-bottom: 2rem;
}
.svc-title .it { font-style: italic; color: var(--copper); }

.svc-lead {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  font-weight: 400;
  line-height: 1.35;
  color: var(--cream-dim);
  max-width: 38ch;
  margin-bottom: 8vh;
}

/* ── Secciones ────────────────────────────────────────────── */
.svc-section {
  padding: 6vh 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 800px) {
  .svc-section { grid-template-columns: 1fr; gap: 1.5rem; }
}
.svc-section__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--copper);
  position: sticky;
  top: 3rem;
}
.svc-section h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 1.5rem;
}
.svc-section h2 .it { font-style: italic; color: var(--copper); }
.svc-section p {
  color: var(--cream-dim);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 65ch;
  margin-bottom: 1.2rem;
}
.svc-section p strong { color: var(--cream); font-weight: 500; }
.svc-section h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--cream);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  line-height: 1.2;
}
.svc-section h3 .it { font-style: italic; color: var(--copper); }

/* ── Capabilities grid ────────────────────────────────────── */
.svc-caps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.svc-cap {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(245,241,234,0.02);
  transition: border-color 0.3s, background 0.3s;
}
.svc-cap:hover { border-color: var(--copper); background: rgba(232,116,58,0.04); }
.svc-cap__num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--copper);
  margin-bottom: 0.6rem;
}
.svc-cap h4 {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.svc-cap p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--cream-dim);
  margin: 0;
}

/* ── Stack tags ───────────────────────────────────────────── */
.svc-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.svc-stack span {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--cream-dim);
}

/* ── Decision/Quote box ───────────────────────────────────── */
.svc-decision {
  border-left: 3px solid var(--copper);
  padding: 1.5rem 0 1.5rem 2rem;
  margin: 2rem 0;
  background: rgba(232,116,58,0.04);
}
.svc-decision strong {
  color: var(--copper);
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── FAQ accordion ────────────────────────────────────────── */
.svc-faq details {
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
  cursor: pointer;
}
.svc-faq summary {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--cream);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  line-height: 1.3;
}
.svc-faq summary::-webkit-details-marker { display: none; }
.svc-faq summary::after {
  content: '+';
  font-family: var(--mono);
  color: var(--copper);
  font-size: 1.5rem;
  transition: transform 0.3s;
}
.svc-faq details[open] summary::after { transform: rotate(45deg); }
.svc-faq details p {
  margin-top: 1rem;
  color: var(--cream-dim);
  font-size: 1rem;
  line-height: 1.7;
}

/* ── Cross-link cards ─────────────────────────────────────── */
.svc-related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.svc-related a {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--cream);
  transition: all 0.3s;
  display: block;
}
.svc-related a:hover {
  border-color: var(--copper);
  transform: translateY(-2px);
}
.svc-related .meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--copper);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.svc-related h4 {
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.2;
}

/* ── CTA final ────────────────────────────────────────────── */
.svc-cta {
  margin-top: 10vh;
  padding: 6vh 4vw;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.svc-cta h2 {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--cream);
  margin-bottom: 1.5rem;
  line-height: 1.05;
}
.svc-cta h2 .copper { color: var(--copper); }
.svc-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 2.4rem;
  background: var(--copper);
  color: var(--black);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.3s, background 0.3s;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.svc-cta__btn:hover { gap: 1.25rem; background: var(--cream); }

/* ── Footer mini ──────────────────────────────────────────── */
.svc-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--gray-1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.svc-footer a { color: var(--gray-2); text-decoration: none; }
.svc-footer a:hover { color: var(--copper); }
