/* =========================================================
   BRAND — sistema visual compartido
   Paleta del manual + tipografía Montserrat
   ========================================================= */

:root {
  /* Brand colors — manual de marca 2026 */
  --bg:            #0a0301;
  --bg-elev-1:    #120604;
  --bg-elev-2:    #1a0a06;
  --ink:           #e6e3e8;
  --ink-dim:      #a39ea6;
  --ink-mute:     #6b656d;
  --line:         #2a1a14;
  --line-warm:    #3a221a;

  --orange:       #f54703;  /* núcleo */
  --orange-deep:  #dc3a00;
  --orange-blood: #b12c00;
  --orange-burn:  #681600;
  --orange-ember: #453f40;

  --paper:        #e6e3e8;  /* fondo claro alternativo */
  --paper-ink:    #0a0301;

  /* Type */
  --ff: 'Montserrat', system-ui, sans-serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Type scale */
  --t-eyebrow: 11px;
  --t-body:    15px;
  --t-lead:    20px;
  --t-h3:      32px;
  --t-h2:      clamp(48px, 6vw, 96px);
  --t-h1:      clamp(72px, 12vw, 220px);
  --t-mega:    clamp(120px, 22vw, 360px);

  --maxw: 1440px;
  --gutter: clamp(20px, 4vw, 72px);

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* Light mode override (used in claro panels) */
.theme-paper {
  --bg: var(--paper);
  --bg-elev-1: #efedf0;
  --bg-elev-2: #d8d5da;
  --ink: var(--paper-ink);
  --ink-dim: #4a4347;
  --ink-mute: #7a7378;
  --line: #cdc8cf;
  --line-warm: #d8c4bd;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff);
  font-weight: 400;
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overflow-x: clip;
}
body {
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Selection */
::selection { background: var(--orange); color: #fff; }

/* ---------- Utility ---------- */
.mono { font-family: var(--ff-mono); letter-spacing: 0; }
.eyebrow {
  font-family: var(--ff-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--orange);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  animation: pulse 1.8s infinite var(--ease);
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}

.section {
  position: relative;
  padding: clamp(80px, 12vw, 180px) var(--gutter);
}
.section-inner { max-width: var(--maxw); margin: 0 auto; }

/* ---------- Pills (estilo manual) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-warm);
  font-family: var(--ff-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: all .3s var(--ease);
}
.pill.active,
.pill:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* ---------- Top nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  mix-blend-mode: difference;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-style: italic; font-weight: 800;
  font-size: 22px; letter-spacing: -.02em;
  color: #fff;
}
.nav-logo sup {
  font-style: normal; font-size: 10px;
  font-weight: 400; vertical-align: super;
  margin-left: 1px;
}
.nav-mark {
  width: 28px; height: 28px;
  display: inline-block;
}
.nav-links {
  display: flex; gap: 4px;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  padding: 4px;
}
.nav-link {
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--ff);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  color: #fff;
  transition: all .25s var(--ease);
}
.nav-link:hover { background: rgba(255,255,255,.1); }
.nav-link.is-current { background: var(--orange); }

.nav-cta {
  display: flex; align-items: center; gap: 12px;
  color: #fff;
}
.lang-toggle {
  display: flex;
  font-family: var(--ff);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #fff;
  gap: 2px;
}
.lang-toggle button {
  padding: 6px 8px;
  opacity: .4;
  transition: opacity .2s;
}
.lang-toggle button.is-active { opacity: 1; color: var(--orange); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 24px;
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--orange);
  color: #fff;
  font-weight: 600;
  transition: transform .3s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); background: var(--orange-deep); }
.btn .arrow { font-size: 14px; transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-warm);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Orbs (radial glows del manual) ---------- */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
  opacity: .8;
  will-change: transform;
}
.orb-orange {
  background: radial-gradient(circle, var(--orange) 0%, var(--orange-blood) 40%, transparent 70%);
}
.orb-deep {
  background: radial-gradient(circle, var(--orange-deep) 0%, var(--orange-burn) 40%, transparent 70%);
}
.orb-ember {
  background: radial-gradient(circle, var(--orange-burn) 0%, transparent 70%);
  filter: blur(80px);
}

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee.reverse .marquee-track { animation-direction: reverse; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Glitch / type ---------- */
.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  pointer-events: none;
}
.glitch::before {
  color: var(--orange);
  transform: translate(-2px, 0);
  mix-blend-mode: screen;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  opacity: 0;
}
.glitch::after {
  color: #00e5ff;
  transform: translate(2px, 0);
  mix-blend-mode: screen;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  opacity: 0;
}
.glitch:hover::before { animation: glitch-a .6s steps(2) infinite; opacity: 1; }
.glitch:hover::after  { animation: glitch-b .6s steps(2) infinite; opacity: 1; }
@keyframes glitch-a {
  0%, 100% { transform: translate(-2px, 0); }
  25%      { transform: translate(-4px, 1px); }
  50%      { transform: translate(-1px, -1px); }
  75%      { transform: translate(-3px, 1px); }
}
@keyframes glitch-b {
  0%, 100% { transform: translate(2px, 0); }
  25%      { transform: translate(4px, -1px); }
  50%      { transform: translate(1px, 1px); }
  75%      { transform: translate(3px, -1px); }
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
[data-reveal-stagger].is-in > * {
  opacity: 1;
  transform: none;
}
[data-reveal-stagger].is-in > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-stagger].is-in > *:nth-child(2) { transition-delay: 80ms; }
[data-reveal-stagger].is-in > *:nth-child(3) { transition-delay: 160ms; }
[data-reveal-stagger].is-in > *:nth-child(4) { transition-delay: 240ms; }
[data-reveal-stagger].is-in > *:nth-child(5) { transition-delay: 320ms; }
[data-reveal-stagger].is-in > *:nth-child(6) { transition-delay: 400ms; }
[data-reveal-stagger].is-in > *:nth-child(7) { transition-delay: 480ms; }
[data-reveal-stagger].is-in > *:nth-child(n+8) { transition-delay: 560ms; }

/* ---------- Custom cursor ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 32px; height: 32px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .25s var(--ease), height .25s var(--ease),
              background .25s, border-color .25s;
  mix-blend-mode: difference;
}
.cursor.is-hover {
  width: 64px; height: 64px;
  background: var(--orange);
  border-color: var(--orange);
}
@media (hover: none) { .cursor { display: none; } }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 80px var(--gutter) 32px;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: var(--maxw);
  margin: 0 auto 60px;
}
.footer-col h5 {
  font-family: var(--ff-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 18px;
  font-weight: 400;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { transition: color .2s; }
.footer-col a:hover { color: var(--orange); }
.footer-mega {
  font-style: italic;
  font-weight: 900;
  font-size: clamp(96px, 18vw, 280px);
  line-height: .85;
  letter-spacing: -.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-warm);
  text-align: center;
  margin-top: 60px;
}
.footer-bottom {
  display: flex; justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  font-family: var(--ff-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Note card dek (excerpt) ---------- */
.note-card .note-dek {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-mute);
  margin-bottom: 8px;
}

/* ---------- Article body ---------- */
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px var(--gutter) 120px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-dim);
}
.article-body p { margin-bottom: 24px; }
.article-body h2 {
  font-weight: 800;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -.02em;
  margin: 60px 0 20px;
  color: var(--ink);
}
.article-body strong { color: var(--ink); font-weight: 700; }
.article-body em { font-style: italic; }
.article-body ul,
.article-body ol { margin-bottom: 24px; padding-left: 24px; }
.article-body li { margin-bottom: 8px; line-height: 1.55; }

