/* INNERA TECH · Executive presentation. Same brand as inneralife.com:
   black + restrained lilac, IBM Plex Sans, discreet radii. No animation libraries. */
:root {
  --bg: #06050a;
  --bg-2: #0d0b14;
  --fg: #ece8f7;
  --muted: #a39cbd;
  --line: rgba(196, 181, 253, 0.18);
  --lilac: #b79cff;
  --lilac-soft: #d9ccff;
  --violet: #7c4dff;
  --glass: rgba(14, 11, 26, 0.6);
  --paper: #f3f1f8;
  --ink: #14121c;
  --ink-muted: #5b5670;
  --ink-line: #dcd8ea;
  --accent-ink: #5a3fcf;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  --e-io: cubic-bezier(0.7, 0, 0.2, 1);
  --hdr: 68px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.022em; text-wrap: balance; }
ol, ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--lilac-soft); outline-offset: 3px; }

/* Bilingual spans */
html[data-lang="es"] .l-en,
html[data-lang="en"] .l-es { display: none !important; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 200; background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 6px; }

/* ---------- Type ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--lilac);
}
.eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; flex: none; }
.h1 { font-size: clamp(40px, 6.4vw, 88px); line-height: 1.03; }
.h2 { font-size: clamp(32px, 4.4vw, 60px); line-height: 1.07; }
.h2.sm { font-size: clamp(28px, 3.2vw, 44px); }
.h3 { font-size: 24px; line-height: 1.2; }
em { font-style: normal; color: var(--lilac-soft); }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 54ch; }
.muted { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.head { display: flex; flex-direction: column; gap: 18px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; cursor: pointer;
  font: 500 14px/1 var(--font); letter-spacing: 0.01em; text-decoration: none;
  padding: 14px 22px; border-radius: 6px;
  border: 1px solid var(--fg); background: var(--fg); color: #0a0613;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn:hover { background: #fff; border-color: #fff; }
.btn.sm { padding: 10px 16px; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { background: rgba(236, 232, 247, .06); border-color: rgba(236, 232, 247, .5); }
.btn.dark { background: #0a0613; border-color: #0a0613; color: var(--fg); }
.btn.dark:hover { background: #1a1428; border-color: #1a1428; }
.btn.ghost-dark { background: transparent; border-color: rgba(10, 6, 19, .35); color: #0a0613; }
.btn.ghost-dark:hover { border-color: #0a0613; }

/* ---------- Header ---------- */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--hdr);
  padding-top: env(safe-area-inset-top, 0px);
  transition: transform .45s var(--e-out), background-color .3s, color .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.hdr.is-hidden { transform: translateY(-100%); }
