:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --text: #ededee;
  --muted: #86868c;
  --faint: #4a4a50;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #7cf3ff;
  --f-body: "Space Grotesk", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 5vw, 80px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
::selection { background: var(--text); color: var(--bg); }

/* ================= INTRO ================= */
#intro { position: fixed; inset: 0; z-index: 1000; background: var(--bg); display: grid; place-items: center; }
.intro-logo { position: relative; width: min(42vmin, 340px); aspect-ratio: 741 / 900; }
.intro-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; clip-path: inset(100% 0 0 0); }
.intro-scan { position: absolute; left: -12%; right: -12%; top: 100%; height: 1px; background: var(--text); opacity: 0; }
.intro-foot { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 32px; display: flex; justify-content: space-between; color: var(--muted); }
.intro-foot b { color: var(--text); font-weight: 500; }
.intro-skip { position: absolute; top: 28px; right: var(--gutter); background: none; border: 0; color: var(--muted); cursor: pointer; transition: color .3s; }
.intro-skip:hover { color: var(--text); }

/* ================= GLOBAL ================= */
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1; pointer-events: none; }
.scroll-bar { position: fixed; top: 0; left: 0; height: 1px; width: 100%; z-index: 960; background: var(--text); transform-origin: left; transform: scaleX(0); }
.hero-inner, .section > *, .footer, .gear-sticky { position: relative; z-index: 2; }

