/* Shared prototype helpers: entrance animations, hand-drawn strokes, Elementor overlay */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.js [data-reveal="left"] { transform: translateX(-40px); }
.js [data-reveal="right"] { transform: translateX(40px); }
.js [data-reveal="zoom"] { transform: scale(.92); }
.js [data-reveal].in { opacity: 1; transform: none; }
[data-delay="1"] { transition-delay: .12s !important; }
[data-delay="2"] { transition-delay: .24s !important; }
[data-delay="3"] { transition-delay: .36s !important; }
[data-delay="4"] { transition-delay: .48s !important; }

/* Hand-drawn SVG strokes: paths use pathLength="1" */
.draw path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s cubic-bezier(.6,.1,.2,1) .3s; }
.draw.in path { stroke-dashoffset: 0; }
.draw path + path { transition-delay: .9s; }

[data-parallax], [data-scroll-fade] { will-change: transform; }

/* Elementor overlay */
.el-toggle {
  position: fixed; left: 16px; bottom: 16px; z-index: 9999;
  font: 600 13px/1 system-ui, sans-serif; color: #fff; background: #92003B;
  border: 0; border-radius: 999px; padding: 11px 16px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(146,0,59,.35);
}
.el-toggle:focus-visible { outline: 3px solid #FF7522; outline-offset: 3px; }
.show-el [data-el] { outline: 2px dashed #D5006D; outline-offset: -2px; }
.show-el [data-el].el-rel { position: relative; }
.show-el [data-el]::before {
  content: attr(data-el); position: absolute; top: 6px; left: 6px; z-index: 50;
  font: 600 11px/1.3 system-ui, sans-serif; color: #fff; background: #D5006D;
  padding: 4px 7px; border-radius: 4px; max-width: 90%; pointer-events: none;
  transform: none !important; opacity: 1 !important; letter-spacing: 0; text-transform: none; font-style: normal;
}

/* Rotating words (mimics Animated Headline › Rotating) */
.rg-rotate { display: inline-block; }
.rg-rotate .rg-ch { display: inline-block; white-space: pre; }
.rg-rotate.rg-out .rg-ch { animation: rg-flip-out .45s ease-in both; animation-delay: calc(var(--i) * 28ms); }
.rg-rotate.rg-enter .rg-ch { animation: rg-flip-in .6s cubic-bezier(.2,1.5,.4,1) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes rg-flip-out { to { opacity: 0; transform: translateY(.5em) rotateX(80deg); } }
@keyframes rg-flip-in { from { opacity: 0; transform: translateY(-.6em) rotateX(-80deg); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .draw path { stroke-dashoffset: 0; }
}

/* Nav Menu dropdown (Elementor Pro: Nav Menu › submenu, or Mega Menu) */
.menu { align-items: center; }
.menu .has-sub { position: relative; }
.menu .has-sub > a { display: inline-flex; align-items: center; gap: 6px; }
.menu .has-sub > a::before { content: ""; order: 2; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .25s; }
.menu .has-sub:hover > a::before, .menu .has-sub:focus-within > a::before { transform: translateY(1px) rotate(-135deg); }
.menu .sub-menu {
  position: absolute; top: 100%; left: -18px; min-width: 190px; margin: 0; padding: 10px; list-style: none;
  background: #fff; border-radius: 14px; box-shadow: 0 18px 40px rgba(16, 36, 84, .18);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s; z-index: 120;
}
.menu .sub-menu::before { content: ""; position: absolute; inset: -14px 0 auto; height: 14px; }
.menu .has-sub:hover > .sub-menu, .menu .has-sub:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.menu .sub-menu a { display: block; padding: 10px 14px; border-radius: 9px; color: #13306B !important; opacity: 1 !important; font-weight: 600; white-space: nowrap; }
.menu .sub-menu a::after { display: none; }
.menu .sub-menu a:hover { background: #F1F5FC; }
@media (max-width: 1240px) { .menu { gap: 20px !important; font-size: 14.5px !important; } }
/* Mobile: submenu always open, indented */
.mobile-nav ul ul { list-style: none; padding: 4px 0 4px 22px; display: grid; gap: 4px; }
.mobile-nav li a { font-size: clamp(24px, 7vw, 32px) !important; }
.mobile-nav ul ul a { font-size: clamp(18px, 5vw, 22px) !important; opacity: .8; font-weight: 600 !important; }
.mobile-nav ul ul a::before { content: "– "; }
.mobile-nav { overflow-y: auto; }

/* Content-origin overlay (what is real vs. prototype) */
.og-toggle {
  position: fixed; left: 16px; bottom: 64px; z-index: 9999;
  font: 600 13px/1 system-ui, sans-serif; color: #fff; background: #1F5130;
  border: 0; border-radius: 999px; padding: 11px 16px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(31,81,48,.35);
}
.og-toggle:focus-visible { outline: 3px solid #FF7522; outline-offset: 3px; }
.og-legend {
  position: fixed; left: 16px; bottom: 112px; z-index: 9999; display: grid; gap: 6px;
  background: #fff; color: #1d2433; border-radius: 14px; padding: 12px 14px; min-width: 210px;
  font: 500 13px/1.3 system-ui, sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.og-legend[hidden] { display: none; }
.og-key { display: flex; justify-content: space-between; gap: 12px; padding: 4px 8px; border-radius: 6px; color: #fff; }
.og-key em { font-style: normal; font-weight: 800; }
.og-badge { display: none; }
.show-og .og-rel { position: relative; }
.show-og .og-badge {
  display: block; position: absolute; top: -9px; left: 8px; z-index: 60; pointer-events: none; white-space: nowrap;
  font: 800 10px/1.2 system-ui, sans-serif; color: #fff; padding: 3px 6px; border-radius: 4px;
  max-width: none; letter-spacing: 0; text-transform: none; font-style: normal; transform: none; opacity: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.show-og .og-badge.og-media { top: auto; bottom: 8px; left: 8px; font-size: 11px; }
.og-legend small { color: #4a5568; font-size: 11.5px; max-width: 210px; }
.og-cliente { background: #1E7A3C; }
.og-maqueta { background: #8A4B00; }
.og-ia { background: #B3261E; }
.og-pendiente { background: #4B5563; }
.show-og .og-mark-cliente { outline: 3px solid #1E7A3C; outline-offset: -3px; }
.show-og .og-mark-maqueta { outline: 3px dashed #B76500; outline-offset: -3px; }
.show-og .og-mark-ia { outline: 3px dotted #B3261E; outline-offset: -3px; }
.show-og .og-mark-pendiente { outline: 3px dashed #4B5563; outline-offset: -3px; }

/* Prototype only: switch between video hero and image hero */
.hero-switch { position: fixed; right: 16px; bottom: 16px; z-index: 9999; display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; background: #002A40; box-shadow: 0 8px 24px rgba(0,42,64,.35); font: 600 13px/1 system-ui, sans-serif; color: #fff; }
.hero-switch span { padding: 0 8px 0 10px; opacity: .85; }
.hero-switch button { border: 0; border-radius: 999px; padding: 9px 14px; font: inherit; color: #fff; background: transparent; cursor: pointer; }
.hero-switch button[aria-pressed="true"] { background: #FF7522; color: #002A40; }
.hero-switch button:focus-visible { outline: 3px solid #FF7522; outline-offset: 2px; }

/* Prototype only: choose the lema illustration */
.lema-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 auto 18px; padding: 6px; max-width: max-content; border-radius: 999px; background: #002A40; font: 600 13px/1 system-ui, sans-serif; }
.lema-picker span { color: #fff; opacity: .85; padding: 9px 6px 9px 12px; }
.lema-picker button { border: 0; border-radius: 999px; padding: 9px 14px; font: inherit; color: #fff; background: transparent; cursor: pointer; }
.lema-picker button[aria-pressed="true"] { background: #FF7522; color: #002A40; }
.lema-picker button:focus-visible { outline: 3px solid #FF7522; outline-offset: 2px; }
@media (max-width: 760px) { .lema-picker { border-radius: 18px; margin-inline: 16px; } }