.hdr[data-tone="dark"] { background: rgba(6, 5, 10, .72); border-color: var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.hdr[data-tone="light"] { background: rgba(243, 241, 248, .86); color: var(--ink); border-color: var(--ink-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.hdr[data-tone="accent"] { background: transparent; color: #0a0613; }
.hdr-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; font-size: 14px; letter-spacing: .2em; }
.brand img { width: 44px; height: auto; }
.nav { display: flex; gap: 28px; font-size: 14px; }
.nav a { text-decoration: none; opacity: .7; transition: opacity .2s; }
.nav a:hover { opacity: 1; }
.hdr-actions { display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; border: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 25%, transparent); border-radius: 6px; padding: 2px; }
.lang button { background: none; border: 0; color: inherit; opacity: .6; font: 500 12px/1 var(--font); letter-spacing: .08em; padding: 6px 9px; border-radius: 4px; cursor: pointer; }
.lang button[aria-pressed="true"] { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
.hdr[data-tone="light"] .btn.sm, .hdr[data-tone="accent"] .btn.sm { background: var(--ink); border-color: var(--ink); color: var(--fg); }

/* ---------- 01 Hero: arched window expands to full screen ---------- */
.hero { position: relative; height: 260vh; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-copy {
  position: absolute; z-index: 3; left: 0; right: 0; top: calc(var(--hdr) + 5vh);
  display: flex; flex-direction: column; gap: 20px; align-items: flex-start;
  width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px;
  will-change: opacity, transform;
}
.hero-copy .h1 { max-width: 21ch; font-size: clamp(34px, 4.6vw, 66px); line-height: 1.06; }
.hero-media {
  position: absolute; inset: 0; z-index: 1;
  clip-path: inset(56vh 24vw 6vh 24vw round 24px 24px 12px 12px);
  will-change: clip-path;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,5,10,.75), transparent 45%); }
.hero-tag {
  position: absolute; left: 0; right: 0; bottom: 8vh; max-width: 1200px; margin-inline: auto; padding-inline: 24px;
  font-size: clamp(28px, 4vw, 56px); font-weight: 500; letter-spacing: -.02em; opacity: 0;
}

/* ---------- 02 Before / after ---------- */
.ba { position: relative; height: 300vh; background: var(--bg); }
.ba-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center;
  padding-top: var(--hdr);
}
.ba-text { display: flex; flex-direction: column; gap: 20px; }
.ba-rows { display: grid; gap: 14px; margin-top: 6px; }
.ba-rows li { display: grid; gap: 2px; padding-left: 14px; border-left: 2px solid var(--line); opacity: .38; transition: opacity .35s, border-color .35s; }
.ba-rows li.is-on { opacity: 1; border-color: var(--lilac); }
.ba-rows .was { font-size: 13px; color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(163,156,189,.6); }
.ba-rows .now { font-size: 18px; font-weight: 500; }
.ba-frame { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.ba-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { filter: grayscale(.7) brightness(.62) contrast(1.05); transform: scale(1.06); }
.ba-after { clip-path: inset(0 100% 0 0); will-change: clip-path; }
.ba-divider { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--fg); box-shadow: 0 0 0 1px rgba(6,5,10,.4); will-change: left; }
.ba-label {
  position: absolute; top: 16px; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 4px; background: rgba(6,5,10,.7); border: 1px solid var(--line);
}
.ba-label.is-before { left: 16px; }
.ba-label.is-after { right: 16px; opacity: 0; }

/* ---------- 03 Isometric layer stack ---------- */
.stack { position: relative; height: 800vh; background: var(--bg-2); }
.stack-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; padding-top: var(--hdr); }
.stack-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: center; }
.stack-text { display: flex; flex-direction: column; gap: 22px; }
.segbar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; max-width: 420px; }
.segbar i { position: relative; height: 2px; background: var(--line); overflow: hidden; }
.segbar i::after { content: ""; position: absolute; inset: 0; background: var(--lilac); transform: scaleX(var(--f, 0)); transform-origin: left; }
.steps { display: grid; min-height: 190px; }
.step { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 10px; opacity: 0; transform: translateY(14px); transition: opacity .45s var(--e-out), transform .45s var(--e-out); }
.step.is-on { opacity: 1; transform: none; }
.step .n, .pcard .n { font-size: 13px; font-weight: 500; letter-spacing: .1em; color: var(--lilac); }
.step h3 { font-size: clamp(24px, 2.4vw, 32px); }
.step p { color: var(--muted); max-width: 44ch; font-size: 17px; }
.scene { perspective: 1700px; display: grid; place-items: center; height: min(80svh, 720px); }
.cam { transform-style: preserve-3d; will-change: transform; }
.iso { position: relative; width: min(38vw, 440px); aspect-ratio: 1; transform-style: preserve-3d; transform: rotateX(57deg) rotateZ(-42deg); }
.layer {
  position: absolute; inset: 0; border-radius: 12px; padding: 22px;
  border: 1px solid rgba(217, 204, 255, .42);
  background: linear-gradient(140deg, rgba(183,156,255,.22), rgba(124,77,255,.08)), rgba(13,11,20,.86);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
  display: grid; grid-template-rows: auto 1fr auto auto; gap: 8px;
  opacity: 0; will-change: transform, opacity;
}
.layer b { font-size: 12px; font-weight: 500; letter-spacing: .12em; color: var(--lilac); }
.layer span { font-size: 20px; font-weight: 500; align-self: end; }
.layer i { display: block; height: 6px; border-radius: 3px; background: rgba(217,204,255,.22); }
.layer i + i { width: 62%; }
.layer:nth-child(2) { background: linear-gradient(140deg, rgba(183,156,255,.28), rgba(124,77,255,.1)), rgba(13,11,20,.86); }
.layer:nth-child(3) { background: linear-gradient(140deg, rgba(183,156,255,.34), rgba(124,77,255,.12)), rgba(13,11,20,.86); }
.layer:nth-child(4) { background: linear-gradient(140deg, rgba(183,156,255,.4), rgba(124,77,255,.14)), rgba(13,11,20,.86); }
.layer:nth-child(5) { background: linear-gradient(140deg, rgba(183,156,255,.46), rgba(124,77,255,.16)), rgba(13,11,20,.86); }
.layer:nth-child(6) { background: linear-gradient(140deg, rgba(217,204,255,.6), rgba(183,156,255,.22)), rgba(13,11,20,.86); border-color: rgba(236,232,247,.7); }

