/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #0b0c0d;
  --bg-2:      #131417;
  --bg-3:      #1c1e22;
  --bg-3-hov:  #24272c;
  --cream:     #f2f2f0;
  --cream-2:   #c7c9cc;
  --cream-3:   #86898e;
  --accent:    #e2131c;
  --accent-2:  #a80d14;
  --accent-glow: rgba(226, 19, 28, 0.35);
  --line:      rgba(242, 242, 240, 0.12);
  --line-strong: rgba(242, 242, 240, 0.22);

  --serif: "Oswald", "Arial Narrow", sans-serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

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

  --container: 1180px;
  --nav-h: 76px;
}

@property --mesh-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --mesh-x { syntax: "<percentage>"; inherits: false; initial-value: 30%; }
@property --mesh-y { syntax: "<percentage>"; inherits: false; initial-value: 40%; }

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--cream-2);
  -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; }
ul { list-style: none; padding: 0; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  text-transform: uppercase;
  color: var(--cream);
  text-wrap: balance;
  line-height: 1.02;
  letter-spacing: 0.01em;
  font-weight: 600;
}
::selection { background: var(--accent); color: var(--cream); }

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 720px) { .container { padding-inline: 2rem; } }

.section { padding-block: 4.5rem; position: relative; }
@media (min-width: 960px) { .section { padding-block: 7rem; } }

.section-head { max-width: 640px; margin-bottom: 2.75rem; }
.section-head.is-center { margin-inline: auto; text-align: center; }
.kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.kicker::before {
  content: ""; width: 22px; height: 2px; background: var(--accent);
}
.section-title { font-size: clamp(1.9rem, 4.6vw, 3rem); }
.section-sub {
  margin-top: 1rem; color: var(--cream-3); font-size: 1.05rem; max-width: 52ch;
}
.section-head.is-center .section-sub { margin-inline: auto; }

.accent { color: var(--accent); font-style: normal; }

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 1.7rem;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  letter-spacing: 0.01em;
  border-radius: 3px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background-color .3s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); transition-duration: .12s; }

.btn-primary {
  background: var(--accent); color: var(--cream);
}
.btn-primary:hover {
  background: #ff2530;
  box-shadow: 0 20px 44px -8px var(--accent-glow), 0 8px 20px rgba(0,0,0,0.35);
}

.btn-ghost {
  background: transparent; color: var(--cream);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--cream-2); background: rgba(242,242,240,0.05); }

.btn-icon { width: 1.15em; height: 1.15em; flex: none; }

/* =============================================================
   5. Nav
   ============================================================= */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 500;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 12, 13, 0.88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.nav-inner {
  width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
@media (min-width: 720px) { .nav-inner { padding-inline: 2rem; } }

.brand { display: inline-flex; align-items: center; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 50%;
  transition: transform .4s var(--ease-soft);
}
.brand:hover .brand-logo { transform: scale(1.06); }

.nav-links {
  display: none; align-items: center; gap: 2rem;
}
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-link {
  position: relative; font-size: .92rem; font-weight: 500; padding-block: .3rem;
  color: var(--cream-2);
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav-link:hover { color: var(--cream); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-cta { display: none; }
@media (min-width: 720px) { .nav-cta { display: inline-flex; padding: .7rem 1.3rem; font-size: .88rem; } }

.nav-toggle {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--line-strong); border-radius: 4px;
}
@media (min-width: 960px) { .nav-toggle { display: none; } }
.nav-toggle-bars { position: relative; width: 18px; height: 12px; }
.nav-toggle-bars span {
  position: absolute; left: 0; right: 0; height: 2px; background: var(--cream);
  transition: transform .3s var(--ease-out), opacity .3s;
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 5px; }
.nav-toggle-bars span:nth-child(3) { top: 10px; }
[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 400;
  background: var(--bg); padding-top: var(--nav-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.2rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-soft);
}
html.nav-open .nav-mobile { clip-path: inset(0); }
.nav-mobile a {
  font-family: var(--serif); font-size: 2rem; text-transform: uppercase; color: var(--cream);
}
.nav-mobile .btn { margin-top: 1rem; }

/* =============================================================
   6. Splash
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .8s, clip-path 1s;
  animation: splashSafety .01s 3.2s forwards;
}
.splash-logo {
  width: 120px; height: 120px; border-radius: 50%;
  display: block; margin-inline: auto;
  animation: splashPulse 2.4s var(--ease-soft) infinite;
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.04); opacity: .92; }
}
.splash-line {
  display: block; width: 120px; height: 2px; margin: 1.4rem auto 0; background: var(--line);
  position: relative; overflow: hidden;
}
.splash-line::after {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  transform: translateX(-100%);
  animation: splashBar 1.1s var(--ease-soft) infinite;
}
@keyframes splashBar { to { transform: translateX(100%); } }
.splash.is-out { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); } }

/* =============================================================
   7. Hero
   ============================================================= */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh; min-height: 100vh;
  display: flex; align-items: center;
  padding-block: calc(var(--nav-h) + 2.5rem) 4rem;
}
.hero-bg { position: absolute; inset: 0; z-index: -3; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 65%; }
.hero-bg-tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,12,13,0.86) 0%, rgba(11,12,13,0.72) 40%, rgba(11,12,13,0.94) 100%),
    linear-gradient(90deg, rgba(11,12,13,0.55) 0%, transparent 55%);
}
.hero-mesh {
  position: absolute; inset: -10%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(45% 40% at var(--mesh-x) var(--mesh-y), rgba(226,19,28,0.4), transparent 65%),
    conic-gradient(from var(--mesh-angle), rgba(226,19,28,0.16), transparent 30%, rgba(168,13,20,0.18), transparent 70%);
  filter: blur(90px) saturate(130%);
  opacity: .8;
  animation: meshShift 24s linear infinite;
  mix-blend-mode: screen;
}
@keyframes meshShift {
  0%   { --mesh-angle: 0deg;   --mesh-x: 25%; --mesh-y: 35%; }
  50%  { --mesh-angle: 180deg; --mesh-x: 68%; --mesh-y: 55%; }
  100% { --mesh-angle: 360deg; --mesh-x: 25%; --mesh-y: 35%; }
}
.hero-grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.12; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

