/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #ffffff;
  --bg-alt: #f3f2ef;
  --ink: #0a0a0a;
  --ink-soft: #2b2b2b;
  --ink-mute: #63615c;
  --accent: #b3242e;
  --accent-dark: #8c1c24;
  --line: rgba(10, 10, 10, 0.14);
  --line-strong: rgba(10, 10, 10, 0.9);
  --cream: #f3f2ef;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", monospace;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --gutter: 1.25rem;
  --container-max: 1360px;
  --nav-h: 92px;
}

@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1; letter-spacing: -0.01em; font-family: var(--display); font-weight: 800; }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.1rem; background: var(--ink); color: var(--bg);
  z-index: 9999; font-weight: 600; font-size: .9rem;
  transition: top .25s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 720px) { .grid-12 { padding-inline: 2rem; } }
@media (min-width: 1280px) { .grid-12 { padding-inline: 2.5rem; } }

[class*="col-span-"] { grid-column: span 12; }
@media (min-width: 960px) {
  .col-span-1 { grid-column: span 1; }
  .col-span-3 { grid-column: span 3; }
  .col-span-4 { grid-column: span 4; }
  .col-span-5 { grid-column: span 5; }
  .col-span-6 { grid-column: span 6; }
  .col-span-7 { grid-column: span 7; }
  .col-span-12 { grid-column: span 12; }
}

.section { padding-block: 5.5rem; }
.section-alt { background: var(--bg-alt); }
@media (min-width: 960px) { .section { padding-block: 8rem; } }

.section-head { margin-bottom: 3rem; max-width: 62ch; }
.section-head--tight { margin-bottom: 2rem; }
.section-kicker {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: .9rem;
}
.section-title {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  text-transform: uppercase;
}
.section-sub {
  margin-top: 1rem;
  color: var(--ink-mute);
  font-size: 1.05rem;
  max-width: 56ch;
}

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .95rem 1.6rem;
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid var(--ink);
  transition: transform .4s var(--ease-soft), background-color .3s var(--ease-out), color .3s var(--ease-out), box-shadow .4s var(--ease-soft);
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 16px 30px -12px rgba(179, 36, 46, 0.45);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-3px);
}
.btn-ghost-inv {
  background: transparent;
  color: var(--bg);
  border-color: var(--bg);
}
.btn-ghost-inv:hover {
  background: var(--bg);
  color: var(--ink);
  transform: translateY(-3px);
}
.btn-whatsapp {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
  margin-top: .5rem;
}
.btn-whatsapp:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-3px);
}
.btn:active { transform: translateY(-1px); transition-duration: .12s; }

/* =============================================================
   5. Nav
   ============================================================= */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .35s var(--ease-out);
}
.nav.is-scrolled { box-shadow: 0 8px 24px -18px rgba(0,0,0,0.35); }
.nav-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
@media (min-width: 720px) { .nav-inner { padding-inline: 2rem; } }
@media (min-width: 1280px) { .nav-inner { padding-inline: 2.5rem; } }
.nav-logo img { height: 56px; width: auto; }
@media (min-width: 720px) { .nav-logo img { height: 64px; } }
.nav-links { display: none; gap: 2rem; }
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-link {
  position: relative;
  font-family: var(--mono);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding-block: .3rem;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; }
@media (min-width: 960px) { .nav-cta { display: inline-flex; } }

.nav-burger {
  display: grid; gap: 5px; width: 30px; height: 20px; align-content: center;
}
@media (min-width: 960px) { .nav-burger { display: none; } }
.nav-burger span { display: block; height: 2px; background: var(--ink); transition: transform .35s var(--ease-soft), opacity .3s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 190;
  background: var(--ink); color: var(--bg);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 1.4rem; padding: 2rem 1.5rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-soft);
}
.nav-mobile[aria-hidden="false"] { clip-path: inset(0 0 0 0); }
.nav-mobile-link {
  font-family: var(--display);
  font-size: 2rem;
  text-transform: uppercase;
}
.nav-mobile-cta { margin-top: 1rem; border-color: var(--bg); color: var(--bg); }
@media (min-width: 960px) { .nav-mobile { display: none; } }

.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: 300; background: transparent; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; background: var(--accent);
  transform-origin: 0 0; transform: scaleX(0);
}

/* =============================================================
   6. Hero
   ============================================================= */
