:root {
  /* Brand tokens come from assets/brand/css/powerbox.css (dark theme forced on <html>). */
  --bg: var(--pb-surface);
  --surface: var(--pb-surface-raised);
  --line: var(--pb-line);
  --text: var(--pb-ink);
  --muted: var(--pb-ink-muted);
  --accent: var(--pb-brand);
  --sans: var(--pb-font-sans);
  --mono: var(--pb-font-mono);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(16px, 4vw, 48px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
.hl { color: var(--pb-brand); }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Background field */
#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  background: linear-gradient(to bottom, rgba(17, 19, 22, .9), rgba(17, 19, 22, 0));
}
.brand { display: flex; align-items: center; padding: 4px 0; }
.brand img { height: 40px; width: auto; display: block; }
.nav nav { display: flex; gap: 6px; align-items: center; }
.nav nav a { padding: 8px 14px; border-radius: var(--pb-radius-md); color: var(--muted); font-size: 14px; transition: color .2s; }
.nav nav a:hover { color: var(--text); }
.nav .nav-cta { color: var(--text); border: 1px solid var(--line); }
.nav .nav-cta { background: var(--pb-brand); color: var(--pb-on-brand); border-color: transparent; font-weight: 600; }
.nav .nav-cta:hover { background: var(--pb-brand-hover); color: var(--pb-on-brand); }
@media (max-width: 560px) { .nav nav a:not(.nav-cta) { display: none; } }

main, .foot { position: relative; z-index: 1; }

/* Hero */
.hero {
  min-height: 100svh; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center;
  gap: clamp(24px, 4vw, 64px); padding: 96px var(--gutter) 40px; max-width: 1480px; margin: 0 auto;
}
.hero-demos { min-width: 0; }
.hero .arena { margin: 0; max-width: none; height: min(76svh, 740px); min-height: 480px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 88px; gap: 28px; }
  .hero .hero-sub { margin: 18px 0 22px; }
  .hero .arena { height: min(62svh, 520px); min-height: 400px; }
}
.eyebrow {
  font: 600 13px/16px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--pb-brand);
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 28px;
}
@keyframes pulse { 50% { opacity: .35; } }
.hero-copy { container-type: inline-size; min-width: 0; }
/* Two fixed, equal-length lines ("Webs y apps" / "que venden."), sized to the text column so neither wraps nor clips. */
.hero-title { font-size: min(112px, 17cqi); line-height: 1; letter-spacing: -.03em; font-weight: 600; margin: 0; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; transform: translateY(110%); animation: rise 1.1s var(--ease) forwards; }
.hero-title .line:nth-child(2) > span { animation-delay: .12s; }
@keyframes rise { to { transform: none; } }
.hero-sub { max-width: 520px; color: var(--muted); font-size: clamp(16px, 1.3vw, 19px); margin: 28px 0 34px; opacity: 0; animation: fade 1s .5s var(--ease) forwards; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; opacity: 0; animation: fade 1s .65s var(--ease) forwards; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: var(--pb-radius-md);
  font-weight: 600; font-size: 16px; transition: transform .3s var(--ease), background-color .2s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn-light { background: var(--pb-brand); color: var(--pb-on-brand); }
.btn-light:hover { background: var(--pb-brand-hover); color: var(--pb-on-brand); }
.btn-ghost { border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--pb-ink-muted); background: var(--pb-surface-raised); }
@keyframes wheel { 60% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }

/* Sections */
.section-head { max-width: 1480px; margin: 0 auto; padding: 0 var(--gutter); }
h2 { font-size: clamp(30px, 3.8vw, 52px); line-height: 1.1; letter-spacing: -.025em; font-weight: 600; margin: 0 0 16px; }

