/* waffles.css
   1. tokens  2. base  3. header  4. hero
   5. sections / cards  6. clients  7. forms
   8. views  9. responsive
*/
:root {
  --bg: #020617;
  --bg-2: #0f172a;
  --green: #22c55e;
  --lime: #84cc16;
  --green-dark: #15803d;
  --amber: #22c55e;
  --cream: #ecfdf5;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --line: rgba(34, 197, 94, 0.16);
  --radius: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Outfit, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}
body.page-tech {
  background:
    linear-gradient(180deg, rgba(2,6,23,.78), rgba(2,6,23,.92)),
    url("../assets/bg/tech.jpg") center/cover fixed;
}
body.page-exp {
  background:
    linear-gradient(180deg, rgba(2,6,23,.62), rgba(2,6,23,.9)),
    url("../assets/bg/games.jpg") center/cover fixed;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.skip {
  position: absolute; left: 12px; top: -40px; z-index: 80;
  background: var(--green); color: #022c16;
  padding: 8px 12px; border-radius: 8px;
}
.skip:focus { top: 12px; }

.wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.display { font-family: Unbounded, Outfit, sans-serif; letter-spacing: -0.04em; line-height: 1.05; }

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 16px;
}
.brand { display: flex; align-items: center; }
.brand img {
  height: 52px; width: auto; max-width: 220px;
  mix-blend-mode: screen;
}
.nav-links { display: flex; align-items: center; gap: 18px; font-size: 0.9rem; color: var(--muted); }
.nav-links a:hover, .nav-links a.on { color: var(--cream); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.25rem; border-radius: 999px; font-weight: 600;
  border: 1px solid transparent; transition: 0.2s ease;
  cursor: pointer; text-align: center;
}
.btn-amber, .btn-green { background: var(--green); color: #022c16; }
.btn-amber:hover, .btn-green:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.28);
}
.btn-ghost {
  background: transparent; color: var(--cream);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.nav-cta { margin-left: 8px; padding: 0.6rem 1.1rem; font-size: 0.88rem; }
.burger { display: none; background: none; border: 0; color: var(--cream); font-size: 1.4rem; }

.hero {
  position: relative; min-height: 100vh;
  display: grid; place-items: center; overflow: hidden;
  padding: 88px 24px 48px;
}
.hero-media { position: absolute; inset: 0; }
.hero-media .pane {
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
}
.hero-split {
  display: grid; grid-template-columns: 1fr 1fr;
  height: 100%; position: relative;
}
.hero-split .pane { min-height: 100%; }
.hero-split::after {
  content: "";
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, #22c55e 20%, #84cc16 50%, #22c55e 80%, transparent);
  box-shadow: 0 0 22px rgba(34, 197, 94, 0.7);
}
.hero-media .veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(2,6,23,.42) 0%, rgba(2,6,23,.78) 58%, rgba(2,6,23,.94) 100%);
}
.card.has-photo { padding: 0 0 28px; overflow: hidden; }
.card.has-photo .card-photo {
  height: 150px; margin-bottom: 18px;
  background-size: cover; background-position: center;
}
.card.has-photo .tag,
.card.has-photo h3,
.card.has-photo p,
.card.has-photo .btn { margin-left: 28px; margin-right: 28px; }

.combo-photos {
  display: grid; grid-template-columns: 1fr 1fr;
  height: 180px; border-radius: 16px; overflow: hidden;
  margin-top: 28px; position: relative;
}
.combo-photos .pane { background-size: cover; background-position: center; }
.combo-photos::after {
  content: "";
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; transform: translateX(-50%);
  background: #22c55e;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.8);
}

.hero .waffle-iso { opacity: 0.14; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(34, 197, 94, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  animation: bake 18s linear infinite;
}
.page-tech .hero-grid {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
}
.page-exp .hero-grid { background-size: 36px 36px; }
@keyframes bake { to { background-position: 48px 48px; } }
.glow {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.2), transparent 65%);
  filter: blur(10px); pointer-events: none;
}