.hero { padding-top: calc(var(--nav-h) + 3rem); }
.hero-grid { align-items: center; }
.hero-col-text { padding-block: 2rem; }
.kicker {
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}
.hero-title {
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  text-transform: uppercase;
  max-width: 14ch;
}
.hero-sub {
  margin-top: 1.6rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero-actions {
  margin-top: 2.2rem;
  display: flex; flex-wrap: wrap; gap: 1rem;
}
.hero-col-img { margin-top: 2.5rem; }
@media (min-width: 960px) { .hero-col-img { margin-top: 0; } }
.hero-frame {
  border: 1px solid var(--line-strong);
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
@media (min-width: 960px) { .hero-frame { aspect-ratio: 3 / 4; } }
.hero-frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease-soft);
}
.hero-frame:hover img { transform: scale(1.06); }
.hero-frame figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(10,10,10,0.82); color: var(--bg);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .02em;
  padding: .7rem .9rem;
}

.stats-strip {
  margin-top: 4rem;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding-block: 1.8rem;
}
.stat-cell {
  display: flex; flex-direction: column; gap: .4rem;
  padding-block: .5rem;
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}
.stat-cell:first-child { border-left: none; padding-left: 0; }
.stat-num {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--ink);
}
.stat-num--text { font-size: clamp(1.1rem, 2vw, 1.4rem); }
.stat-label {
  font-size: .82rem;
  color: var(--ink-mute);
  max-width: 22ch;
}

/* =============================================================
   7. About / panorama
   ============================================================= */
.about-text p { color: var(--ink-soft); font-size: 1.05rem; }
.panorama {
  margin-top: 4rem;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.panorama img { width: 100%; height: clamp(220px, 32vw, 380px); object-fit: cover; }

/* =============================================================
   8. Mision / Vision
   ============================================================= */
.mv-card {
  padding: 2.2rem;
  border: 1px solid var(--line-strong);
  background: var(--bg);
}
.mv-num {
  font-family: var(--mono); color: var(--accent); font-size: .9rem;
  display: block; margin-bottom: 1rem;
}
.mv-title { font-size: 1.6rem; text-transform: uppercase; margin-bottom: 1rem; }
.mv-card p { color: var(--ink-soft); }

/* =============================================================
   9. Valores
   ============================================================= */
.valores-grid {
  margin-top: 0;
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
.value-card {
  background: var(--bg);
  padding: 2.2rem 1.8rem;
  transition: background-color .4s var(--ease-out), color .4s var(--ease-out);
}
.value-card:hover { background: var(--ink); color: var(--bg); }
.value-card:hover .value-num { color: var(--accent); }
.value-num {
  font-family: var(--mono); font-size: .85rem; color: var(--accent);
  display: block; margin-bottom: 1.2rem;
}
.value-card h3 { font-size: 1.5rem; text-transform: uppercase; margin-bottom: .8rem; }
.value-card p { color: var(--ink-mute); font-size: .95rem; }
.value-card:hover p { color: rgba(243,242,239,0.75); }
.value-card--cta {
  background: var(--ink); color: var(--bg);
  display: flex; flex-direction: column; justify-content: center; gap: 1.2rem;
}
.value-cta-text { font-family: var(--display); font-size: 1.6rem; text-transform: uppercase; }

/* =============================================================
   10. Servicios
   ============================================================= */
.services-list { margin-top: 1rem; }
.service-row {
  border-top: 1px solid var(--line-strong);
  padding-block: 3rem;
}
.service-row:last-child { border-bottom: 1px solid var(--line-strong); }
.service-n {
  font-family: var(--mono); font-weight: 600; color: var(--accent);
  font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1;
  margin-bottom: 1rem;
}
@media (min-width: 960px) { .service-n { margin-bottom: 0; } }
.service-text h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.service-text p { color: var(--ink-soft); max-width: 42ch; }
.service-img { margin-top: 1.6rem; }
@media (min-width: 960px) { .service-img { margin-top: 0; } }
.service-img img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  filter: saturate(1.02);
  transition: transform 1s var(--ease-soft), filter .5s;
}
.service-row:hover .service-img img { transform: scale(1.04); filter: saturate(1.12) contrast(1.03); }

/* =============================================================
   11. Proyectos
   ============================================================= */
.projects-grid {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
@media (min-width: 720px) { .projects-grid { grid-template-columns: repeat(2, 1fr); padding-inline: 2rem; } }
@media (min-width: 1280px) { .projects-grid { grid-template-columns: repeat(4, 1fr); padding-inline: 2.5rem; } }

.project-card { background: var(--bg); display: flex; flex-direction: column; }
.project-img { aspect-ratio: 4/3; overflow: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-soft), filter .5s; }
.project-card:hover .project-img img { transform: scale(1.08); filter: saturate(1.1); }
.project-body { padding: 1.6rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.project-n { font-family: var(--mono); color: var(--accent); font-size: .8rem; }
.project-body h3 { font-size: 1.15rem; text-transform: uppercase; line-height: 1.15; }
.project-client { font-family: var(--mono); font-size: .75rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .03em; }
.project-body p:not(.project-client) { color: var(--ink-soft); font-size: .9rem; }

.project-card--cta { background: var(--ink); color: var(--bg); }
.project-body--cta { justify-content: center; height: 100%; gap: 1rem; }
.project-body--cta h3 { font-size: 1.4rem; }
.project-body--cta p { color: rgba(243,242,239,0.7) !important; }
.project-body--cta .btn { align-self: flex-start; margin-top: .5rem; }

/* =============================================================
   12. Clientes / marquee
   ============================================================= */
.section-clients { background: var(--ink); color: var(--bg); overflow: hidden; }
.section-clients .section-kicker { color: var(--accent); }
.section-clients .section-title { color: var(--bg); }
.marquee { overflow: hidden; position: relative; margin-top: 1rem; border-top: 1px solid rgba(243,242,239,0.2); border-bottom: 1px solid rgba(243,242,239,0.2); padding-block: 1.6rem; }
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--ink), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--ink), transparent); }
.marquee-inner {
  display: flex; width: max-content;
  animation: marqueeScroll 34s linear infinite;
}
.marquee-track {
  display: flex; gap: 2.5rem; white-space: nowrap; will-change: transform;
  font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2.2rem); text-transform: uppercase;
  padding-right: 2.5rem;
}
.marquee-track span[aria-hidden] { color: var(--accent); }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.section-clients:hover .marquee-inner { animation-play-state: paused; }
.clients-note {
  max-width: var(--container-max); margin-inline: auto; padding-inline: 1.25rem;
  margin-top: 1.6rem; color: rgba(243,242,239,0.65); font-size: .95rem;
}
@media (min-width: 720px) { .clients-note { padding-inline: 2rem; } }

