/* COMEX One — Design tokens & global styles */
:root {
  /* Colors */
  --carbon: #0A0B0C;
  --ink: #14181C;
  --petrol: #0E2A33;
  --petrol-2: #143942;
  --steel: #2A3138;
  --line: #E5E7E8;
  --line-2: #D6D9DC;
  --mist: #F4F5F6;
  --paper: #FAFAFA;
  --white: #FFFFFF;

  --text: #0A0B0C;
  --text-2: #3A4148;
  --text-3: #6B7177;
  --text-inv: #F4F5F6;
  --text-inv-2: #A6ADB3;

  --accent: #D8442C;        /* bermellón industrial */
  --accent-hot: #E85D2A;
  --accent-soft: rgba(216,68,44,.10);

  /* Type */
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --container: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-1: 0 1px 2px rgba(10,11,12,.04), 0 2px 6px rgba(10,11,12,.04);
  --shadow-2: 0 8px 24px -8px rgba(10,11,12,.10), 0 2px 8px rgba(10,11,12,.06);
  --shadow-3: 0 24px 48px -16px rgba(10,11,12,.18), 0 8px 16px -4px rgba(10,11,12,.08);
  --shadow-accent: 0 16px 40px -12px rgba(216,68,44,.35);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
html { scroll-behavior: auto; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01','cv11';
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ====== Typography ====== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}
.eyebrow.on-dark { color: var(--text-inv-2); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.h1 { font-size: clamp(40px, 5.6vw, 84px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 600; }
.h2 { font-size: clamp(32px, 3.6vw, 56px); line-height: 1.05; letter-spacing: -0.03em; }
.h3 { font-size: clamp(20px, 1.6vw, 26px); line-height: 1.2; letter-spacing: -0.02em; }
.lead { font-size: clamp(17px, 1.25vw, 19px); line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.body { font-size: 15.5px; line-height: 1.65; color: var(--text-2); text-wrap: pretty; }

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: .01em;
  transition: transform .25s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .25s ease;
  white-space: nowrap;
  position: relative;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .arrow {
  width: 16px; height: 16px; transition: transform .25s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.btn-primary:hover { background: #BC3924; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--text); }
.btn-ghost-dark { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.22); }
.btn-ghost-dark:hover { border-color: #fff; background: rgba(255,255,255,.04); }

/* ====== Header ====== */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 80;
  padding: 14px 0;
  transition: background .3s ease, border-color .3s ease, padding .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
  padding: 10px 0;
}
.header.on-hero:not(.scrolled) { color: #fff; }
.header.on-hero:not(.scrolled) .nav a { color: rgba(255,255,255,.82); }
.header.on-hero:not(.scrolled) .nav a:hover { color: #fff; }
.header.on-hero:not(.scrolled) .logo-text { color: #fff; }
.header.on-hero:not(.scrolled) .menu-btn { color: #fff; border-color: rgba(255,255,255,.3); }

.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
}
.logo-img { height: 38px; width: auto; display: block; }
.header.on-hero:not(.scrolled) .logo-img { filter: brightness(0) invert(1); }
.logo-img-dark { height: 40px; filter: brightness(0) invert(1); }
.logo-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  position: relative;
}
.logo-mark::after {
  content: '';
  position: absolute; inset: -4px;
  border: 1px solid currentColor;
  opacity: .12; border-radius: 11px;
  pointer-events: none;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo-text .one {
  font-weight: 500;
  color: var(--text-3);
  margin-left: 4px;
}
.header.on-hero:not(.scrolled) .logo-text .one { color: rgba(255,255,255,.6); }

.nav {
  display: flex; align-items: center; gap: 28px;
}
.nav a {
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color .2s ease;
}
.nav a:hover { color: var(--text); }
.nav a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav a:hover::after { transform: scaleX(1); }

.menu-btn {
  display: none;
  width: 42px; height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  align-items: center; justify-content: center;
}
.menu-btn span {
  width: 16px; height: 1.5px; background: currentColor;
  position: relative; transition: transform .25s, opacity .2s;
}
.menu-btn span::before, .menu-btn span::after {
  content: ''; position: absolute; left: 0; right: 0;
  height: 1.5px; background: currentColor;
  transition: transform .25s;
}
.menu-btn span::before { top: -5px; }
.menu-btn span::after { top: 5px; }
.menu-btn.open span { background: transparent; }
.menu-btn.open span::before { transform: rotate(45deg); top: 0; }
.menu-btn.open span::after { transform: rotate(-45deg); top: 0; }

.mobile-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 70;
  background: #ffffff;
  display: none;
  flex-direction: column;
  padding: 96px var(--gutter) 40px;
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.8,0,.2,1);
  visibility: hidden;
  overflow-y: auto;
}
@media (max-width: 980px) { .mobile-nav { display: flex; } }
.mobile-nav.open { transform: translateY(0); visibility: visible; }
.mobile-nav a {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--text);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-nav .btn { margin-top: 24px; align-self: flex-start; }

@media (max-width: 980px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .header .btn-primary.desktop-only { display: none; }
}

/* ====== Hero ====== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--carbon);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.15) contrast(1.05) brightness(0.65);
  transform: scale(1.05);
  will-change: transform;
  transform-origin: center center;
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 18% 30%, rgba(14,42,51,.55), transparent 55%),
    linear-gradient(180deg, rgba(10,11,12,.55) 0%, rgba(10,11,12,.78) 60%, rgba(10,11,12,.95) 100%);
}
.hero-3d {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000, transparent);
}

.hero-inner {
  position: relative; z-index: 3;
  min-height: 100vh; min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding-top: 130px;
  padding-bottom: 40px;
}
.hero-content { max-width: 1100px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 6px 14px 6px 6px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.82);
  margin-bottom: 28px;
}
.hero-badge .dot {
  width: 24px; height: 24px;
  background: var(--accent);
  border-radius: 999px;
  position: relative;
}
.hero-badge .dot::after {
  content: '';
  position: absolute; inset: 6px;
  background: #fff;
  border-radius: 999px;
}
.hero h1 {
  color: #fff;
  max-width: 17ch;
  margin-bottom: 28px;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub {
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.55;
  color: rgba(255,255,255,.78);
  max-width: 56ch;
  margin-bottom: 40px;
  text-wrap: pretty;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 36px;
  border-top: 1px solid rgba(255,255,255,.10);
}
.hero-meta-item .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 8px;
}
.hero-meta-item .v {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #fff;
}
.hero-meta-item .v small {
  font-size: 14px;
  color: rgba(255,255,255,.55);
  font-weight: 400;
  margin-left: 4px;
}

.scroll-hint {
  position: absolute;
  right: var(--gutter);
  bottom: 40px;
  z-index: 4;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.scroll-hint .line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,.4), transparent);
  animation: scrollLine 2.6s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 768px) {
  .hero-meta { grid-template-columns: repeat(2, 1fr); gap: 20px; padding-top: 28px; }
  .scroll-hint { display: none; }
  .hero-inner { padding-top: 110px; padding-bottom: 32px; }
  .hero-badge { margin-bottom: 22px; font-size: 10px; padding: 5px 12px 5px 5px; letter-spacing: .1em; gap: 10px; }
  .hero-badge .dot { width: 20px; height: 20px; }
  .hero-badge .dot::after { inset: 5px; }
  .hero h1 { font-size: clamp(36px, 9vw, 52px); line-height: 1.05; margin-bottom: 22px; max-width: 14ch; }
  .hero-sub { font-size: 15.5px; margin-bottom: 28px; }
  .hero-cta { gap: 10px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-meta-item .v { font-size: 19px; }
  .hero-bg img { transform: none; }
  .btn-ghost-dark { border-color: rgba(255,255,255,.45); }
}

/* ====== Sections common ====== */
.section { padding: clamp(80px, 9vw, 140px) 0; position: relative; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  margin-bottom: 64px;
  align-items: end;
}
.section-head .left .eyebrow { margin-bottom: 18px; }
.section-head h2 { max-width: 16ch; }
.section-head .right { padding-bottom: 8px; }
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: .08s; }
.reveal.delay-2 { transition-delay: .16s; }
.reveal.delay-3 { transition-delay: .24s; }
.reveal.delay-4 { transition-delay: .32s; }
.reveal.delay-5 { transition-delay: .40s; }
.reveal.delay-6 { transition-delay: .48s; }

/* ====== Empresa ====== */
.empresa {
  background: var(--white);
}
.empresa-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.empresa-text .lead { margin: 0 0 36px; max-width: 50ch; }
.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.pillar {
  background: var(--white);
  padding: 22px 22px 26px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
}
.pillar-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--accent);
}
.pillar-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--text);
}
.pillar-desc { font-size: 13.5px; line-height: 1.55; color: var(--text-3); }

.empresa-image {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--mist);
}
.empresa-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.empresa-image:hover img { transform: scale(1.04); }
.empresa-image .frame {
  position: absolute; inset: 14px;
  border: 1px solid rgba(255,255,255,.4);
  pointer-events: none;
}
.empresa-image .tag {
  position: absolute; top: 22px; left: 22px;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(10,11,12,.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 999px;
}
.empresa-image .tag .dot {
  width: 6px; height: 6px; background: var(--accent); border-radius: 999px;
}

@media (max-width: 900px) {
  .empresa-grid { grid-template-columns: 1fr; }
  .empresa-image { aspect-ratio: 4/3; }
}

/* ====== Services ====== */
.services { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1100px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease;
  display: flex; flex-direction: column;
  position: relative;
  transform-style: preserve-3d;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-3);
  border-color: var(--line-2);
}
.service-card .img-wrap {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--mist);
}
.service-card .img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s cubic-bezier(.2,.7,.2,1);
}
.service-card:hover .img-wrap img { transform: scale(1.06); }
.service-card .img-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10,11,12,.4) 100%);
}
.service-card .index {
  position: absolute; top: 16px; left: 18px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .16em; color: rgba(255,255,255,.85);
  z-index: 2;
}
.service-card .icon-pill {
  position: absolute; top: 16px; right: 18px;
  z-index: 2;
  width: 44px; height: 44px; border-radius: 999px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  color: var(--text);
  transition: background .25s, color .25s;
}
.service-card:hover .icon-pill { background: var(--accent); color: #fff; }
.service-card .body-pad {
  padding: 26px 24px 28px;
  display: flex; flex-direction: column; gap: 12px;
  flex: 1;
}
.service-card h3 {
  font-size: 22px; line-height: 1.18;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.service-card .desc {
  font-size: 14.5px; line-height: 1.55;
  color: var(--text-2);
  margin-bottom: 6px;
}
.service-card ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.service-card ul li {
  font-size: 13.5px;
  color: var(--text-2);
  padding-left: 18px;
  position: relative;
  line-height: 1.45;
}
.service-card ul li::before {
  content: '';
  position: absolute; left: 0; top: 9px;
  width: 8px; height: 1px;
  background: var(--accent);
}
.service-card .more {
  border-top: 1px solid var(--line);
  background: none;
  margin: 8px 0 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  color: var(--text-3);
  text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 14px 0 0;
  transition: color .2s;
}
.service-card .more:hover { color: var(--accent); }
.service-card .more svg { width: 14px; height: 14px; transition: transform .25s; }
.service-card .more:hover svg { transform: translateX(3px); }

.service-card .accent-line {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.service-card:hover .accent-line { transform: scaleX(1); }

/* Service expandable items */
.service-card.expanded ul.full { display: flex; }
.service-card ul.full { display: none; }

/* ====== Valor agregado ====== */
.valor { background: #fff; }
.valor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1000px) { .valor-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .valor-grid { grid-template-columns: 1fr; } }

.valor-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px 30px;
  background: #fff;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
  position: relative;
  overflow: hidden;
}
.valor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: var(--line-2);
}
.valor-card::before {
  content: '';
  position: absolute; left: 0; top: 0; height: 2px; width: 0;
  background: var(--accent);
  transition: width .4s ease;
}
.valor-card:hover::before { width: 100%; }
.valor-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--accent);
}
.valor-icon {
  width: 44px; height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--text);
  transition: background .25s, color .25s, border-color .25s;
}
.valor-card:hover .valor-icon { background: var(--text); color: #fff; border-color: var(--text); }
.valor-name {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: -.01em;
  font-weight: 500;
  color: var(--text);
}
.valor-desc { font-size: 14px; line-height: 1.55; color: var(--text-2); }

/* ====== Gallery ====== */
.gallery { background: var(--paper); border-top: 1px solid var(--line); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 240px;
  gap: 12px;
}
@media (max-width: 1100px) { .gallery-grid { grid-auto-rows: 200px; } }
@media (max-width: 800px)  { .gallery-grid { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 220px; } }
@media (max-width: 560px)  { .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; } }