/* ---------- Article meta ---------- */
.article-meta {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 40px;
}

/* ---------- Article foot (seguir leyendo) ---------- */
.article-foot {
  padding: 80px var(--gutter) 120px;
  border-top: 1px solid var(--line);
}
.article-foot-inner { max-width: var(--maxw); margin: 0 auto; }
.article-foot-eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 48px;
}
.article-foot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.article-foot-grid > .note-card:nth-child(3n) { border-right: 0; }
@media (max-width: 900px) {
  .article-foot-grid { grid-template-columns: 1fr; }
  .article-foot-grid > .note-card { border-right: 0; }
}

/* ================================================================
   SERVICIOS — landing pages
   ================================================================ */
.page-h1-sub {
  font-size: clamp(20px, 2.2vw, 32px);
  line-height: 1.4;
  color: var(--ink-dim);
  max-width: 720px;
  margin-top: 8px;
  font-weight: 500;
  letter-spacing: -.015em;
}
.service-page-body {
  max-width: 960px;
  margin: 0 auto;
  padding: 80px var(--gutter) 100px;
  display: grid;
  gap: 80px;
}
.sp-block .sp-eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 24px;
}
.sp-block h2 {
  font-weight: 800;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -.02em;
  margin-bottom: 24px;
  color: var(--ink);
}
.sp-block p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-dim);
  margin-bottom: 16px;
  max-width: 760px;
}
.sp-block p strong { color: var(--ink); font-weight: 700; }
.sp-process {
  list-style: none;
  counter-reset: pr;
  display: grid;
  gap: 32px;
}
.sp-process li {
  counter-increment: pr;
  position: relative;
  padding-left: 64px;
  max-width: 760px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-dim);
}
.sp-process li::before {
  content: "/ 0" counter(pr);
  position: absolute;
  left: 0; top: 2px;
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--orange);
  letter-spacing: .12em;
}
.sp-process li strong {
  display: block;
  color: var(--ink);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 6px;
  letter-spacing: -.01em;
}
.sp-deliver {
  list-style: none;
  columns: 2;
  column-gap: 48px;
  max-width: 800px;
}
.sp-deliver li {
  break-inside: avoid;
  padding: 12px 0 12px 24px;
  border-top: 1px solid var(--line);
  position: relative;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}
