*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: #0C0C0C; }
body {
  font-family: 'Kanit', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #0C0C0C;
  overflow-x: clip;
}
a { color: #D7E2EA; text-decoration: none; }
a:hover { color: #FFFFFF; }
::selection { background: #D7E2EA; color: #0C0C0C; }

.gradient-text {
  background: linear-gradient(180deg, #646973 0%, #BBCCD7 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Reveal-on-scroll */
[data-fade] {
  opacity: 0;
  transition: opacity .8s cubic-bezier(.25,.1,.25,1), transform .8s cubic-bezier(.25,.1,.25,1);
}
[data-fade]:not([data-x]) { transform: translateY(30px); }
[data-fade][data-x="-80"] { transform: translateX(-80px); }
[data-fade][data-x="80"] { transform: translateX(80px); }
[data-fade].is-visible { opacity: 1; transform: none; }

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 14px clamp(24px, 3vw, 42px);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: clamp(0.68rem, 0.9vw, 0.95rem);
  white-space: nowrap;
  text-align: center;
}
.pill-solid { background: #D7E2EA; color: #0C0C0C; }
.pill-solid:hover { background: #FFFFFF; color: #0C0C0C; }
.pill-outline { border: 1px solid rgba(215,226,234,0.4); color: #D7E2EA; }
.pill-outline:hover { background: rgba(215,226,234,0.08); }
.pill-small {
  border-width: 1.5px;
  border-color: #D7E2EA;
  padding: 12px clamp(22px, 2.6vw, 34px);
  font-size: clamp(0.65rem, 0.85vw, 0.9rem);
  align-self: center;
}
.pill-small:hover { background: rgba(215,226,234,0.1); }

.section-title {
  margin: 0;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  line-height: 0.88;
  letter-spacing: -0.03em;
  font-size: clamp(3rem, 11vw, 150px);
}
.section-title-dark { color: #0C0C0C; }

/* ---------- Hero ---------- */
.hero {
  height: 100svh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: clip;
}
.hero-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 26px 24px 0;
  position: relative;
  z-index: 20;
}
.hero-nav .brand {
  color: #D7E2EA;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: clamp(0.7rem, 1vw, 0.95rem);
  white-space: nowrap;
}
.hero-nav-links {
  display: flex;
  gap: clamp(18px, 3vw, 52px);
  align-items: center;
}
.hero-nav-links a {
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: clamp(0.7rem, 1vw, 0.95rem);
}

.hero-title-wrap {
  overflow: hidden;
  padding: 0 18px;
  margin-top: clamp(18px, 3vh, 44px);
  position: relative;
  z-index: 2;
}
.hero-title {
  margin: 0;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.86;
  white-space: nowrap;
  font-size: 15.5vw;
}

.hero-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 0 24px clamp(28px, 4vh, 48px);
  position: relative;
  z-index: 20;
}
.hero-tagline {
  margin: 0;
  color: #D7E2EA;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
  font-size: clamp(0.72rem, 1.3vw, 1.4rem);
  max-width: clamp(170px, 24vw, 300px);
}

.hero-portrait {
  position: absolute;
  left: 50%;
  margin-left: calc(-1 * clamp(150px, 26vw, 300px));
  bottom: 0;
  z-index: 10;
  width: calc(2 * clamp(150px, 26vw, 300px));
  pointer-events: none;
  will-change: transform;
}
.hero-portrait img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 58svh;
  object-fit: contain;
  object-position: bottom center;
  margin: 0 auto;
}

/* ---------- Marquee ---------- */
.marquee {
  background: #0C0C0C;
  padding: clamp(70px, 12vh, 150px) 0 40px;
  overflow: hidden;
}
.marquee-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.marquee-row {
  display: flex;
  gap: 12px;
  will-change: transform;
}
.marquee-tile {
  flex: 0 0 auto;
  width: min(420px, 64vw);
  height: min(270px, 41vw);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(215,226,234,0.08);
  background: #111213;
}
.marquee-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Nosotros ---------- */
.nosotros {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(80px, 12vh, 140px) 20px;
  overflow: hidden;
}
.deco { position: absolute; }
.deco-circle {
  width: clamp(110px, 15vw, 200px);
  height: clamp(110px, 15vw, 200px);
  border-radius: 999px;
  background: radial-gradient(circle at 32% 28%, #2A2F36 0%, #14171A 60%, #0C0C0C 100%);
  filter: blur(0.4px);
}
.deco-tl { top: 6%; left: 3%; }
.deco-square {
  width: clamp(80px, 11vw, 150px);
  height: clamp(80px, 11vw, 150px);
  border-radius: 22px;
  background: linear-gradient(150deg, #22262B 0%, #101315 100%);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.deco-bl { bottom: 10%; left: 8%; }
.deco-ring {
  width: clamp(100px, 13vw, 180px);
  height: clamp(100px, 13vw, 180px);
  border-radius: 999px;
  border: 1px solid rgba(215,226,234,0.14);
  background: radial-gradient(circle at 70% 30%, rgba(215,226,234,0.07) 0%, rgba(12,12,12,0) 70%);
}
.deco-tr { top: 8%; right: 3%; }
.deco-diamond {
  width: clamp(90px, 12vw, 165px);
  height: clamp(90px, 12vw, 165px);
  background: linear-gradient(200deg, #23272C 0%, #0F1113 100%);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
.deco-br { bottom: 9%; right: 7%; }

.nosotros-copy {
  margin: clamp(40px, 6vh, 72px) 0 0;
  color: #D7E2EA;
  font-weight: 400;
  text-align: center;
  line-height: 1.65;
  max-width: 560px;
  font-size: clamp(1rem, 1.9vw, 1.3rem);
  text-wrap: pretty;
}
.nosotros .pill-outline { margin-top: clamp(52px, 8vh, 96px); }

/* ---------- Servicios ---------- */
.servicios {
  background: #FFFFFF;
  border-radius: clamp(40px, 6vw, 60px) clamp(40px, 6vw, 60px) 0 0;
  padding: clamp(80px, 12vh, 130px) 20px clamp(90px, 14vh, 150px);
  position: relative;
  z-index: 2;
}
.servicios .section-title { margin: 0 0 clamp(56px, 9vh, 110px); }

.servicios-list {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.servicio-row {
  display: flex;
  gap: clamp(18px, 4vw, 56px);
  align-items: flex-start;
  padding: clamp(30px, 5vh, 50px) 0;
  border-top: 1px solid rgba(12,12,12,0.15);
}
.servicio-row-last { border-bottom: 1px solid rgba(12,12,12,0.15); }
.servicio-num {
  color: #0C0C0C;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.04em;
  font-size: clamp(2.4rem, 8vw, 120px);
}
.servicio-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: clamp(4px, 1vw, 14px);
}
.servicio-body h3 {
  margin: 0;
  color: #0C0C0C;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(1rem, 2.1vw, 2rem);
}
.servicio-body p {
  margin: 0;
  color: #0C0C0C;
  opacity: 0.6;
  font-weight: 300;
  line-height: 1.6;
  max-width: 620px;
  font-size: clamp(0.85rem, 1.5vw, 1.2rem);
  text-wrap: pretty;
}

/* ---------- Proyectos ---------- */
.proyectos {
  background: #0C0C0C;
  border-radius: clamp(40px, 6vw, 60px) clamp(40px, 6vw, 60px) 0 0;
  margin-top: clamp(-56px, -6vw, -40px);
  padding: clamp(80px, 12vh, 130px) 20px 0;
  position: relative;
  z-index: 10;
}
.proyectos .section-title { margin: 0 0 clamp(40px, 7vh, 80px); }

.proyectos-list { max-width: 1400px; margin: 0 auto; }

.proyecto-card {
  position: sticky;
  top: 24px;
  width: 100%;
  min-height: calc(100svh - 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: clamp(32px, 4.5vw, 56px);
  border: 1.5px solid #D7E2EA;
  background: #0C0C0C;
  padding: clamp(16px, 2.4vw, 32px);
  will-change: transform;
  transform-origin: top center;
}
.proyecto-card[data-project-card="0"] { z-index: 1; }
.proyecto-card[data-project-card="1"] { z-index: 2; }
.proyecto-card[data-project-card="2"] { z-index: 3; }
.proyecto-spacer { height: 65svh; }

.proyecto-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  padding: 0 clamp(4px, 1vw, 14px) clamp(18px, 2.6vw, 30px);
}
.proyecto-head-left {
  display: flex;
  align-items: baseline;
  gap: clamp(14px, 2.4vw, 32px);
}
.proyecto-num {
  color: #D7E2EA;
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.04em;
  font-size: clamp(2.2rem, 6.5vw, 96px);
}
.proyecto-meta { display: flex; flex-direction: column; gap: 6px; }
.proyecto-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(215,226,234,0.45);
}
.proyecto-meta h3 {
  margin: 0;
  color: #D7E2EA;
  font-weight: 500;
  text-transform: uppercase;
  font-size: clamp(1rem, 2.1vw, 1.9rem);
}

.proyecto-media {
  display: flex;
  gap: clamp(10px, 1.6vw, 20px);
}
.proyecto-media-col {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vw, 20px);
}
.proyecto-media-tile {
  border-radius: clamp(28px, 4vw, 48px);
  border: 1px solid rgba(215,226,234,0.1);
  background: #111213;
  overflow: hidden;
}
.proyecto-media-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.proyecto-media-tile-sm { height: clamp(110px, 15vw, 210px); }
.proyecto-media-tile-lg { height: clamp(140px, 20vw, 300px); }
.proyecto-media-tile-tall {
  flex: 1 1 60%;
  min-height: clamp(260px, 36vw, 540px);
}

/* ---------- Contacto ---------- */
.contacto {
  background: #0C0C0C;
  padding: clamp(80px, 14vh, 160px) 20px clamp(40px, 6vh, 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contacto-title {
  margin: 0;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  line-height: 0.88;
  letter-spacing: -0.03em;
  font-size: clamp(2.6rem, 10vw, 140px);
}
.contacto-copy {
  margin: clamp(24px, 4vh, 40px) 0 0;
  color: #D7E2EA;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  font-size: clamp(0.8rem, 1.4vw, 1.1rem);
  max-width: 420px;
}

.footer-row {
  width: 100%;
  max-width: 1400px;
  margin-top: clamp(70px, 12vh, 140px);
  padding-top: 26px;
  border-top: 1px solid rgba(215,226,234,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(215,226,234,0.4);
}
.footer-links { display: flex; gap: 22px; }