.g-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--mist);
  cursor: pointer;
  isolation: isolate;
}
.g-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s cubic-bezier(.2,.7,.2,1), filter .35s ease;
  filter: grayscale(0.15);
}
.g-card:hover img { transform: scale(1.06); filter: grayscale(0); }
.g-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,11,12,0) 35%, rgba(10,11,12,.78) 100%);
  z-index: 1;
  transition: background .35s ease;
}
.g-card:hover::after {
  background: linear-gradient(180deg, rgba(10,11,12,0) 20%, rgba(10,11,12,.85) 100%);
}
.g-card .meta {
  position: absolute; left: 18px; right: 18px; bottom: 16px;
  z-index: 2; color: #fff;
  display: flex; align-items: end; justify-content: space-between; gap: 12px;
  transform: translateY(6px);
  opacity: .92;
  transition: transform .35s ease, opacity .35s ease;
}
.g-card:hover .meta { transform: translateY(0); opacity: 1; }
.g-card .title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.g-card .num {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em;
  color: rgba(255,255,255,.7);
  margin-bottom: 4px;
  display: block;
}
.g-card .open-pill {
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  display: grid; place-items: center;
  color: #fff;
  transition: background .25s, transform .25s;
}
.g-card:hover .open-pill { background: var(--accent); border-color: var(--accent); transform: rotate(-45deg); }
.g-card .corner {
  position: absolute; top: 14px; left: 14px;
  width: 22px; height: 22px;
  border-top: 1px solid rgba(255,255,255,.5);
  border-left: 1px solid rgba(255,255,255,.5);
  z-index: 2;
}
.g-card .corner.tr {
  left: auto; right: 14px;
  border-left: 0; border-right: 1px solid rgba(255,255,255,.5);
}