.sp-deliver li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--orange);
  font-family: var(--ff-mono);
}
.service-cta {
  padding: 100px var(--gutter);
  text-align: center;
  background: var(--bg-elev-1);
  position: relative;
  overflow: hidden;
}
.service-cta h2 {
  font-style: italic;
  font-weight: 900;
  font-size: clamp(40px, 6vw, 80px);
  line-height: .95;
  letter-spacing: -.035em;
  margin-bottom: 32px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.service-cta h2 em { color: var(--orange); }
.service-others {
  padding: 80px var(--gutter) 120px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.service-others .eyebrow { display: block; margin-bottom: 32px; }
.service-others .others-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.service-others .other {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: all .3s var(--ease);
  display: flex;
  flex-direction: column;
  min-height: 200px;
  text-decoration: none;
  color: var(--ink);
}
.service-others .other:hover {
  border-color: var(--orange);
  transform: translateY(-4px);
}
.service-others .other .other-num {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--orange);
  margin-bottom: 16px;
}
.service-others .other h3 {
  font-weight: 700;
  font-size: clamp(20px, 2vw, 24px);
  letter-spacing: -.015em;
  margin-bottom: auto;
}
.service-others .other h3 em { font-style: italic; color: var(--orange); }
.service-others .other .other-foot {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.service-others .other .arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-warm);
  display: flex; align-items: center; justify-content: center;
  transition: all .3s var(--ease);
}
.service-others .other:hover .arrow {
  background: var(--orange);
  border-color: var(--orange);
  transform: rotate(-45deg);
}

/* ================================================================
   PROYECTOS — case pages
   ================================================================ */
.project-body {
  max-width: 880px;
  margin: 0 auto;
  padding: 80px var(--gutter) 100px;
  display: grid;
  gap: 64px;
}
.project-block .pb-eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.project-block .pb-eyebrow::before { content: '→'; }
.project-block h2 {
  font-weight: 800;
  font-size: clamp(28px, 3.2vw, 44px);
  letter-spacing: -.02em;
  margin-bottom: 20px;
  color: var(--ink);
}
.project-block p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-dim);
  margin-bottom: 16px;
}
.project-block p strong { color: var(--ink); font-weight: 700; }
.project-block ul { list-style: none; }
.project-block ul li {
  padding: 14px 0 14px 28px;
  border-top: 1px solid var(--line);
  position: relative;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
.project-block ul li:last-child { border-bottom: 1px solid var(--line); }
.project-block ul li::before {
  content: '→';
  position: absolute;
  left: 0; top: 14px;
  color: var(--orange);
  font-family: var(--ff-mono);
}
.project-block ul li strong { font-weight: 700; }
.project-block h3 {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 24px 0 8px;
  font-family: var(--ff-mono);
}
@media (max-width: 800px) {
  .sp-deliver { columns: 1; }
  .service-others .others-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   IMAGE SYSTEM — project covers, galleries, note covers
   ================================================================ */

/* Project page hero cover */
.project-cover {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(135deg, var(--orange-burn), var(--orange) 50%, var(--orange-blood));
  background-size: cover;
  background-position: center;
}
.project-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, rgba(10,3,1,.75) 45%, rgba(10,3,1,.4) 100%);
}

/* Project page client logo in hero */
.project-client-logo {
  height: 40px;
  width: auto;
  opacity: .8;
  margin-bottom: 20px;
  display: block;
}

/* Project gallery */
.project-gallery {
  max-width: 880px;
  margin: -20px auto 80px;
  padding: 0 var(--gutter);
}
.project-gallery .gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.project-gallery figure {
  margin: 0;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-elev-2);
}
.project-gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 640px) {
  .project-gallery .gallery-grid { grid-template-columns: 1fr; }
}

/* Note article cover (wide, after page-hero in note pages) */
.article-cover {
  max-width: var(--maxw);
  margin: 0 auto 60px;
  padding: 0 var(--gutter);
}
.article-cover img {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* Note card cover strip */
.note-cover {
  width: calc(100% + 64px);
  margin: -40px -32px 24px;
  height: 140px;
  background: linear-gradient(135deg, var(--bg-elev-1), var(--orange-burn) 120%);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

/* Featured note visual — background image support */
.featured-note .visual.has-cover {
  background-size: cover;
  background-position: center;
}

/* Clientes marquee — real logos */
.clientes-row img {
  height: 75px;
  width: auto;
  display: block;
  flex-shrink: 0;
  opacity: .55;
  filter: grayscale(1) brightness(1.5);
  transition: opacity .35s, filter .35s;
}
.clientes:hover .clientes-row img {
  opacity: 1;
  filter: none;
}

/* Article-meta service links */
.article-meta a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-mute);
  text-decoration: none;
  transition: color .2s;
}
.article-meta a::before {
  content: '/';
  color: var(--orange);
  flex-shrink: 0;
}
.article-meta a:hover { color: var(--orange); }
