/* ============================================================
   ECM Marketing — Sistema de diseño OSCURO / cinematográfico
   Conserva la paleta de marca ECM (naranja #FF5B26 + acentos)
   ============================================================ */
:root {
  /* Base oscura cálida (no negro frío) */
  --bg:        #100D0C;   /* fondo base, carbón cálido */
  --bg-2:      #161210;   /* secciones alternas */
  --surface:   #1B1714;   /* tarjetas */
  --surface-2: #221D19;   /* tarjetas elevadas / hover */
  --paper:     #F7F2EA;   /* texto claro principal */

  /* Texto */
  --ink:    #F7F2EA;      /* títulos / texto fuerte sobre oscuro */
  --ink-2:  #CFC4B6;      /* texto cuerpo */
  --muted:  #8A7F72;      /* texto tenue */
  --faint:  #5A5149;      /* muy tenue / sellos */

  /* Líneas */
  --line:   rgba(247, 242, 234, 0.10);
  --line-2: rgba(247, 242, 234, 0.18);

  /* Acentos de marca ECM */
  --accent:      #FF5B26;  /* naranja firma */
  --accent-deep: #E8420F;
  --accent-soft: #FF7A4D;
  --lime: #C5F45A;         /* verde lima */
  --sky:  #B7DCE9;         /* celeste */
  --rose: #F4D5C7;         /* salmón */

  /* Glows */
  --glow-accent: 0 0 0 1px rgba(255,91,38,.45), 0 0 30px -4px rgba(255,91,38,.55);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  --radius:    14px;
  --radius-lg: 24px;
  --radius-xl: 36px;
  --maxw: 1320px;

  /* Multiplicador de animación (controlado por Tweaks) */
  --anim: 1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.no-anim { --anim: 0 !important; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--accent); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #34291f; border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-deep); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) { .container { padding: 0 22px; } }

.section { padding: 120px 0; position: relative; }
@media (max-width: 720px) { .section { padding: 72px 0; } }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.98;
  color: var(--ink);
}
h1 { font-size: clamp(54px, 9vw, 132px); }
h2 { font-size: clamp(38px, 6vw, 82px); }
h3 { font-size: clamp(28px, 3.6vw, 46px); }
h4 { font-size: clamp(21px, 2.4vw, 30px); }
p { color: var(--ink-2); }
.lead { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; max-width: 56ch; color: var(--ink-2); }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }

/* Itálica de acento (firma editorial de ECM) */
.italic { font-style: italic; color: var(--accent); }
/* Texto contorneado para títulos cinematográficos */
.outline {
  color: transparent;
  -webkit-text-stroke: 1.4px var(--ink);
  text-stroke: 1.4px var(--ink);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); opacity: .7; }
.eyebrow.center { justify-content: center; }

.grad-text {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-soft) 40%, var(--lime) 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  border-radius: 999px;
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line-2);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background .25s, box-shadow .25s, border-color .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translate(4px, -4px); }

.btn-primary {
  background: var(--accent); color: #fff; border-color: transparent;
  box-shadow: 0 8px 30px -8px rgba(255,91,38,.6);
}
.btn-primary:hover { background: var(--accent-deep); box-shadow: 0 14px 44px -8px rgba(255,91,38,.8); }

.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { background: var(--paper); color: var(--bg); border-color: var(--paper); }

