/* ============================================
   INTELLIS HUMAN STRATEGY — Sitio
   Sistema: Arquitectura de la Certeza
   ============================================ */

:root {
  --ink:        #0A0A0B;
  --ink-soft:   #14141A;
  --bone:       #F2EDE4;
  --bone-soft:  #E8E1D4;
  --paper:      #FAF6EE;
  --green:      #0F3D2E;
  --green-soft: #1B5A45;
  --gold:       #B8924A;
  --gold-soft:  #D4B27C;
  --rule:       rgba(10,10,11,0.12);
  --rule-bone:  rgba(242,237,228,0.18);

  --serif: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --display: 'Fraunces', 'Instrument Serif', Georgia, serif;
  --sans: 'Neue Haas Grotesk Text Pro', 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--bone);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  cursor: none;
}

@media (max-width: 900px) {
  body { cursor: auto; }
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: none; font-family: inherit; }

/* ===== Custom cursor ===== */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--bone);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid var(--bone);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .25s ease, height .25s ease, background .25s ease;
}
.cursor-ring.hover {
  width: 64px; height: 64px;
  background: rgba(184,146,74,0.2);
  border-color: var(--gold-soft);
}
@media (max-width: 900px) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 40px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  mix-blend-mode: difference;
  color: var(--bone);
}
.nav__logo {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.nav__logo-mark {
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.02em;
  text-transform: none;
  font-style: italic;
}
.nav__logo-sub {
  opacity: 0.55;
  font-size: 10px;
}
.nav__menu {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav__menu a {
  position: relative;
  padding: 4px 0;
  transition: opacity .3s;
}
.nav__menu a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: currentColor;
  transition: width .3s ease;
}
.nav__menu a:hover::after { width: 100%; }
.nav__cta {
  border: 1px solid currentColor;
  padding: 10px 18px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background .3s, color .3s;
}
.nav__cta:hover { background: var(--bone); color: var(--ink); }

@media (max-width: 900px) {
  .nav { padding: 16px 20px; }
  .nav__menu { display: none; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 120px 40px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--ink);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: var(--ink);
  --parallax-x: 0px;
  --parallax-y: 0px;
  transform: scale(0.95) translate(var(--parallax-x), var(--parallax-y));
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: ken-burns 22s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes ken-burns {
  0%   { transform: scale(0.95) translate(var(--parallax-x), var(--parallax-y)); }
  50%  { transform: scale(0.97) translate(calc(var(--parallax-x) - 4px), calc(var(--parallax-y) - 2px)); }
  100% { transform: scale(0.95) translate(calc(var(--parallax-x) + 2px), calc(var(--parallax-y) - 4px)); }
}
.hero__bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(95deg,
      rgba(10,10,11,0.78) 0%,
      rgba(10,10,11,0.45) 35%,
      rgba(10,10,11,0.20) 65%,
      rgba(10,10,11,0.55) 100%),
    linear-gradient(180deg,
      rgba(10,10,11,0.5) 0%,
      transparent 25%,
      transparent 70%,
      rgba(10,10,11,0.95) 100%);
}
.hero__bg-light {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(255,180,90,0.18), transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(184,146,74,0.12), transparent 60%);
  mix-blend-mode: screen;
  animation: light-pulse 8s ease-in-out infinite alternate;
}
@keyframes light-pulse {
  0%   { opacity: 0.7; }
  100% { opacity: 1; }
}

.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 1;
  pointer-events: none;
}
.hero__grain {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}
.hero__top, .hero__main, .hero__bottom {
  position: relative;
  z-index: 3;
}
.hero__top {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242,237,228,0.55);
  padding-top: 60px;
}
.hero__top span { display: flex; gap: 12px; align-items: center; }
.hero__top .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hero__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 60px 0;
}
.hero__eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero__eyebrow::before {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--gold-soft);
}
.hero__headline {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(48px, 8.5vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--bone);
  text-wrap: balance;
  max-width: 14ch;
}
.hero__headline em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-soft);
}
.hero__headline .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.hero__headline .word > span {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes rise {
  to { transform: translateY(0); }
}

.hero__sub {
  margin-top: 36px;
  max-width: 50ch;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(242,237,228,0.7);
  font-weight: 300;
}

.hero__bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 24px;
  align-items: end;
  border-top: 1px solid var(--rule-bone);
  padding-top: 28px;
}
.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero__stat-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242,237,228,0.5);
}
.hero__stat-value {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--bone);
}
.hero__stat-value sub {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  vertical-align: top;
  color: var(--gold-soft);
  margin-left: 4px;
}

