:root {
  --bg: #fbfbfc;
  --surface: #ffffff;
  --surface-alt: #f3f4f6;
  --text: #18181b;
  --muted: #5f6368;
  --line: rgba(24, 24, 27, 0.1);
  --brand: #b10f1a;
  --brand-dark: #8f0b14;
  --brand-soft: rgba(177, 15, 26, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px rgba(0,0,0,.06);
  --shadow-hover: 0 2px 6px rgba(0,0,0,.05), 0 20px 50px rgba(0,0,0,.1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --header-h: 72px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 100%;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
p, h1, h2, h3, h4 { overflow-wrap: break-word; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 0.75em; font-weight: 650; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button, a, [role="button"] { touch-action: manipulation; }
.container { width: min(1200px, calc(100% - 2rem)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--surface-alt); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.section-title { font-size: clamp(2rem, 4vw, 3.25rem); margin-bottom: 1rem; }
.section-lead { font-size: 1.125rem; color: var(--muted); max-width: 42rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,251,252,0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(24,24,27,0.06);
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); backdrop-filter: none; }
}
.nav {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { width: 154px; height: 37px; }
.menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; background: transparent; color: var(--text);
  border-radius: 10px; cursor: pointer; padding: 0;
}
.menu-btn:active { background: rgba(0,0,0,.06); }
.menu-btn svg { width: 24px; height: 24px; }
.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-links a {
  display: block; padding: .625rem .875rem; font-size: .9375rem; font-weight: 550;
  color: var(--text); border-radius: 10px; transition: background 160ms var(--ease-out), color 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { background: rgba(0,0,0,.05); color: var(--text); }
}
.nav-links a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
.nav-links .nav-cta {
  margin-left: .5rem; padding: .625rem 1rem; background: var(--brand); color: #fff;
}
.nav-links .nav-cta[aria-current="page"] { background: var(--brand-dark); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .nav-links .nav-cta:hover { background: var(--brand-dark); color: #fff; }
}
.nav-cta:active { transform: scale(0.98); }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: calc(100% + 1px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .25rem;
    padding: 1rem; background: rgba(251,251,252,.96);
    backdrop-filter: blur(20px); border-bottom: 1px solid var(--line);
  }
  @media (prefers-reduced-transparency: reduce) { .nav-links { background: var(--bg); backdrop-filter: none; } }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .875rem 1rem; }
  .nav-links .nav-cta { margin-left: 0; margin-top: .25rem; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .875rem 1.25rem; font-size: .9375rem; font-weight: 600; line-height: 1;
  border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  transition: background 160ms var(--ease-out), transform 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out);
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--brand); color: #fff; }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: var(--brand-dark); color: #fff; } }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--line); }
@media (hover: hover) and (pointer: fine) { .btn-secondary:hover { background: #f9f9fa; border-color: rgba(0,0,0,.15); color: var(--text); } }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Hero */
.hero {
  position: relative; min-height: min(78svh, 760px); display: flex; align-items: end;
  padding: clamp(3rem, 8vw, 6rem) 0; overflow: clip; background: #111;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .55;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.25) 45%, rgba(0,0,0,.35) 100%);
}
.hero-content { position: relative; z-index: 1; max-width: 760px; }
.hero .eyebrow { color: #fff; opacity: .85; }
.hero .eyebrow::before { background: rgba(255,255,255,.6); }
.hero h1 {
  font-size: clamp(2.75rem, 7vw, 5.5rem); line-height: 0.98; letter-spacing: -0.04em;
  color: #fff; margin-bottom: 1.25rem; max-width: 11ch;
}
.hero p { font-size: clamp(1rem, 2vw, 1.25rem); color: rgba(255,255,255,.88); max-width: 38rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero .btn-secondary { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.2); backdrop-filter: blur(8px); }
@media (hover: hover) and (pointer: fine) { .hero .btn-secondary:hover { background: rgba(255,255,255,.2); color: #fff; } }

/* Page hero */
.page-hero {
  position: relative; min-height: min(42svh, 420px); display: flex; align-items: end;
  padding: clamp(2.5rem, 6vw, 4rem) 0; overflow: clip; background: #18181b;
}
.page-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,.15) 60%, rgba(0,0,0,.25) 100%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); color: #fff; margin: 0; letter-spacing: -0.035em; }
.page-hero p { color: rgba(255,255,255,.85); font-size: 1.125rem; margin: .75rem 0 0; max-width: 38rem; }

/* Cards */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border-radius: var(--radius); overflow: clip;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
}
.card-media { aspect-ratio: 4/3; overflow: hidden; background: var(--surface-alt); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .card:hover .card-media img { transform: scale(1.02); } }
@media (prefers-reduced-motion: reduce) { .card-media img { transition: none; } }
.card-body { padding: 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-body h2, .card-body h3 { font-size: 1.375rem; margin: 0; letter-spacing: -0.02em; }
.card-body p { color: var(--muted); margin: 0; flex: 1; }
.card-body .btn { margin-top: 1rem; align-self: flex-start; }

/* Feature cards (empresa) */
.feature-card .card-media { aspect-ratio: 3/2; }

/* Clients */
.clients-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem;
}
@media (max-width: 980px) { .clients-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .clients-grid { grid-template-columns: repeat(3, 1fr); gap: .75rem; } }
.client-logo {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: .75rem; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1; overflow: hidden;
}
.client-logo img { width: 100%; height: 100%; object-fit: contain; }

/* Gallery */
.gallery-section { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.gallery-section + .gallery-section { border-top: 1px solid var(--line); }
.gallery-header { margin-bottom: 1.5rem; }
.gallery-header h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem;
}
.gallery-item {
  display: block; border-radius: 14px; overflow: hidden; background: var(--surface-alt);
  border: 1px solid var(--line); cursor: zoom-in; padding: 0; width: 100%;
  aspect-ratio: 3/4;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 300ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .gallery-item:hover img { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .gallery-item img { transition: none; } }
.gallery-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.gallery-grid--natural {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  gap: 1rem;
}
.gallery-grid--natural .gallery-item {
  aspect-ratio: 3 / 2;
  height: auto;
  background: var(--surface-alt);
}
.gallery-grid--natural .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-grid--natural .gallery-item:nth-child(6n + 1) {
  grid-column: span 2;
  grid-row: span 2;
}
.gallery-grid--natural .gallery-item:nth-child(6n + 5) {
  grid-column: span 2;
}
@media (max-width: 980px) {
  .gallery-grid--natural { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid--natural .gallery-item:nth-child(6n + 1),
  .gallery-grid--natural .gallery-item:nth-child(6n + 5) { grid-column: span 2; grid-row: span 1; }
  .gallery-grid--natural .gallery-item:nth-child(6n + 1) { grid-row: span 2; }
}
@media (max-width: 640px) {
  .gallery-grid--natural { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid--natural .gallery-item:nth-child(6n + 1) { grid-column: span 2; grid-row: span 1; aspect-ratio: 16 / 10; }
  .gallery-grid--natural .gallery-item:nth-child(6n + 5) { grid-column: span 2; }
}
@media (hover: hover) and (pointer: fine) {
  .gallery-grid--natural .gallery-item:hover img { transform: scale(1.02); }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.92); padding: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 220ms cubic-bezier(0.23, 1, 0.32, 1), visibility 0s linear 220ms;
}
.lightbox.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity 220ms cubic-bezier(0.23, 1, 0.32, 1), visibility 0s linear 0s;
}
.lightbox img { max-width: min(100%, 1100px); max-height: calc(100dvh - 3rem); width: auto; height: auto; border-radius: 4px; transform: scale(0.97); transition: transform 260ms cubic-bezier(0.23, 1, 0.32, 1); }
.lightbox.open img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: .75rem; right: .75rem;
  width: 44px; height: 44px; border: 0; background: rgba(255,255,255,.1); color: #fff;
  font-size: 1.75rem; line-height: 1; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,.18); }

/* Catalog */
.catalog-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 760px) { .catalog-layout { grid-template-columns: 1fr; } }
.catalog-image { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.catalog-image img { width: 100%; height: auto; }
.catalog-copy p { font-size: 1.0625rem; color: var(--muted); margin-bottom: 1.5rem; max-width: 36rem; }

/* Footer */
.site-footer { background: #141416; color: #f4f4f5; padding: clamp(3rem, 6vw, 5rem) 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 2.5rem;
  padding-bottom: 3rem;
}
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-media { grid-column: span 2; } }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } .footer-media { grid-column: auto; } }
.site-footer h2 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 1rem; color: #fff; }
.site-footer p, .site-footer li { color: rgba(244,244,245,.72); font-size: .9375rem; line-height: 1.7; }
.site-footer a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .site-footer a:hover { text-decoration-color: rgba(255,255,255,.8); } }
.footer-contact li { display: flex; gap: .625rem; margin-bottom: .875rem; }
.footer-contact li:last-child { margin-bottom: 0; }
.footer-contact .fi { font-size: 1rem; color: rgba(255,255,255,.5); flex-shrink: 0; margin-top: .15rem; width: 1rem; text-align: center; }
.footer-media { display: grid; gap: 1rem; }
.footer-media iframe { width: 100%; max-width: 100%; border: 0; border-radius: 12px; background: #222; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.25rem 0; padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
}
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-bottom img { height: 40px; width: auto; opacity: .9; }
.footer-bottom a[aria-label="Iativa"] img { height: 28px; }

/* Utility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Animations - subtle, purposeful, reduced-motion aware */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-content > * {
  opacity: 0;
  animation: fade-up 500ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
.hero-content > :nth-child(1) { animation-delay: 60ms; }
.hero-content > :nth-child(2) { animation-delay: 140ms; }
.hero-content > :nth-child(3) { animation-delay: 220ms; }
.hero-content > :nth-child(4) { animation-delay: 300ms; }

.page-hero .container > * {
  opacity: 0;
  animation: fade-up 450ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
.page-hero .container > :nth-child(1) { animation-delay: 40ms; }
.page-hero .container > :nth-child(2) { animation-delay: 120ms; }
.page-hero .container > :nth-child(3) { animation-delay: 200ms; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 480ms cubic-bezier(0.23, 1, 0.32, 1), transform 480ms cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .client-logo {
    transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1), border-color 180ms ease;
  }
  .client-logo:hover {
    transform: translateY(-2px);
    border-color: rgba(24,24,27,0.18);
  }
}


@media (prefers-reduced-motion: reduce) {
  .hero-content > *,
  .page-hero .container > * {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .lightbox, .lightbox img, .client-logo {
    transition: none !important;
    transform: none !important;
  }
}