/* Bento sizing — 12 cols pattern */
.gallery-grid > .g-card:nth-child(12n+1) { grid-column: span 6; grid-row: span 2; }
.gallery-grid > .g-card:nth-child(12n+2) { grid-column: span 3; grid-row: span 1; }
.gallery-grid > .g-card:nth-child(12n+3) { grid-column: span 3; grid-row: span 2; }
.gallery-grid > .g-card:nth-child(12n+4) { grid-column: span 3; grid-row: span 1; }
.gallery-grid > .g-card:nth-child(12n+5) { grid-column: span 4; grid-row: span 2; }
.gallery-grid > .g-card:nth-child(12n+6) { grid-column: span 4; grid-row: span 1; }
.gallery-grid > .g-card:nth-child(12n+7) { grid-column: span 4; grid-row: span 2; }
.gallery-grid > .g-card:nth-child(12n+8) { grid-column: span 4; grid-row: span 1; }
.gallery-grid > .g-card:nth-child(12n+9) { grid-column: span 4; grid-row: span 1; }
.gallery-grid > .g-card:nth-child(12n+10){ grid-column: span 4; grid-row: span 2; }
.gallery-grid > .g-card:nth-child(12n+11){ grid-column: span 4; grid-row: span 1; }
.gallery-grid > .g-card:nth-child(12n+0) { grid-column: span 4; grid-row: span 1; }