/* =============================================================
   13. Contacto
   ============================================================= */
.section-contact { position: relative; }
.contact-grid { margin-top: 1rem; }
.section-sub--center { margin-inline: auto; text-align: center; }
.contact-block { margin-bottom: 1.8rem; display: flex; flex-direction: column; gap: .3rem; }
.contact-label {
  font-family: var(--mono); font-size: .75rem; text-transform: uppercase;
  color: var(--ink-mute); letter-spacing: .05em; margin-bottom: .3rem;
}
.contact-block a { font-size: 1.15rem; width: fit-content; border-bottom: 1px solid transparent; transition: border-color .3s, color .3s; }
.contact-block a:hover { border-color: var(--accent); color: var(--accent); }
.contact-block p { color: var(--ink-soft); }

.contact-info--centered {
  max-width: 440px; margin-inline: auto; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.contact-info--centered .contact-block { align-items: center; }
.contact-info--centered .contact-block a { width: auto; }

/* =============================================================
   14. Footer
   ============================================================= */
.footer { background: var(--ink); color: var(--bg); padding-block: 4.5rem 2rem; }
.footer-brand img { background: var(--bg); padding: .6rem .9rem; margin-bottom: 1.2rem; }
.footer-brand p { color: rgba(243,242,239,0.7); font-size: .9rem; margin-top: .3rem; }
.footer-legal { font-family: var(--mono); font-size: .78rem !important; }
.footer-heading {
  display: block; font-family: var(--mono); font-size: .75rem; text-transform: uppercase;
  color: var(--accent); letter-spacing: .06em; margin-bottom: 1.1rem;
}
.footer-nav, .footer-contact { display: flex; flex-direction: column; gap: .7rem; margin-top: 2.5rem; }
@media (min-width: 960px) { .footer-nav, .footer-contact { margin-top: 0; } }
.footer-nav a, .footer-contact a { color: rgba(243,242,239,0.85); width: fit-content; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--container-max); margin-inline: auto; padding-inline: 1.25rem;
  margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(243,242,239,0.15);
  font-size: .8rem; color: rgba(243,242,239,0.5);
}
@media (min-width: 720px) { .footer-bottom { padding-inline: 2rem; } }

/* =============================================================
   15. Reveal / split-text effects
   ============================================================= */
[data-reveal] {
  opacity: 0; transform: translateY(32px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
[data-reveal][data-split] { opacity: 1; transform: none; }

[data-reveal-mask] {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease-soft);
}
[data-reveal-mask].is-revealed { clip-path: inset(0); }

.split-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease-soft), transform .7s var(--ease-soft);
}
.split-word.is-in { opacity: 1; transform: none; }

/* =============================================================
   16. Responsive tweaks
   ============================================================= */
@media (max-width: 959px) {
  .stats-strip .grid-12 { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
  .stat-cell { grid-column: span 1 !important; border-left: none; padding-left: 0; }
  .stat-cell:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 1rem; }
  .valores-grid { grid-template-columns: 1fr; }
  .value-card { grid-column: span 12 !important; }
}
@media (min-width: 720px) and (max-width: 959px) {
  .valores-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
  .value-card { grid-column: span 1 !important; }
}

/* =============================================================
   17. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-inner { animation-duration: 90s !important; }
}