.hero-inner { max-width: 760px; }
.hero-title {
  font-size: clamp(2.6rem, 7.4vw, 5.2rem);
  line-height: .96;
  color: var(--cream);
}
.hero-title .accent { display: inline-block; }
.hero-sub {
  margin-top: 1.5rem; font-size: 1.15rem; color: var(--cream-2); max-width: 46ch;
}
.hero-actions { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-trust {
  margin-top: 3.2rem; display: grid; gap: 1.6rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .hero-trust { grid-template-columns: repeat(4, auto); } }
.hero-trust-item { display: flex; flex-direction: column; gap: .2rem; }
.hero-trust-num {
  font-family: var(--serif); font-size: 2.1rem; color: var(--cream); line-height: 1;
}
.hero-trust-num .accent { font-size: 1.3rem; vertical-align: top; }
.hero-trust-label {
  font-size: .78rem; letter-spacing: 0.04em; color: var(--cream-3); max-width: 14ch;
}

/* =============================================================
   8. Marquee ticker
   ============================================================= */
.marquee-wrap {
  position: relative; overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  padding-block: 1.1rem;
}
.marquee-wrap::before, .marquee-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none;
}
.marquee-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg-2), transparent); }
.marquee-wrap::after { right: 0; background: linear-gradient(270deg, var(--bg-2), transparent); }
.marquee-track {
  display: flex; width: max-content;
  animation: marqueeScroll 32s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .marquee-track { animation-duration: 70s; } }
.marquee-group { display: flex; align-items: center; flex: none; }
.marquee-item {
  font-family: var(--serif); text-transform: uppercase; font-size: 1.05rem;
  color: var(--cream-2); letter-spacing: 0.02em; padding-inline: 1.5rem; white-space: nowrap;
}
.marquee-dot { color: var(--accent); padding-inline: .2rem; }
@keyframes marqueeScroll { to { transform: translateX(-50%); } }

/* =============================================================
   9. Services grid
   ============================================================= */
.services-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.service-card {
  --rx: 0deg; --ry: 0deg;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.8rem 1.6rem;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .55s var(--ease-soft), border-color .3s, background-color .3s;
}
.service-card:hover {
  transition-duration: .15s;
  border-color: rgba(226,19,28,0.4);
  background: var(--bg-3-hov);
  box-shadow: 0 30px 60px -25px var(--accent-glow);
}
.service-icon {
  width: 42px; height: 42px; color: var(--accent);
  margin-bottom: 1.2rem;
}
.service-icon svg { width: 100%; height: 100%; }
.service-title { font-size: 1.15rem; margin-bottom: .5rem; }
.service-desc { font-size: .92rem; color: var(--cream-3); line-height: 1.55; }