@media (max-width: 800px) {
  .gallery-grid > .g-card { grid-column: span 3 !important; grid-row: span 1 !important; }
  .gallery-grid > .g-card:nth-child(odd) { grid-column: span 3 !important; }
  .gallery-grid > .g-card:nth-child(3n+1) { grid-row: span 2 !important; }
}

/* ===== Mobile carousel ===== */
@media (max-width: 700px) {
  .gallery-grid {
    display: flex !important;
    flex-direction: row !important;
    grid-template-columns: none !important;
    grid-auto-rows: auto !important;
    gap: 12px !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0 16px;
    margin-left: calc(var(--gutter) * -1);
    margin-right: calc(var(--gutter) * -1);
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    scroll-padding-left: var(--gutter);
  }
  .gallery-grid::-webkit-scrollbar { display: none; }
  .gallery-grid > .g-card {
    flex: 0 0 78vw !important;
    width: 78vw !important;
    height: 60vh !important;
    max-height: 480px;
    min-height: 360px;
    grid-column: auto !important;
    grid-row: auto !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .gallery-grid > .g-card:last-child {
    margin-right: var(--gutter);
  }
  .gallery-grid > .g-card .meta { transform: none; opacity: 1; }
  .gallery-grid > .g-card::after {
    background: linear-gradient(180deg, rgba(10,11,12,0) 35%, rgba(10,11,12,.85) 100%);
  }
}
.gallery-foot {
  display: none;
}
@media (max-width: 700px) {
  .gallery-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-3);
  }
  .gallery-foot .hint {
    display: inline-flex; align-items: center; gap: 8px;
  }
  .gallery-foot .swipe-arrow {
    display: inline-block;
    animation: swipeNudge 1.6s ease-in-out infinite;
  }
  @keyframes swipeNudge {
    0%, 100% { transform: translateX(0); opacity: .6; }
    50% { transform: translateX(6px); opacity: 1; }
  }
  .gallery-progress {
    flex: 1;
    height: 2px;
    background: var(--line);
    border-radius: 999px;
    position: relative;
    overflow: hidden;
  }
  .gallery-progress span {
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 18%;
    background: var(--accent);
    border-radius: 999px;
    transition: left .2s ease;
  }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10,11,12,.92);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: grid; place-items: center;
  padding: 40px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox-inner {
  position: relative;
  max-width: min(1200px, 96vw);
  max-height: 90vh;
  width: 100%;
  display: flex; flex-direction: column; gap: 16px;
}
.lightbox img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
}
.lightbox-bar {
  display: flex; justify-content: space-between; align-items: center;
  color: #fff;
}
.lightbox-bar .t { font-family: var(--font-display); font-size: 18px; font-weight: 500; }
.lightbox-bar .c {
  font-family: var(--font-mono); font-size: 12px;
  color: rgba(255,255,255,.55); letter-spacing: .14em;
}
.lb-controls {
  display: flex; gap: 8px;
}
.lb-btn {
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  display: grid; place-items: center;
  transition: background .2s, border-color .2s;
}
.lb-btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); }
.lb-close {
  position: absolute; top: -10px; right: -10px;
  width: 44px; height: 44px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
}