.btn-lg { padding: 19px 34px; font-size: 16px; }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2);
  backdrop-filter: blur(6px);
}
.pill .dotmini { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.pill.glass { background: rgba(247,242,234,.06); }
.pill.lime { background: var(--lime); color: #1a2008; border-color: transparent; }
.pill.accent { background: var(--accent); color: #fff; border-color: transparent; }
.pill.dark { background: rgba(0,0,0,.35); color: var(--paper); border-color: var(--line); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .35s, background .35s;
}
.card:hover { transform: translateY(-6px); border-color: var(--line-2); background: var(--surface-2); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(16,13,12,.72);
  backdrop-filter: blur(16px) saturate(1.3);
  border-color: var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 40px; max-width: var(--maxw); margin: 0 auto;
  gap: 16px;
}
@media (max-width: 720px) { .nav { padding: 16px 22px; } }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--serif); font-size: 23px; color: var(--ink); letter-spacing: -0.01em; white-space: nowrap; flex-shrink: 0; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: var(--accent); position: relative;
  box-shadow: 0 0 22px -2px rgba(255,91,38,.7);
  display: grid; place-items: center;
}
.brand .mark::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: #fff; }
.brand b { font-weight: 400; }
.brand .corp { color: var(--accent); }

.nav-links { display: flex; gap: 34px; list-style: none; font-size: 14.5px; }
.nav-links a { position: relative; color: var(--ink-2); transition: color .2s; padding: 4px 0; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after,
.nav-links a:hover::after {
  content: ""; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.nav-links a:not(.active):hover::after { opacity: .5; }

.nav-cta { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.nav-cta .btn { padding: 11px 22px; font-size: 14px; }

/* Selector de idioma */
.lang-switch {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden;
  font-family: var(--mono); font-size: 12px;
  flex-shrink: 0;
}
.lang-switch button {
  padding: 7px 12px; color: var(--muted); transition: color .2s, background .2s; letter-spacing: .04em;
}
.lang-switch button.on { background: var(--accent); color: #fff; }

.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); place-items: center; color: var(--ink); flex-shrink: 0; }
@media (max-width: 960px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .menu-toggle { display: grid; }
}
/* Mobile portrait: tighten spacing and ensure all nav items fit */
@media (max-width: 480px) {
  .nav { padding: 14px 16px; gap: 12px; }
  .brand { font-size: 20px; gap: 8px; }
  .brand .mark { width: 26px; height: 26px; border-radius: 7px; }
  .brand .mark::before { width: 9px; height: 9px; }
  .nav-cta { gap: 10px; }
  .nav-cta .btn-primary { display: none; }
  .lang-switch button { padding: 6px 10px; font-size: 11px; }
  .menu-toggle { width: 40px; height: 40px; }
}
/* Mid-size mobile (e.g. landscape phone / small tablet without nav-links) */
@media (min-width: 481px) and (max-width: 960px) {
  .nav { gap: 16px; }
  .nav-cta .btn { padding: 10px 18px; font-size: 13px; }
}

.mobile-menu {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: none; flex-direction: column; padding: 24px;
}
.mobile-menu.open { display: flex; }
.mobile-menu .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 48px; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu nav a { font-family: var(--serif); font-size: 38px; color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--line); }
.mobile-menu .foot { margin-top: auto; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Footer ---------- */
.site-footer { background: #0A0807; color: var(--paper); padding: 100px 0 36px; position: relative; overflow: hidden; }
.footer-cta h2 { color: var(--ink); font-size: clamp(46px, 8vw, 124px); line-height: .92; margin-bottom: 40px; }
.footer-cta h2 .italic { color: var(--accent); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-top: 56px; border-top: 1px solid var(--line); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h5 { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 11px; font-size: 14px; }
.site-footer ul a { color: rgba(247,242,234,.7); transition: color .2s; }
.site-footer ul a:hover { color: var(--accent); }
.site-footer .meta { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; gap: 16px; }

/* ---------- Reveal / animaciones de scroll ---------- */
.reveal { opacity: 0; transform: translateY(calc(34px * var(--anim))); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
.reveal[data-d="5"] { transition-delay: .40s; }

/* Variantes de reveal */
.reveal.from-left  { transform: translateX(calc(-50px * var(--anim))); }
.reveal.from-right { transform: translateX(calc(50px * var(--anim))); }
.reveal.from-left.in, .reveal.from-right.in { transform: none; }
.reveal.scale-in { transform: scale(calc(1 - .06 * var(--anim))); }
.reveal.scale-in.in { transform: none; }

/* Texto que sube por líneas */
.line-mask { overflow: hidden; display: block; }
.line-mask > span { display: block; transform: translateY(105%); transition: transform 1s cubic-bezier(.16,1,.3,1); }
.reveal.in .line-mask > span,
.line-up.in > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .2s !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); padding: 30px 0; }
.marquee-track { display: flex; gap: 60px; white-space: nowrap; font-family: var(--serif); font-size: clamp(26px, 4vw, 50px); color: var(--ink); width: max-content; animation: scrollx calc(38s / var(--anim, 1)) linear infinite; }
.marquee.rev .marquee-track { animation-direction: reverse; }
.marquee-track span { display: inline-flex; align-items: center; gap: 60px; }
.marquee-track span::after { content: "✦"; color: var(--accent); font-size: .55em; }
@keyframes scrollx { to { transform: translateX(-50%); } }
body.no-anim .marquee-track { animation: none; }

/* ---------- Glow / fondo cinematográfico ---------- */
.bg-canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; z-index: 0; }
.glow.accent { background: radial-gradient(circle, rgba(255,91,38,.7), transparent 70%); }
.glow.sky { background: radial-gradient(circle, rgba(183,220,233,.5), transparent 70%); }
.glow.lime { background: radial-gradient(circle, rgba(197,244,90,.4), transparent 70%); }

.noise::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 16px 18px; font-family: var(--sans); font-size: 15px;
  background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 12px;
  color: var(--ink); transition: border-color .2s, background .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }
.field textarea { resize: vertical; min-height: 120px; }
.field select option { background: var(--surface); color: var(--ink); }
.field .err { display: none; font-size: 12px; color: var(--accent-soft); }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid textarea { border-color: var(--accent); }

/* ---------- Image slot placeholder styling ---------- */
.img-ph {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,91,38,.18), transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(183,220,233,.14), transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
}
.img-ph .ph-label {
  position: absolute; inset: 0; display: grid; place-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  text-align: center; padding: 20px;
}

/* Page hero (subpáginas) */
.page-hero { padding: 180px 0 70px; position: relative; overflow: hidden; }
.page-hero .crumb { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 26px; letter-spacing: .08em; }
.page-hero .crumb a { color: var(--accent); }

/* Utilidades */
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.relative { position: relative; z-index: 2; }
.divider { height: 1px; background: var(--line); border: none; }