@media (max-width: 900px) {
  .hero { padding: 100px 20px 40px; }
  .hero__bottom { grid-template-columns: 1fr 1fr; gap: 20px; }
  .hero__sub { font-size: 15px; }
}

/* ===== CTA primary ===== */
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: none;
  position: relative;
  overflow: hidden;
  transition: gap .3s ease;
}
.cta-primary:hover { gap: 20px; }
.cta-primary::after {
  content: '→';
  font-family: var(--display);
  font-size: 16px;
}

/* ===== Section base ===== */
.section {
  padding: 140px 40px;
  position: relative;
}
.section--bone {
  background: var(--bone);
  color: var(--ink);
}
.section--paper {
  background: var(--paper);
  color: var(--ink);
}
.section__head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 80px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 40px;
}
.section--ink .section__head { border-color: var(--rule-bone); }
.section__index {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.5;
}
.section__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(44px, 6vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.section__title em { font-style: italic; color: var(--green); }
.section--ink .section__title em { color: var(--gold-soft); }

@media (max-width: 900px) {
  .section { padding: 90px 20px; }
  .section__head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 50px; }
}

/* ===== About ===== */
.about {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: start;
}
.about__media {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}
.about__media img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  max-height: 620px;
  object-fit: cover;
  display: block;
  transition: transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.about__media:hover img {
  transform: scale(1.04);
}
.about__media-tag {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(10,10,11,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 12px 16px;
  border-left: 2px solid var(--gold);
}
.about__copy {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.about__lead {
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-wrap: balance;
  max-width: 48ch;
}
.about__lead em { font-style: italic; color: var(--green); }
.about__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(10,10,11,0.78);
  max-width: 52ch;
}
.about__body p:first-child::first-letter {
  font-family: inherit;
  font-size: inherit;
  float: none;
  margin: 0;
  color: inherit;
  font-style: normal;
}
.about__pillars {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.about__pillar {
  background: var(--bone);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about__pillar-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--green);
}
.about__pillar-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.about__pillar-text {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(10,10,11,0.7);
}

@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about__pillars { grid-template-columns: 1fr; }
}

/* ===== Services ===== */
.services {
  display: flex;
  flex-direction: column;
}
.service {
  display: grid;
  grid-template-columns: 80px 1fr 2fr 1fr;
  gap: 40px;
  align-items: start;
  padding: 44px 0;
  border-top: 1px solid var(--rule);
  position: relative;
  cursor: none;
  transition: padding .5s cubic-bezier(0.2,0.8,0.2,1);
}
.service:last-child { border-bottom: 1px solid var(--rule); }
.service::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 1px;
  background: var(--green);
  transition: width .8s cubic-bezier(0.2,0.8,0.2,1);
}
.service:hover::before { width: 100%; }
.service:hover {
  padding-left: 16px;
  padding-right: 16px;
}
.service__num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(10,10,11,0.4);
  padding-top: 14px;
}
.service__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.service__title em { font-style: italic; color: var(--green); }
.service__desc {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(10,10,11,0.65);
  max-width: 50ch;
  padding-top: 10px;
}
.service__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
  justify-content: flex-end;
}
.service__tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  color: rgba(10,10,11,0.6);
  border-radius: 999px;
}

@media (max-width: 900px) {
  .service { grid-template-columns: 50px 1fr; gap: 16px; padding: 32px 0; }
  .service__desc, .service__tags { grid-column: 1 / -1; padding-top: 0; }
  .service__tags { justify-content: flex-start; }
}