/* ====== Clientes ====== */
.clientes { background: #fff; border-top: 1px solid var(--line); }
.clientes-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
}
.cliente {
  display: grid;
  grid-template-columns: 64px 96px 220px 1fr 60px;
  gap: 32px;
  align-items: center;
  padding: 28px 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background .25s ease, padding .25s ease;
  cursor: pointer;
  color: var(--text);
}
.cliente::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--accent);
  transition: width .4s cubic-bezier(.2,.7,.2,1);
}
.cliente:hover { padding-left: 28px; background: var(--paper); }
.cliente:hover::before { width: 3px; }
.cliente-logo {
  width: 80px; height: 80px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  padding: 8px;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .25s;
}
.cliente-logo img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  display: block;
}
.cliente:hover .cliente-logo { transform: translateY(-2px); border-color: rgba(200,54,45,.25); }
.cliente-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--text-3);
}
.cliente-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--accent);
  text-transform: uppercase;
}
.cliente-name {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 6px 0 8px;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.cliente:hover .cliente-name { transform: translateX(4px); }
.cliente-desc {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.55;
  max-width: 70ch;
}
.cliente-arrow {
  width: 56px; height: 56px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  justify-self: end;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.cliente:hover .cliente-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: rotate(-45deg);
}

@media (max-width: 900px) {
  .cliente {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 24px 0;
  }
  .cliente-logo { width: 64px; height: 64px; }
  .cliente-arrow { justify-self: start; margin-top: 6px; }
  .cliente:hover { padding-left: 14px; }
}

/* ====== Contact ====== */
.contact {
  background: var(--carbon);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.contact-bg {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}
.contact-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000, transparent);
}
.contact-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 18% 30%, rgba(216,68,44,.18), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(20,57,66,.55), transparent 50%);
  filter: blur(20px);
}
.contact-canvas { position: absolute; inset: 0; opacity: .55; }