.waffle-stage {
  position: absolute; inset: 0; pointer-events: none;
  perspective: 900px;
}
.waffle-iso {
  position: absolute;
  width: 240px; height: 240px;
  left: 50%; top: 42%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  transform: translate(-50%, -58%) rotateX(58deg) rotateZ(45deg);
  transform-style: preserve-3d;
  animation: iso-float 11s ease-in-out infinite;
  opacity: 0.22;
}
.page-tech .waffle-iso { opacity: 0.12; filter: saturate(0.45); }
.page-exp .waffle-iso { opacity: 0.36; filter: saturate(1.15) drop-shadow(0 0 24px rgba(34, 197, 94, 0.35)); }
.waffle-iso i {
  display: block;
  background: linear-gradient(180deg, #86efac, #22c55e 55%, #15803d);
  border-radius: 7px;
  box-shadow: 0 12px 0 #052e16, 0 18px 28px rgba(0, 0, 0, 0.45);
  animation: cell-bake 1.1s ease both;
}
.waffle-iso i:nth-child(1) { animation-delay: .04s; }
.waffle-iso i:nth-child(2) { animation-delay: .08s; }
.waffle-iso i:nth-child(3) { animation-delay: .12s; }
.waffle-iso i:nth-child(4) { animation-delay: .16s; }
.waffle-iso i:nth-child(5) { animation-delay: .2s; }
.waffle-iso i:nth-child(6) { animation-delay: .24s; }
.waffle-iso i:nth-child(7) { animation-delay: .28s; }
.waffle-iso i:nth-child(8) { animation-delay: .32s; }
.waffle-iso i:nth-child(9) { animation-delay: .36s; }
.waffle-iso i:nth-child(10) { animation-delay: .4s; }
.waffle-iso i:nth-child(11) { animation-delay: .44s; }
.waffle-iso i:nth-child(12) { animation-delay: .48s; }
.waffle-iso i:nth-child(13) { animation-delay: .52s; }
.waffle-iso i:nth-child(14) { animation-delay: .56s; }
.waffle-iso i:nth-child(15) { animation-delay: .6s; }
.waffle-iso i:nth-child(16) { animation-delay: .64s; }
@keyframes iso-float {
  0%, 100% { transform: translate(-50%, -58%) rotateX(58deg) rotateZ(45deg); }
  50% { transform: translate(-50%, -62%) rotateX(54deg) rotateZ(48deg); }
}
@keyframes cell-bake {
  from { opacity: 0; transform: translateZ(-40px) scale(0.4); }
  to { opacity: 1; transform: translateZ(0) scale(1); }
}

.hero-copy { position: relative; text-align: center; z-index: 5; }
.cine {
  position: relative;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #020617;
  scroll-margin-top: 76px;
}
.cine-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.cine-bars::before,
.cine-bars::after {
  content: "";
  position: absolute; left: 0; right: 0;
  height: 2.4vh; z-index: 3; pointer-events: none;
  background: #000;
}
.cine-bars::before { top: 0; }
.cine-bars::after { bottom: 0; }
.cine-caption {
  position: absolute; left: 0; right: 0; top: 80px; bottom: auto;
  z-index: 4; text-align: center; padding: 0 20px;
  pointer-events: none;
}
.cine-caption .display {
  font-size: clamp(0.95rem, 2vw, 1.3rem);
  text-shadow: 0 10px 40px rgba(0,0,0,.8);
}
.cine-caption .lead {
  display: none;
}
.intro-load {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--green); font-size: 0.95rem;
  letter-spacing: 0.08em; z-index: 2;
  pointer-events: none;
}
#logo3d {
  position: absolute; inset: 0;
  width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity 0.8s ease;
  filter: drop-shadow(0 0 28px rgba(34, 197, 94, 0.32));
  pointer-events: none; z-index: 1;
}
#logo3d.is-on { opacity: 1; }
#pacman {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 2; cursor: pointer;
  touch-action: none;
  display: block;
}
.pac-ui {
  position: absolute; left: 0; right: 0; bottom: 2.4vh;
  z-index: 5; display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  pointer-events: none; padding: 0 16px;
}
.pac-hud {
  font-family: Unbounded, sans-serif;
  color: var(--green);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-shadow: 0 4px 18px #000;
  margin: 0;
}
.pac-hint {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 0;
  text-shadow: 0 4px 14px #000;
}
.pac-pad {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center;
  pointer-events: auto;
}
.pac-pad button {
  min-width: 48px; height: 48px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
  color: var(--cream);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
}
.pac-pad button:hover,
.pac-pad button:active {
  border-color: var(--green);
  color: var(--green);
}
.pac-pad .pac-play {
  background: var(--green);
  color: #022c16;
  border-color: var(--green);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pac-pad button.is-muted { opacity: 0.45; }
.intro { padding: 88px 0; }
.hero h1 { margin-bottom: 0.2rem; }
.hero-logo {
  width: min(560px, 88vw);
  height: auto;
  margin: 0 auto 0.4rem;
  mix-blend-mode: screen;
}
.hero .sub {
  font-size: clamp(1.12rem, 2.6vw, 1.55rem);
  color: var(--cream);
  max-width: 22em;
  margin: 0 auto 1rem;
  text-shadow: 0 8px 28px rgba(2,6,23,.85);
}
.hero-lead {
  margin: 0 auto 1.7rem !important;
  text-align: center;
  max-width: 36ch;
  color: var(--cream);
}
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.micro { margin-top: 1rem; color: var(--muted); font-size: 0.88rem; }

section { padding: 88px 0; }
.kicker { color: var(--green); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; margin-bottom: 10px; }
h2 { font-family: Unbounded, sans-serif; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.03em; margin-bottom: 12px; }
.lead { color: var(--muted); max-width: 52ch; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.card {
  background: linear-gradient(180deg, #0f172a, #020617);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: 0.22s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(34, 197, 94, 0.45); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); }
.card h3 { font-family: Unbounded, sans-serif; font-size: 1.15rem; margin: 8px 0 8px; }
.card p { color: var(--muted); font-size: 0.95rem; }
.tech-card { background: #0b1220; }
.exp-card { background: linear-gradient(180deg, #052e16, #020617); }

.tag {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--lime); margin-bottom: 8px;
}

.combo {
  background: linear-gradient(135deg, #052e16, #020617 55%, #0f172a);
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 24px; padding: 36px;
}
.combo h2 { max-width: 22ch; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.step { border-left: 2px solid var(--green); padding-left: 14px; }
.step b { display: block; margin-bottom: 4px; }

.partner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border: 1px solid var(--line); border-radius: 24px; padding: 28px 32px;
  background: #0b1220;
}
.partner img { height: 42px; width: auto; }

.work-card { overflow: hidden; padding: 0; }
.work-card img { width: 100%; height: 220px; object-fit: cover; background: #0b1220; }
.work-card .pad { padding: 22px; }

.cta-band {
  text-align: center; padding: 72px 24px;
  background: radial-gradient(ellipse at top, rgba(34, 197, 94, 0.14), transparent 55%);
}

form { display: grid; gap: 12px; }
.home-form { max-width: 520px; margin: 28px auto 0; text-align: left; }
label { font-size: 0.82rem; color: var(--muted); }
input, select, textarea {
  width: 100%; background: #0b1220; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
}
input:focus, select:focus, textarea:focus { outline: 1px solid var(--green); }
textarea { min-height: 120px; resize: vertical; }

.split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: start; }

footer {
  border-top: 1px solid var(--line); padding: 36px 0 48px;
  color: var(--muted); font-size: 0.88rem;
}
.foot { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot a:hover { color: var(--cream); }

.svc { font-size: 0.92rem; padding: 16px 18px; }

.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.process div { padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: #0b1220; }
.process span { color: var(--green); font-size: 0.75rem; letter-spacing: 0.14em; }

.proof-img {
  border-radius: 20px; border: 1px solid var(--line);
  overflow: hidden; margin-top: 28px;
}
.proof-img img { width: 100%; height: auto; }

.clients-feat {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin: 28px 0 14px;
}
.logo-cell.feat img { max-height: 48px; }
.clients-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.logo-cell {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: 0.2s ease;
}
.logo-cell:hover {
  border-color: #22c55e;
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.07);
}
.logo-cell img {
  max-height: 52px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}
.logo-cell.feat {
  min-height: 108px;
  justify-content: flex-start;
  gap: 16px;
  padding: 18px 22px;
  border-color: rgba(34, 197, 94, 0.45);
}
.logo-cell .invert { filter: brightness(0) invert(1); }

@media (max-width: 980px) {
  .clients-grid { grid-template-columns: repeat(3, 1fr); }
  .clients-feat { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body.page-tech, body.page-exp { background-attachment: scroll; }
  .grid-2, .grid-3, .grid-4, .steps, .process, .split, .clients-feat { grid-template-columns: 1fr; }
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
  .combo-photos { height: 120px; }
  .nav-links {
    display: none; position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; background: #020617; padding: 16px 20px 24px; gap: 14px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .burger { display: block; }
  .partner { flex-direction: column; align-items: flex-start; }
  section { padding: 64px 0; }
  .waffle-iso { width: 160px; height: 160px; opacity: 0.14; }
  .hero { min-height: 100vh; padding-top: 72px; }
  .pac-pad button { min-width: 44px; height: 44px; font-size: 1rem; }
  .cine-caption .display { font-size: 1.15rem; }
  .pac-hint { display: none; }
}

/* views: un solo HTML, una vista visible */
.view { display: none; }
.view.is-on { display: block; }
.hero-page { min-height: 70vh; }
.hero-compact { min-height: auto; padding: 72px 0 24px; }
.hero-copy.left { text-align: left; }

.hero-copy { z-index: 4; }
.vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(2,6,23,.72) 100%);
}
#waffle3d {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}
.hero-split { perspective: 1600px; transform-style: preserve-3d; }
.hero-split .pane:first-child {
  transform: rotateY(14deg) scale(1.08);
  transform-origin: left center;
}
.hero-split .pane:last-child {
  transform: rotateY(-14deg) scale(1.08);
  transform-origin: right center;
}

.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
}

.chapter { position: relative; }
.story-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px;
  align-items: stretch; margin-top: 28px;
}
.story-lead { color: var(--cream); font-size: 1.15rem; max-width: 40ch; margin-bottom: 14px; }
.story-still {
  min-height: 280px; border-radius: 24px;
  background-size: cover; background-position: center;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.obj-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  margin-top: 28px;
}
.obj {
  padding: 22px 18px; border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15,23,42,.9), rgba(2,6,23,.9));
  min-height: 210px;
}
.obj span {
  font-family: Unbounded, sans-serif;
  color: var(--green); font-size: 0.78rem; letter-spacing: 0.16em;
}
.obj h3 { font-family: Unbounded, sans-serif; font-size: 1.02rem; margin: 10px 0 8px; }
.obj p { color: var(--muted); font-size: 0.9rem; }

.need-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-top: 28px;
}
.need-card {
  padding: 24px 20px; border-radius: 20px; min-height: 200px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(2,6,23,.92));
}
.need-card span {
  font-family: Unbounded, sans-serif; color: var(--green);
  font-size: 0.75rem; letter-spacing: 0.16em;
}
.need-card b {
  display: block; font-family: Unbounded, sans-serif;
  font-size: 1.25rem; margin: 12px 0 8px;
}
.need-card p { color: var(--muted); font-size: 0.92rem; }
.team-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
  margin-top: 28px;
}
.team-card img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 20px; border: 1px solid var(--line);
  background: #0b1220;
}
.team-card h3 {
  font-family: Unbounded, sans-serif; font-size: 0.95rem;
  margin-top: 10px; text-align: center;
}
.lang { display: flex; gap: 4px; margin-left: 6px; }
.lang button {
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); border-radius: 999px;
  padding: 0.35rem 0.65rem; font-size: 0.72rem;
  cursor: pointer; font-weight: 700;
}
.lang button.on {
  background: var(--green); color: #022c16; border-color: var(--green);
}

.reveal { opacity: 0; transform: translateY(24px); transition: 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
[data-tilt] { transform-style: preserve-3d; transition: transform 0.18s ease; }

@media (max-width: 980px) {
  .obj-grid { grid-template-columns: 1fr 1fr; }
  .story-grid { grid-template-columns: 1fr; }
  .need-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .obj-grid, .need-grid { grid-template-columns: 1fr; }
  .hero-split .pane:first-child,
  .hero-split .pane:last-child { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-split .pane:first-child,
  .hero-split .pane:last-child { transform: none; }
}