/* ===== Manifesto strip ===== */
.manifesto {
  background: var(--ink);
  color: var(--bone);
  padding: 180px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.manifesto__bg-dark {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(184,146,74,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 20% 80%, rgba(212,178,124,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 30% 30% at 85% 20%, rgba(212,178,124,0.05) 0%, transparent 70%);
}
.manifesto::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 60px, rgba(212,178,124,0.025) 60px, rgba(212,178,124,0.025) 61px);
  pointer-events: none;
}
.manifesto::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 70px;
  width: 1px;
  height: 50px;
  background: var(--gold);
  opacity: 0.5;
  z-index: 3;
}
.manifesto__content {
  position: relative;
  z-index: 4;
}
.manifesto__quote {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(36px, 5.5vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 22ch;
  margin: 0 auto;
  text-wrap: balance;
}
.manifesto__quote em { font-style: italic; color: var(--gold-soft); }
.manifesto__attr {
  margin-top: 50px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242,237,228,0.5);
}

/* ===== Contact CTA ===== */
.contact-cta {
  background: var(--ink);
  color: var(--bone);
  padding: 160px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  border-top: 1px solid var(--rule-bone);
}
.contact-cta__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.contact-cta__title em { font-style: italic; color: var(--gold-soft); }
.contact-cta__details {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.contact-cta__row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--rule-bone);
  padding-top: 18px;
}
.contact-cta__row span:last-child {
  font-family: var(--sans);
  text-transform: none;
  letter-spacing: 0;
  color: var(--bone);
}

@media (max-width: 900px) {
  .contact-cta { grid-template-columns: 1fr; gap: 40px; padding: 90px 20px; }
}

/* ===== Footer ===== */
.footer {
  background: var(--ink);
  color: var(--bone);
  border-top: 1px solid var(--rule-bone);
  padding: 60px 40px 40px;
}
.footer__bigmark {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(80px, 18vw, 280px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--bone);
  border-bottom: 1px solid var(--rule-bone);
  padding-bottom: 30px;
  margin-bottom: 30px;
}
.footer__row {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242,237,228,0.5);
}
.footer__row a:hover { color: var(--gold-soft); }

@media (max-width: 900px) {
  .footer { padding: 40px 20px 30px; }
  .footer__row { flex-direction: column; gap: 12px; }
}

/* ===== Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.2,0.8,0.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }

/* ===== Marco Normativo Marquee ===== */
.normativo {
  background: var(--ink);
  color: var(--bone);
  border-top: 1px solid var(--rule-bone);
  border-bottom: 1px solid var(--rule-bone);
  padding: 28px 0;
  overflow: hidden;
  position: relative;
}
.normativo__label {
  position: absolute;
  top: 50%;
  left: 40px;
  transform: translateY(-50%);
  z-index: 3;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: var(--ink);
  padding: 8px 16px 8px 0;
}
.normativo__label::after {
  content: '';
  position: absolute;
  right: -40px;
  top: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(90deg, var(--ink), transparent);
}
.normativo__track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: scroll-x 60s linear infinite;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.01em;
  padding-left: 280px;
}
.normativo__track > span {
  flex-shrink: 0;
  padding: 0 32px;
  position: relative;
}
.normativo__track > span::after {
  content: '·';
  color: var(--gold);
  font-size: 32px;
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-55%);
}
.normativo__track > span:last-child::after { content: none; }
@keyframes scroll-x {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== Process diagram ===== */
.process {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.process__step {
  padding: 36px 24px;
  border-right: 1px solid var(--rule);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.process__step:last-child { border-right: none; }
.process__num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--green);
}
.process__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.process__title em { font-style: italic; color: var(--green); }
.process__text {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(10,10,11,0.65);
}
.process__step::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 24px; height: 1px;
  background: var(--green);
}
@media (max-width: 900px) {
  .process { grid-template-columns: 1fr; }
  .process__step { border-right: none; border-bottom: 1px solid var(--rule); }
  .process__step:last-child { border-bottom: none; }
}