/* =============================================================
   10. Steps (cómo trabajamos)
   ============================================================= */
.steps {
  display: grid; gap: 2.2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-top: 2.6rem; border-top: 1px solid var(--line); }
.step-num {
  font-family: var(--serif); font-size: 3rem; color: var(--accent);
  position: absolute; top: -.3rem; left: 0; opacity: .9;
}
.step-title { font-size: 1.25rem; margin-top: 1.6rem; margin-bottom: .7rem; }
.step-desc { color: var(--cream-3); font-size: .95rem; }

/* =============================================================
   11. Gallery
   ============================================================= */
.gallery-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-card {
  --rx: 0deg; --ry: 0deg;
  position: relative; overflow: hidden; border-radius: 6px;
  aspect-ratio: 4 / 5;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .55s var(--ease-soft);
  border: 1px solid var(--line);
}
.gallery-card:hover { transition-duration: .15s; }
.gallery-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease-soft), filter .55s;
}
.gallery-card:hover img { transform: scale(1.08); filter: saturate(1.15) brightness(1.03); }
.gallery-caption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 1.2rem 1.1rem 1rem;
  background: linear-gradient(0deg, rgba(11,12,13,0.92), transparent);
  font-size: .88rem; color: var(--cream-2);
}

/* =============================================================
   12. Team
   ============================================================= */
.team {
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) { .team { grid-template-columns: 5fr 6fr; gap: 4rem; } }
.team-figure {
  border-radius: 6px; overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 5 / 4;
}
.team-figure img { width: 100%; height: 100%; object-fit: cover; }
.team-names { margin-top: 1.6rem; display: flex; gap: 1.6rem; flex-wrap: wrap; }
.team-name-tag { font-family: var(--serif); font-size: 1.2rem; color: var(--cream); text-transform: uppercase; }
.team-name-tag span { display: block; font-family: var(--sans); text-transform: none; font-size: .8rem; color: var(--cream-3); letter-spacing: 0; margin-top: .1rem; }

/* =============================================================
   13. Contact / location
   ============================================================= */
.contact-grid {
  display: grid; gap: 2.2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) { .contact-grid { grid-template-columns: 5fr 7fr; gap: 3rem; } }
.contact-card {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px;
  padding: 2.2rem;
}
.contact-row { display: flex; gap: 1rem; padding-block: 1rem; border-top: 1px solid var(--line); }
.contact-row:first-of-type { border-top: none; padding-top: 0; }
.contact-row-icon { width: 22px; height: 22px; color: var(--accent); flex: none; margin-top: .1rem; }
.contact-row-icon svg { width: 100%; height: 100%; }
.contact-row-label { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--cream-3); margin-bottom: .25rem; }
.contact-row-value { color: var(--cream); font-size: 1rem; }
.contact-row-value a:hover { color: var(--accent); }
.contact-socials { display: flex; gap: .8rem; margin-top: 1.6rem; }
.social-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 4px; color: var(--cream);
  transition: border-color .3s, color .3s, transform .3s var(--ease-soft);
}
.social-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.social-btn svg { width: 19px; height: 19px; }

.map-frame {
  border-radius: 6px; overflow: hidden; border: 1px solid var(--line);
  min-height: 340px; filter: grayscale(0.4) contrast(1.05) brightness(0.85);
}
.map-frame iframe { width: 100%; height: 100%; min-height: 340px; border: 0; }

/* =============================================================
   14. Footer
   ============================================================= */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 2.6rem;
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem;
}
.footer-note { font-size: .82rem; color: var(--cream-3); }
.footer-links { display: flex; gap: 1.4rem; }
.footer-links a { font-size: .85rem; color: var(--cream-3); }
.footer-links a:hover { color: var(--cream); }

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

/* =============================================================
   16. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-mesh { animation-duration: 60s; }
  .splash-line::after { animation: none; }
}

/* =============================================================
   17. Whatsapp floating button
   ============================================================= */
.wa-float {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 300;
  width: 58px; height: 58px; border-radius: 50%;
  background: #22c55e; color: #06210f;
  display: grid; place-items: center;
  box-shadow: 0 14px 30px rgba(0,0,0,0.4);
  transition: transform .4s var(--ease-bounce);
}
.wa-float:hover { transform: scale(1.08) translateY(-2px); }
.wa-float svg { width: 28px; height: 28px; }