/* Physics arena */
.arena {
  position: relative; margin: 48px auto 0; max-width: 1480px; height: clamp(560px, 78vh, 760px);
  margin-inline: var(--gutter); border: 1px solid var(--line); border-radius: var(--pb-radius-lg); overflow: hidden;
  background: rgba(26, 29, 34, .6);
  backdrop-filter: blur(2px); touch-action: pan-y;
}
@media (min-width: 1576px) { .arena { margin-inline: auto; } }
/* Touch: vertical swipes over a card scroll the page, sideways swipes throw it. */
@media (pointer: coarse) { .arena .card { touch-action: pan-y; } .arena { height: min(560px, 66svh); } }
.arena-mark { position: absolute; left: 50%; top: 50%; width: min(38%, 300px); transform: translate(-50%, -46%); opacity: .045; pointer-events: none; user-select: none; }
.cards { list-style: none; margin: 0; padding: 0; }
.card {
  position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch);
  transform: translate3d(-999px, -999px, 0); will-change: transform; touch-action: none;
}
.card button {
  all: unset; box-sizing: border-box; display: flex; flex-direction: column; width: 100%; height: 100%;
  border-radius: var(--pb-radius-lg); overflow: hidden; cursor: pointer; position: relative; isolation: isolate;
  background: var(--c-bg); color: var(--c-fg); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: box-shadow .3s, scale .35s var(--ease);
}
.card button:hover { scale: 1.03; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .2); }
.card button:active { cursor: grabbing; }
.card button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.card-media { flex: 1; position: relative; overflow: hidden; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: transform .8s var(--ease); }
.card button:hover .card-media img { transform: scale(1.06); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--c-bg), transparent 55%); }
.card-body { padding: 16px 18px 18px; position: relative; }
.card-tag { font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.card-name { display: block; font: var(--c-font); margin: 8px 0 4px; }
.arena.small .card-name { font-size: 19px; }
.arena.small .card-desc { display: none; }
.card-desc { font-size: 12.5px; line-height: 1.4; opacity: .72; }
.card-desc { display: block; }
.card-cta { display: flex; width: fit-content; align-items: center; gap: 6px; margin-top: 12px; padding: 7px 12px; border-radius: 8px; background: var(--c-fg); color: var(--c-bg); font: 600 13px/1 var(--sans); letter-spacing: 0; transition: gap .2s; }
.card-cta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.card button:hover .card-cta { gap: 10px; }
.arena.small .card-cta { margin-top: 8px; padding: 6px 10px; font-size: 12px; }

/* Static fallback (reduced motion / no physics) */
.arena.static { height: auto; padding: 32px; }
.arena.static .cards { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; position: relative; z-index: 1; }
.arena.static .card { position: relative; transform: none !important; }

/* Services */

/* Contact */
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 32px var(--gutter); border-top: 1px solid var(--line); font-size: 14px; }

/* Viewer */
.viewer {
  position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; background: var(--pb-surface);
  clip-path: inset(var(--ct, 50%) var(--cr, 50%) var(--cb, 50%) var(--cl, 50%) round 22px);
  transition: clip-path .7s var(--ease);
}
.viewer.open { clip-path: inset(0 0 0 0 round 0); }
.viewer[hidden] { display: none; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.viewer-id { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; white-space: nowrap; }
.viewer-id .muted { overflow: hidden; text-overflow: ellipsis; }
.viewer-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--vc, var(--accent)); flex: none; }
.seg { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--pb-radius-md); }
.seg button { all: unset; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 9px; font-size: 13px; color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--pb-brand); color: var(--pb-on-brand); }
.seg button:focus-visible { outline: 2px solid var(--accent); }
.seg svg, .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.viewer-actions { display: flex; gap: 6px; }
.icon-btn { all: unset; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--pb-radius-md); cursor: pointer; color: var(--text); transition: background-color .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); }
@media (max-width: 640px) {
  .seg, .viewer-id .muted { display: none; }
  .seg button { padding: 0 12px; }
}
.viewer-stage { flex: 1; display: grid; place-items: center; overflow: hidden; position: relative; }
.frame-wrap { position: relative; width: 100%; height: 100%; transition: width .6s var(--ease), height .6s var(--ease), border-radius .6s var(--ease); overflow: hidden; background: #000; }
.viewer.mobile .frame-wrap { width: min(390px, calc(100% - 24px)); height: min(844px, calc(100% - 32px)); border-radius: 44px; box-shadow: 0 0 0 10px #1a1a20, 0 0 0 11px #2c2c35, 0 50px 120px rgba(0, 0, 0, .8); }
.frame-wrap iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; opacity: 0; transition: opacity .5s; }
.frame-wrap.ready iframe { opacity: 1; }
.loader { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; font: 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.loader span { width: 28px; height: 28px; border: 2px solid var(--line); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; }
.frame-wrap.ready .loader { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
body.locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

.foot-id { display: inline-flex; align-items: center; gap: 10px; }
.foot-id img { width: 22px; height: auto; }

/* Hero details */
.facts { opacity: 0; animation: fade 1s .8s var(--ease) forwards; list-style: none; margin: 36px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 14px; color: var(--muted); }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 5px; height: 12px; background: var(--pb-brand); transform: skewX(-17deg); flex: none; }
.demos-label { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; font-size: 17px; font-weight: 600; color: var(--text); }
.demos-label span { font-size: 14px; font-weight: 400; color: var(--muted); }
.hint { position: absolute; left: 0; top: 0; z-index: 6; padding: 8px 12px; border-radius: 8px; background: var(--pb-brand); color: var(--pb-on-brand); font: 600 14px/1 var(--sans); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .3s; }
.hint::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--pb-brand); }
.hint.show { opacity: 1; animation: hint-bob 1.6s ease-in-out infinite; }
@keyframes hint-bob { 50% { margin-top: -5px; } }