/* ---------- 04 Tilted browser + example carousel ---------- */
.prod { padding-block: clamp(96px, 12vw, 160px); background: var(--bg); }
.dev { perspective: 1600px; }
.browser {
  --tilt: 14deg;
  transform: rotateX(var(--tilt)); transform-origin: 50% 0;
  border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2);
  box-shadow: 0 40px 80px -40px rgba(124,77,255,.25);
  will-change: transform;
}
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(217,204,255,.18); }
.browser-bar span { margin-left: 14px; padding: 4px 12px; border-radius: 4px; background: rgba(255,255,255,.04); }
.slides { position: relative; aspect-ratio: 16 / 9; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .9s var(--e-out); overflow: hidden; }
.slide.is-on { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.slide.is-on img { animation: kenburns 7s linear forwards; }
@keyframes kenburns { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }
.slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 72px 28px 26px;
  background: linear-gradient(to top, rgba(6,5,10,.92), transparent);
  display: grid; gap: 6px; max-width: 760px; font-size: 16px; color: var(--muted);
}
.slide figcaption b { font-size: 22px; font-weight: 500; color: var(--fg); }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 22px; }
.dots button { width: 28px; height: 3px; border: 0; padding: 0; border-radius: 2px; background: var(--line); cursor: pointer; }
.dots button[aria-selected="true"] { background: var(--lilac); }