.contact-inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
  min-width: 0;
}
.contact-inner > * { min-width: 0; }
@media (max-width: 950px) { .contact-inner { grid-template-columns: 1fr; } }

.contact h2 {
  color: #fff;
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -0.035em;
  line-height: 1;
  margin-bottom: 28px;
  max-width: 14ch;
}
.contact h2 .accent { color: var(--accent); font-style: italic; font-weight: 500; }
.contact p.lead { color: rgba(255,255,255,.72); max-width: 50ch; }

.info-grid {
  margin-top: 50px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.info-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.10);
}
.info-row .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.info-row .v {
  color: #fff;
  font-size: 16px;
  line-height: 1.55;
}
.info-row .v a:hover { color: var(--accent); }

.form-card {
  background: rgba(20, 24, 28, .8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius-lg);
  padding: 36px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.form-card h3 {
  font-size: 22px;
  letter-spacing: -.01em;
  font-weight: 500;
  margin-bottom: 4px;
  color: #fff;
}
.form-card .sub {
  font-size: 13.5px; color: rgba(255,255,255,.55);
  margin-bottom: 28px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.form-field input,
.form-field select,
.form-field textarea {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14.5px;
  transition: border-color .2s, background .2s;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,.06);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-field select option { background: var(--carbon); color: #fff; }
.form-field.error input,
.form-field.error select,
.form-field.error textarea { border-color: #E85D2A; }
.form-field .err {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #E85D2A;
  letter-spacing: .08em;
  margin-top: 2px;
}
.form-submit {
  margin-top: 20px;
  width: 100%;
  height: 54px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  transition: background .2s, transform .2s;
}
.form-submit:hover { background: #BC3924; transform: translateY(-1px); }
.form-meta {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255,255,255,.45);
  text-align: center;
}
.form-success {
  background: rgba(216,68,44,.10);
  border: 1px solid rgba(216,68,44,.4);
  color: #fff;
  border-radius: 8px;
  padding: 16px 18px;
  font-size: 14px;
  margin-bottom: 18px;
  display: flex; gap: 12px; align-items: flex-start;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .info-row { grid-template-columns: 1fr; gap: 4px; }
  .form-card { padding: 24px 18px; }
  .form-card h3 { font-size: 19px; }
}

/* ====== Footer ====== */
.footer { background: #06070a; color: rgba(255,255,255,.65); padding: 60px 0 32px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  font-weight: 500;
  margin-bottom: 14px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer ul a, .footer p {
  color: rgba(255,255,255,.78);
  font-size: 14px;
  line-height: 1.55;
  transition: color .2s;
}
.footer ul a:hover { color: var(--accent); }
.footer .desc { color: rgba(255,255,255,.55); font-size: 14px; line-height: 1.55; max-width: 38ch; margin: 14px 0 0; }
.footer-bot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
}
@media (max-width: 800px) {
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr; }
}