/* ================= NAV ================= */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 800; display: flex; align-items: center; justify-content: space-between; padding: 22px var(--gutter); transition: background .4s, padding .4s, border-color .4s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(10, 10, 11, 0.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding-top: 14px; padding-bottom: 14px; border-bottom-color: var(--line); }
.nav-logo img { height: 34px; width: auto; }
.nav-links { display: flex; gap: clamp(18px, 2.6vw, 36px); align-items: center; }
.nav-links a { font-size: 0.88rem; color: var(--muted); transition: color .3s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { color: var(--text) !important; border: 1px solid var(--line); padding: 7px 16px; border-radius: 100px; transition: border-color .3s !important; }
.nav-cta:hover { border-color: var(--text); }
.nav-burger { display: none; background: none; border: 0; width: 30px; height: 20px; position: relative; cursor: pointer; }
.nav-burger span { position: absolute; left: 0; right: 0; height: 1.5px; background: var(--text); transition: transform .3s, top .3s; }
.nav-burger span:first-child { top: 5px; } .nav-burger span:last-child { top: 13px; }
body.menu-open .nav-burger span:first-child { top: 9px; transform: rotate(45deg); }
body.menu-open .nav-burger span:last-child { top: 9px; transform: rotate(-45deg); }
@media (max-width: 820px) {
  .nav-burger { display: block; z-index: 2; }
  .nav-links { position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 26px; background: var(--bg); opacity: 0; pointer-events: none; transition: opacity .4s; }
  .nav-links a { font-size: 1.6rem; color: var(--text); }
  .nav-cta { border: 0; padding: 0; }
  body.menu-open .nav-links { opacity: 1; pointer-events: auto; }
}

/* ================= HERO ================= */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px var(--gutter) 90px; }
.hero-inner { max-width: 760px; }
.eyebrow { color: var(--muted); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.hero-title { font-weight: 500; font-size: clamp(3.2rem, 10vw, 8.6rem); line-height: 0.92; letter-spacing: -0.05em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-title .word { display: inline-block; }
.hero-title .muted { color: var(--faint); }
.char { display: inline-block; will-change: transform; }
.hero-sub { max-width: 440px; margin-top: 30px; color: var(--muted); font-size: 1.05rem; font-weight: 300; }
.hero-actions { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.hero-meta { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 28px; display: flex; justify-content: space-between; color: var(--faint); }
.scroll-hint { display: inline-flex; align-items: center; gap: 10px; }
.scroll-hint i { width: 1px; height: 24px; background: var(--muted); animation: drip 2s infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.btn { display: inline-flex; align-items: center; padding: 14px 26px; border-radius: 100px; font-size: 0.9rem; font-weight: 500; transition: background .3s, color .3s, border-color .3s; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }

/* ================= SECTIONS ================= */
.section { position: relative; padding: clamp(100px, 14vw, 180px) var(--gutter); }
.section-head { display: flex; flex-direction: column; gap: 18px; margin-bottom: clamp(48px, 6vw, 80px); }
.idx { color: var(--muted); }
.section-title { font-weight: 500; font-size: clamp(2.4rem, 6.5vw, 5.2rem); line-height: 1; letter-spacing: -0.045em; overflow: hidden; padding-bottom: 0.05em; }
.section-intro { color: var(--muted); max-width: 440px; margin: -40px 0 48px; font-weight: 300; }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 7vw, 110px); align-items: end; }
.about-photo { position: relative; aspect-ratio: 4 / 5; cursor: pointer; }
.about-photo .frame { position: absolute; inset: 0; overflow: hidden; border-radius: 4px; background: var(--bg-2); }
.about-photo .frame img { width: 100%; height: 115%; object-fit: cover; object-position: 50% 15%; }
.about-photo .frame img.alt { position: absolute; inset: 0; clip-path: inset(0 0 100% 0); transition: clip-path 1s var(--ease); }
.about-photo:hover .frame img.alt, .about-photo.swap .frame img.alt { clip-path: inset(0 0 0 0); }
.lead { font-size: clamp(1.5rem, 2.8vw, 2.3rem); font-weight: 400; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 22px; }
.about-text .body { color: var(--muted); font-size: 1.02rem; font-weight: 300; max-width: 560px; }
.about-text .body + .body { margin-top: 14px; }
.highlights { list-style: none; margin-top: 36px; border-top: 1px solid var(--line); max-width: 560px; }
.highlights li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.highlights span { color: var(--faint); }
.highlights b { font-weight: 400; font-size: .95rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.stat b { display: block; font-weight: 500; font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: -0.04em; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 0.82rem; }
.ph { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--faint); font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em; background: var(--bg-2); }

/* Services — lista */
.services-list { border-top: 1px solid var(--line); }
.service { position: relative; display: grid; grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1.2fr) 40px; gap: 24px; align-items: baseline; padding: 30px 0; border-bottom: 1px solid var(--line); transition: padding .5s var(--ease); background: rgba(10, 10, 11, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.service .num { color: var(--faint); }
.service h3 { font-weight: 400; font-size: clamp(1.3rem, 2.4vw, 2rem); letter-spacing: -0.03em; transition: color .4s; }
.service p { color: var(--muted); font-weight: 300; font-size: 0.98rem; }
.service i { font-style: normal; color: var(--faint); justify-self: end; transition: transform .5s var(--ease), color .4s; }
.service:hover { padding-left: 14px; }
.service:hover h3, .service:hover i { color: var(--text); }
.service:hover i { transform: translateX(-6px) rotate(-45deg); }
@media (max-width: 820px) {
  .service { grid-template-columns: 36px 1fr; gap: 6px 14px; padding: 24px 0; }
  .service p { grid-column: 2; } .service i { display: none; }
}

/* Clients — muro de logos */
.clients-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.client { position: relative; aspect-ratio: 1 / 1; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(10, 10, 11, 0.75); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden; display: block; }
.client img { position: absolute; inset: 18% 16% 26%; width: 68%; height: 56%; object-fit: contain; border-radius: 3px; filter: grayscale(1); opacity: 0.6; transition: filter .6s, opacity .6s, transform .8s var(--ease); }
.client:hover img { filter: none; opacity: 1; transform: scale(1.04); }
.client .info { position: absolute; left: 20px; right: 20px; bottom: 18px; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.client .info h4 { font-weight: 400; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client .info span { color: var(--faint); white-space: nowrap; font-size: 0.62rem; }
.client-ph { background: transparent; }
.client-ph b { font-weight: 400; font-size: 1.1rem; color: var(--muted); }
@media (max-width: 1000px) { .clients-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .clients-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .client .info span { display: none; } }
@media (hover: none) { .client img { filter: none; opacity: 1; } }

/* Portfolio */
.portals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.portal { position: relative; min-height: clamp(320px, 40vw, 480px); overflow: hidden; border-radius: 4px; border: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(24px, 3vw, 36px); isolation: isolate; }
.portal .bg { position: absolute; inset: 0; z-index: -2; transition: transform 1.2s var(--ease); }
.portal .bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: grayscale(1); opacity: .35; transition: opacity .8s, filter .8s; }
.portal::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(10,10,11,.95) 15%, rgba(10,10,11,0)); }
.portal:hover .bg { transform: scale(1.05); }
.portal:hover .bg img { opacity: .6; filter: none; }
.portal .label { color: var(--muted); margin-bottom: 12px; }
.portal h3 { font-weight: 500; font-size: clamp(1.8rem, 3.2vw, 2.8rem); letter-spacing: -0.04em; line-height: 1; }
.portal p { color: var(--muted); margin: 10px 0 24px; max-width: 340px; font-weight: 300; font-size: 0.95rem; }
.portal .go { display: inline-flex; align-items: center; gap: 12px; font-size: 0.88rem; }
.portal .go i { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-style: normal; transition: background .4s, color .4s, transform .4s var(--ease), border-color .4s; }
.portal:hover .go i { background: var(--text); color: var(--bg); border-color: var(--text); transform: rotate(-45deg); }
.portal.soon { cursor: default; }
.portal.soon .go { color: var(--muted); }
.portal.soon:hover .go i { background: none; color: var(--muted); border-color: var(--line); transform: none; }

/* Contact */
.contact { text-align: center; padding-bottom: clamp(100px, 12vw, 160px); }
.contact .eyebrow { justify-content: center; }
.contact-title { font-weight: 500; font-size: clamp(2.2rem, 7.5vw, 6.6rem); line-height: 1; letter-spacing: -0.05em; margin: 6px 0 56px; }
.contact-title > span { display: inline-block; overflow: hidden; white-space: nowrap; padding-bottom: .05em; }
.accent { color: var(--accent); }
.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.contact-link { min-width: 210px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 4px; background: rgba(10,10,11,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-align: left; transition: border-color .3s; }
.contact-link:hover { border-color: var(--text); }
.contact-link small { display: block; color: var(--muted); font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 2px; }
.contact-link b { font-weight: 400; font-size: 1rem; }

.footer { border-top: 1px solid var(--line); padding: 44px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--faint); background: var(--bg); }
.footer-logo { width: 70px; opacity: 0.6; }

/* Kit */
.kit { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(60px, 8vw, 110px); }
.kit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.kit-intro { color: var(--muted); font-weight: 300; }
.kit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.kit-col { padding: 28px 24px 28px 0; border-bottom: 1px solid var(--line); background: rgba(10,10,11,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.kit-col + .kit-col { padding-left: 24px; border-left: 1px solid var(--line); }
.kit-col span { color: var(--faint); display: block; margin-bottom: 18px; }
.kit-col ul { list-style: none; display: grid; gap: 8px; }
.kit-col li { font-size: clamp(1.05rem, 1.6vw, 1.35rem); letter-spacing: -0.02em; }
@media (max-width: 820px) {
  .kit-grid { grid-template-columns: 1fr 1fr; }
  .kit-col, .kit-col + .kit-col { padding: 22px 14px; border-left: 0; }
  .kit-col:nth-child(even) { border-left: 1px solid var(--line); }
  .kit-head { flex-direction: column; gap: 8px; }
}

/* ================= EQUIPO (3D) ================= */
.gear { position: relative; height: 320vh; }
.gear-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 110px var(--gutter) 36px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.gear-head .idx { display: block; margin-bottom: 18px; }
.gear-model { font-weight: 400; font-size: clamp(1.1rem, 2vw, 1.6rem); margin-top: 10px; letter-spacing: -0.02em; }
.gear-sub { color: var(--faint); margin-top: 6px; }
.gear-meter { display: flex; align-items: center; gap: 14px; color: var(--muted); align-self: flex-end; }
.gear-meter i { display: block; width: 140px; height: 1px; background: var(--line); overflow: hidden; }
.gear-meter em { display: block; height: 100%; background: var(--text); transform-origin: left; transform: scaleX(0); }

#tags { position: fixed; inset: 0; z-index: 3; pointer-events: none; visibility: hidden; }
.tag { position: absolute; top: 0; left: 0; opacity: 0; will-change: transform, opacity; }
.tag i { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--text); }
.tag i::after { content: ""; position: absolute; left: 10px; top: 2.5px; width: 36px; height: 1px; background: rgba(255,255,255,.35); }
.tag span { position: absolute; left: 54px; top: -16px; white-space: nowrap; }
.tag.left i::after { left: auto; right: 10px; }
.tag.left span { left: auto; right: 54px; text-align: right; }
.tag small { display: none; }
.tag b { display: block; font-weight: 500; font-size: .82rem; letter-spacing: -0.01em; }
.tag em { display: block; font-style: normal; color: var(--muted); font-size: .74rem; }
@media (max-width: 820px) {
  .tag span { left: 26px; top: -12px; max-width: 40vw; white-space: normal; } .tag.left span { right: 26px; }
  .tag i::after { width: 12px; } .tag b { font-size: .66rem; line-height: 1.2; } .tag em { display: none; }
  .gear-meter i { width: 90px; }
}

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; }
  .hero-meta span:last-child { display: none; }
  .section-intro { margin-top: -24px; }
  .footer { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