/* ---------- 05 Process ---------- */
.process { padding-block: clamp(96px, 12vw, 160px); background: var(--bg-2); border-top: 1px solid var(--line); }
.pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.pcard { border-top: 1px solid var(--line); padding-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.pcard h3 { font-size: 22px; }
.pcard p { color: var(--muted); font-size: 15px; }
.pcard .gets { color: var(--fg); font-size: 14px; }

/* ---------- 06 Why INNERA (light section) ---------- */
.why { padding-block: clamp(96px, 12vw, 160px); background: var(--paper); color: var(--ink); }
.why .eyebrow { color: var(--accent-ink); }
.why em { color: var(--accent-ink); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0 0 56px; }
.stats div { border-top: 1px solid var(--ink-line); padding-top: 18px; }
.stats dt { font-size: clamp(48px, 6vw, 80px); font-weight: 500; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stats dd { margin: 10px 0 0; color: var(--ink-muted); font-size: 15px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card {
  --x: 50%; --y: 50%;
  position: relative; overflow: hidden; border: 1px solid var(--ink-line); border-radius: 10px; padding: 28px;
  background: radial-gradient(420px circle at var(--x) var(--y), rgba(124,77,255,.08), transparent 60%), #fff;
  display: grid; gap: 10px;
}
.card h3 { font-size: 22px; }
.card p { color: var(--ink-muted); }
.cards + .stats { margin: 56px 0 0; }
.integrations { margin-top: 56px; display: grid; gap: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 13px; padding: 6px 12px; border-radius: 4px; border: 1px solid var(--ink-line); background: #fff; }

/* ---------- 07 Statement ---------- */
.stmt { position: relative; height: 320vh; background: var(--bg); }
.stmt-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.stmt-track {
  white-space: nowrap; font-size: clamp(72px, 13vw, 220px); font-weight: 600; letter-spacing: -.045em; line-height: 1;
  will-change: transform;
}
.stmt-track .lt { display: inline-block; opacity: .22; transform-origin: 50% 100%; }
.stmt-track .sp { display: inline-block; width: .28em; }

/* ---------- 08 CTA: accent square covers the screen ---------- */
.cta { position: relative; height: 240vh; background: var(--bg); }
.cta-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.cta-square { position: absolute; left: 50%; top: 50%; width: 160px; height: 160px; margin: -80px 0 0 -80px; background: var(--lilac); border-radius: 8px; will-change: transform; }
.cta-content { position: relative; z-index: 2; color: #0a0613; display: flex; flex-direction: column; gap: 22px; align-items: flex-start; opacity: 0; }
.cta-content .eyebrow { color: #2a1d63; }
.cta-content .lead { color: #2a2340; }
.cta-meta { font-size: 14px; color: #2a2340; }

/* ---------- Footer (sticky reveal) ---------- */
main { position: relative; z-index: 1; background: var(--bg); }
.ftr { position: sticky; bottom: 0; z-index: 0; padding: 56px 0 calc(40px + env(safe-area-inset-bottom, 0px)); background: var(--bg-2); border-top: 1px solid var(--line); }
.ftr-in { display: grid; grid-template-columns: auto 1fr auto auto; gap: 24px 40px; align-items: center; font-size: 14px; color: var(--muted); }
.ftr .brand { color: var(--fg); }
.ftr nav { display: flex; gap: 20px; }
.ftr a { text-decoration: none; }
.ftr a:hover { color: var(--fg); }

/* ---------- Contact modal ---------- */
.modal { border: 1px solid var(--line); border-radius: 14px; padding: 0; background: var(--bg-2); color: var(--fg); width: min(520px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(6,5,10,.7); backdrop-filter: blur(6px); }
.modal-in { position: relative; display: grid; gap: 16px; padding: 36px; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--line); background: none; color: var(--fg); font-size: 20px; cursor: pointer; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* ---------- Reveals ---------- */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--e-out), transform .8s var(--e-out); }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */
@media (max-width: 899px) {
  :root { --hdr: 60px; }
  .nav { display: none; }
  .brand span { display: none; }
  .hero { height: 220vh; }
  .hero-copy { top: calc(var(--hdr) + 3vh); gap: 16px; }
  .ba { height: 280vh; }
  .ba-stage { grid-template-columns: 1fr; gap: 22px; align-content: center; }
  .ba-frame { order: -1; aspect-ratio: 16 / 10; }
  .ba-rows { gap: 10px; }
  .ba-rows .now { font-size: 16px; }
  .stack { height: 760vh; }
  .stack-grid { grid-template-columns: 1fr; gap: 8px; }
  .scene { order: -1; height: 44svh; }
  .iso { width: min(52vw, 230px); }
  .layer { padding: 12px; }
  .layer span { font-size: 14px; }
  .steps { min-height: 160px; }
  .step p { font-size: 15px; }
  .pgrid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr; }
  .slide figcaption { padding: 48px 16px 14px; font-size: 14px; }
  .slide figcaption b { font-size: 17px; }
  .ftr-in { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .pgrid { grid-template-columns: 1fr; } }

/* ---------- Reduced motion: no pinning, final states, everything readable ---------- */
html.static .hero, html.static .ba, html.static .stack, html.static .stmt, html.static .cta { height: auto; }
html.static .hero-stage, html.static .ba-stage, html.static .stack-stage, html.static .stmt-stage, html.static .cta-stage { position: relative; height: auto; min-height: 100svh; }
html.static .hero-media { clip-path: none; }
html.static .hero-copy { position: relative; padding-top: calc(var(--hdr) + 8vh); }
html.static .hero-stage { display: grid; }
html.static .hero-media { position: absolute; opacity: .35; }
html.static .ba-after { clip-path: inset(0 0 0 50%); }
html.static .ba-divider { left: 50%; }
html.static .ba-label.is-after { opacity: 1; }
html.static .ba-rows li { opacity: 1; }
html.static .step { position: relative; opacity: 1; transform: none; grid-area: auto; }
html.static .steps { gap: 22px; }
html.static .scene { display: none; }
html.static .stack-stage { padding-block: 120px; }
html.static .browser { --tilt: 0deg; }
html.static .stmt-track { white-space: normal; font-size: clamp(48px, 9vw, 140px); padding: 120px 24px; }
html.static .stmt-track .lt { opacity: 1; }
html.static .cta-stage { background: var(--lilac); padding: 120px 0; }
html.static .cta-square { display: none; }
html.static .cta-content { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .slide.is-on img { animation: none; } }