/* Services: rows tied to a live example */
.services { padding: clamp(80px, 12vh, 140px) 0; }
.serv-rows { list-style: none; max-width: 1480px; margin: 40px auto 0; padding: 0 var(--gutter); }
.serv-rows li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) 200px; gap: 16px 40px; align-items: center; padding: 26px 0; border-top: 1px solid var(--line); }
.serv-rows li:last-child { border-bottom: 1px solid var(--line); }
.serv-rows h3 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.serv-rows p { margin: 0; color: var(--muted); font-size: 15px; max-width: 56ch; }
.see { all: unset; box-sizing: border-box; cursor: pointer; justify-self: end; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--pb-radius-md); font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; transition: border-color .15s, background-color .15s; }
.see:hover { border-color: var(--pb-brand); background: var(--pb-surface-raised); color: var(--text); }
.see:focus-visible { outline: 2px solid var(--pb-brand); outline-offset: 3px; }
@media (max-width: 820px) {
  .serv-rows li { grid-template-columns: 1fr; gap: 8px; }
  .see { justify-self: start; margin-top: 6px; }
}

/* Process */
.process { padding: 0 0 clamp(80px, 12vh, 140px); }
.steps { list-style: none; max-width: 1480px; margin: 40px auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.steps li { background: var(--pb-surface-raised); border: 1px solid var(--line); border-radius: var(--pb-radius-md); padding: 24px; }
.step-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--pb-radius-sm); background: var(--pb-brand-tint); color: var(--pb-brand); font: 600 15px var(--mono); }
.steps h3 { font-size: 19px; font-weight: 600; margin: 20px 0 8px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }

/* Contact */
.contact { max-width: 1480px; margin: 0 auto 64px; padding: 40px; margin-inline: var(--gutter); display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--pb-radius-lg); background: var(--pb-surface-raised); }
@media (min-width: 1576px) { .contact { margin-inline: auto; } }
.contact h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 0 0 8px; }
.contact p { margin: 0; max-width: 46ch; }
.contact-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.text-link { color: var(--text); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.text-link:hover { color: var(--pb-brand); text-decoration-color: currentColor; }
@media (max-width: 600px) { .contact { padding: 24px; } }
@media (max-width: 900px) { .facts { display: none; } }

/* Titles never end on a lone word: phrases stay together, lines are balanced. */
.nw { white-space: nowrap; }
.hero-title .line > span:not(.nw), h2 { text-wrap: balance; }

/* Domain, hosting, SEO, CRM */
.care { padding: 0 0 clamp(80px, 12vh, 140px); }
.section-sub { color: var(--muted); max-width: 56ch; margin: 0; font-size: 17px; }
.care-grid { list-style: none; max-width: 1480px; margin: 40px auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.care-grid li { position: relative; background: var(--pb-surface-raised); border: 1px solid var(--line); border-radius: var(--pb-radius-md); padding: 24px; }
.care-grid li.care-plan { border-color: var(--pb-brand); }
.care-grid svg { width: 28px; height: 28px; fill: none; stroke: var(--pb-brand); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.care-grid h3 { font-size: 19px; font-weight: 600; margin: 18px 0 8px; }
.care-grid p { margin: 0; color: var(--muted); font-size: 15px; }
.badge { position: absolute; top: 20px; right: 20px; padding: 4px 8px; border-radius: var(--pb-radius-sm); background: var(--pb-brand-tint); color: var(--pb-brand); font: 600 12px/1.3 var(--sans); }
.care-cta { max-width: 1480px; margin: 20px auto 0; padding: 0 var(--gutter); }
@media (max-width: 1100px) { .care-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .care-grid { grid-template-columns: 1fr; } }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; padding: 10px 14px; border-radius: var(--pb-radius-md); background: var(--pb-brand); color: var(--pb-on-brand); font-weight: 600; transition: top .2s; }
.skip:focus { top: 12px; }
.nav { transition: background-color .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(17, 19, 22, .88); backdrop-filter: blur(14px); border-bottom-color: var(--line); }

/* Cookie consent */
.consent { position: fixed; z-index: 150; left: 16px; bottom: 16px; width: min(400px, calc(100% - 32px)); padding: 20px; border-radius: var(--pb-radius-lg); background: var(--pb-surface-raised); border: 1px solid var(--line); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7); opacity: 0; transform: translateY(16px); transition: opacity .3s, transform .4s var(--ease); }
.consent.show { opacity: 1; transform: none; }
.consent-title { margin: 0 0 6px; font-weight: 600; font-size: 17px; }
.consent p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.consent .consent-title { color: var(--text); }
.consent a { color: var(--pb-brand); }
.consent-actions { display: flex; gap: 10px; margin-top: 16px; }
.consent-actions .btn { flex: 1; justify-content: center; min-height: 44px; font-size: 15px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.link-btn { all: unset; cursor: pointer; color: var(--muted); }
.link-btn:hover, .foot-links a:hover { color: var(--text); }
.link-btn:focus-visible { outline: 2px solid var(--pb-brand); outline-offset: 3px; border-radius: 4px; }
