/* ═══════════════════════════════════════════════════════════════
   FABRICACIONES G&P — TORNERÍA INDUSTRIAL
   Diseño Industrial Oscuro · Callao, Perú
═══════════════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --bg:          #080808;
  --surface:     #111114;
  --card:        #181820;
  --card-hover:  #1e1e28;
  --border:      rgba(255,255,255,.07);
  --border-acc:  rgba(240,165,0,.35);

  --accent:      #f0a500;
  --accent-dim:  #c07800;
  --accent-glow: rgba(240,165,0,.18);
  --accent-rgb:  240,165,0;

  --green-wa:    #25d366;
  --green-wa-dk: #1aa34a;

  --text:        #f0f0f0;
  --text-muted:  #909098;
  --text-dim:    #505060;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;

  --shadow: 0 8px 40px rgba(0,0,0,.55);
  --shadow-acc: 0 0 40px rgba(240,165,0,.22);

  --transition: .3s cubic-bezier(.4,0,.2,1);
  --transition-slow: .6s cubic-bezier(.4,0,.2,1);
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

::selection { background: var(--accent); color: #000; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 3px; }

/* ── CONTAINER ── */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── SECTION HEADERS ── */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--border-acc);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}
.section-header p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}
.accent { color: var(--accent); }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .01em;
  padding: 14px 28px;
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.15);
  opacity: 0;
  transition: var(--transition);
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(var(--accent-rgb),.4);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: .92rem;
  padding: 13px 26px;
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-2px);
}

.btn-full { width: 100%; justify-content: center; }

/* ── REVEAL ANIMATIONS ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}
#navbar.scrolled {
  background: rgba(8,8,8,.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--border), 0 4px 32px rgba(0,0,0,.5);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: padding var(--transition);
}
#navbar.scrolled .nav-container { padding-top: 14px; padding-bottom: 14px; }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-gp {
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--accent);
  line-height: 1;
}
.logo-gp .amp { color: var(--text-dim); font-weight: 400; }
.logo-text-group { display: flex; flex-direction: column; line-height: 1.1; }
.logo-title { font-size: .95rem; font-weight: 700; letter-spacing: -.01em; }
.logo-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 8px 14px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-link.active { color: var(--accent); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--green-wa);
  color: #000;
  font-weight: 700;
  font-size: .85rem;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  margin-left: 10px;
  transition: var(--transition);
}
.nav-cta:hover { background: var(--green-wa-dk); transform: translateY(-1px); }
.nav-cta .wa-icon { width: 15px; height: 15px; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  z-index: 1100;
}
.hamburger span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
  display: block;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(8,8,8,.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.mobile-link {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 12px 40px;
  border-radius: var(--radius);
  transition: var(--transition);
  letter-spacing: -.02em;
}
.mobile-link:hover, .mobile-link--cta { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05);
  transition: transform 8s ease;
  filter: brightness(.55) saturate(.8);
}
#hero.loaded .hero-img { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(8,8,8,.95) 40%, rgba(8,8,8,.6) 100%),
    linear-gradient(to top, rgba(8,8,8,.95) 0%, transparent 50%);
}
.hero-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: .4;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 120px 24px 80px;
  width: 100%;
}

.hero-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

@media (min-width: 1024px) {
  .hero-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 60px;
  }
}

.hero-visual {
  display: none;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  height: 570px;      /* Matched to new stretched canvas size */
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .7s .9s forwards;
}

@media (min-width: 1024px) {
  .hero-visual {
    display: flex;
  }
}

#hero-3d-canvas-container {
  width: 570px;       /* Stretched to 570px to give pieces full breathing room */
  height: 570px;      /* Proportional vertical stretch */
  max-width: 100%;    /* Responsive scaling on small screens */
  aspect-ratio: 1 / 1;
  position: relative;
  cursor: grab;
  user-select: none;  /* Prevent text selection from blocking the drag */
  -webkit-user-select: none;
  touch-action: none; /* Prevent browser from swallowing/delaying the first drag for scroll/zoom */
  /* Shift canvas 10px left so the composition sits better in the hero */
  transform: translateX(-10px);
  /* Subtle ambient glow behind the model — no border-radius so canvas is never clipped */
  background: radial-gradient(ellipse at center, rgba(240, 165, 0, 0.04) 0%, transparent 70%);
  transition: transform 0.3s ease;
}

#hero-3d-canvas-container:active {
  cursor: grabbing;
  transform: translateX(-10px); /* keep the shift during drag */
}

/* Smooth fade-in for Three.js canvas */
#hero-3d-canvas-container canvas {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

#hero-3d-canvas-container canvas.loaded {
  opacity: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp .7s .2s forwards;
}
.badge-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb),.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(var(--accent-rgb),.7); }
  70%  { box-shadow: 0 0 0 10px rgba(var(--accent-rgb),0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb),0); }
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.08;
  margin-bottom: 22px;
  max-width: 700px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .7s .35s forwards;
}
.hero-accent {
  font-style: normal;
  color: var(--accent);
  position: relative;
}
.hero-accent::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  animation: lineIn 1s .9s forwards;
}
@keyframes lineIn { to { transform: scaleX(1); } }

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 36px;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .7s .5s forwards;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .7s .65s forwards;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .7s .8s forwards;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-value {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 2.6rem;
  margin-bottom: 2px;
}
.stat-num {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-plus {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-left: 1px;
}
.stat-label {
  font-size: .72rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1.3;
}
.stat-sep {
  width: 1px; height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

.hero-scroll {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
  z-index: 1;
  opacity: 0;
  animation: fadeIn 1s 1.2s forwards;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollAnim 1.8s ease infinite;
}
@keyframes scrollAnim {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

@keyframes fadeUp {
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  to { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   TICKER
═══════════════════════════════════════════════════════════════ */
.ticker-wrap {
  background: var(--accent);
  overflow: hidden;
  padding: 13px 0;
  position: relative;
  z-index: 2;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.ticker-wrap:active {
  cursor: grabbing;
}
.ticker-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  will-change: transform;
}
.ticker-track span {
  color: #000;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .05em;
  padding: 0 24px;
  flex-shrink: 0;
}
.ticker-track .sep {
  font-size: .6rem;
  opacity: .5;
  padding: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SERVICIOS
═══════════════════════════════════════════════════════════════ */
#servicios {
  padding: 100px 0;
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: var(--transition);
}
.service-card:hover {
  background: var(--card-hover);
  border-color: var(--border-acc);
  transform: translateY(-6px);
  box-shadow: var(--shadow), var(--shadow-acc);
}
.service-card:hover::before { opacity: 1; }

.service-card--highlight {
  border-color: var(--border-acc);
  background: linear-gradient(145deg, var(--card), rgba(240,165,0,.06));
  grid-column: span 1;
}
.service-card--highlight::before { opacity: .5; }

.service-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--accent);
  color: #000;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
}

.service-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.service-icon-wrap {
  width: 52px; height: 52px;
  background: var(--accent-glow);
  border: 1px solid var(--border-acc);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.service-card:hover .service-icon-wrap {
  background: rgba(var(--accent-rgb),.25);
  border-color: var(--accent);
}
.service-icon {
  width: 30px; height: 30px;
  color: var(--accent);
  stroke-width: 1.5px;
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.service-card > p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 18px;
}
.service-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.service-list li {
  font-size: .82rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  transition: color var(--transition);
}
.service-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: .7rem;
}
.service-card:hover .service-list li { color: var(--text); }

/* ═══════════════════════════════════════════════════════════════
   GALERÍA
═══════════════════════════════════════════════════════════════ */
#trabajos {
  padding: 100px 0;
  background: var(--surface);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;
  grid-auto-flow: dense;
  gap: 12px;
  padding: 0 24px;
  max-width: 1240px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: zoom-in;
  background: var(--card);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.4,0,.2,1), filter .4s ease;
  filter: brightness(.85) saturate(.9);
}
.gallery-item:hover img {
  transform: scale(1.08);
  filter: brightness(1) saturate(1.15);
}

.gallery-item--tall { grid-row: span 2; }
.gallery-item--wide { grid-column: span 2; }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,8,8,.85) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 20px 18px;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .02em;
}

/* ═══════════════════════════════════════════════════════════════
   ESPECIALIDAD — BOMBAS
═══════════════════════════════════════════════════════════════ */
#especialidad {
  padding: 100px 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
#especialidad::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb),.07) 0%, transparent 70%);
  pointer-events: none;
}

.pump-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.pump-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
}
.pump-img-main {
  grid-column: span 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  cursor: zoom-in;
}
.pump-img-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.pump-img-main:hover img { transform: scale(1.05); }
.pump-tag {
  position: absolute;
  bottom: 14px; left: 14px;
  background: var(--accent);
  color: #000;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
}

.pump-img-sec {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: zoom-in;
}
.pump-img-sec img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
  filter: brightness(.9);
}
.pump-img-sec:hover img { transform: scale(1.06); filter: brightness(1); }

.pump-content {}
.pump-content h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: 14px 0 20px;
}
.pump-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 36px;
}
.pump-desc strong { color: var(--text); }

.pump-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 36px;
}
.pump-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--border-acc);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  flex-shrink: 0;
  letter-spacing: .05em;
  line-height: 1;
}
.step-body strong {
  display: block;
  font-size: .95rem;
  margin-bottom: 4px;
}
.step-body p {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.55;
}

/* ═══════════════════════════════════════════════════════════════
   NOSOTROS
═══════════════════════════════════════════════════════════════ */
#nosotros {
  padding: 100px 0;
  background: var(--surface);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  align-items: center;
}

.about-img-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: visible;
}
.about-img-wrap img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  filter: brightness(.9) saturate(.95);
  transition: filter .4s ease;
}
.about-img-wrap:hover img { filter: brightness(1) saturate(1.1); }

.about-img-chip {
  position: absolute;
  bottom: -18px; right: -18px;
  background: var(--card);
  border: 1px solid var(--border-acc);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}
.chip-icon { font-size: 1.6rem; }
.about-img-chip strong { display: block; font-size: .9rem; font-weight: 700; }
.about-img-chip span { font-size: .75rem; color: var(--text-muted); }

.about-content h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.12;
  margin: 14px 0 22px;
}
.about-content p {
  color: var(--text-muted);
  font-size: .98rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}
.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: var(--transition);
}
.about-feature:hover {
  border-color: var(--border-acc);
  background: var(--card-hover);
  transform: translateY(-3px);
}
.af-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.about-feature strong { display: block; font-size: .87rem; font-weight: 700; margin-bottom: 3px; }
.about-feature span { font-size: .78rem; color: var(--text-muted); line-height: 1.4; }

/* ═══════════════════════════════════════════════════════════════
   MATERIALES
═══════════════════════════════════════════════════════════════ */
#materiales {
  padding: 80px 0;
  background: var(--bg);
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.material-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 16px 22px;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.material-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255,255,255,.03), transparent);
  pointer-events: none;
}
.material-card:hover {
  border-color: var(--border-acc);
  transform: translateY(-6px);
  box-shadow: var(--shadow), 0 0 30px rgba(0,0,0,.3);
}

/* ─── CSS 3D Photorealistic Spheres ─── */
.mat-sphere {
  width: 88px; height: 88px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), box-shadow .4s ease;
}
.mat-sphere::after {
  content: '';
  position: absolute;
  top: 12%; left: 18%;
  width: 28%; height: 22%;
  background: radial-gradient(ellipse, rgba(255,255,255,.85) 0%, rgba(255,255,255,.2) 60%, transparent 100%);
  border-radius: 50%;
  transform: rotate(-25deg);
  filter: blur(1px);
  pointer-events: none;
}
.material-card:hover .mat-sphere {
  transform: scale(1.12) rotate(8deg);
}

/* Steel SAE/AISI — brushed gunmetal */
.mat-steel {
  background:
    radial-gradient(ellipse at 32% 28%, rgba(255,255,255,.55) 0%, transparent 30%),
    radial-gradient(ellipse at 70% 72%, rgba(0,0,0,.5) 0%, transparent 40%),
    radial-gradient(circle at 45% 45%, #d0d0d0 0%, #a8a8a8 22%, #707070 50%, #3a3a3a 75%, #141414 100%);
  box-shadow:
    4px 8px 24px rgba(0,0,0,.7),
    inset -3px -4px 10px rgba(0,0,0,.4),
    inset 3px 3px 8px rgba(255,255,255,.15);
}

/* Bronze/Copper — warm patina */
.mat-bronze {
  background:
    radial-gradient(ellipse at 32% 28%, rgba(255,230,150,.6) 0%, transparent 30%),
    radial-gradient(ellipse at 70% 72%, rgba(60,20,0,.6) 0%, transparent 40%),
    radial-gradient(circle at 45% 45%, #e8b060 0%, #c07828 22%, #885018 50%, #4a2408 75%, #180800 100%);
  box-shadow:
    4px 8px 24px rgba(0,0,0,.7),
    inset -3px -4px 10px rgba(80,20,0,.5),
    inset 3px 3px 8px rgba(255,210,120,.2);
}

/* Aluminum — mirror chrome */
.mat-aluminum {
  background:
    radial-gradient(ellipse at 30% 26%, rgba(255,255,255,.9) 0%, transparent 25%),
    radial-gradient(ellipse at 68% 70%, rgba(0,0,0,.45) 0%, transparent 38%),
    radial-gradient(circle at 45% 45%, #f8f8f8 0%, #e0e0e0 15%, #b8b8b8 35%, #888 60%, #484848 82%, #181818 100%);
  box-shadow:
    4px 8px 28px rgba(0,0,0,.65),
    inset -2px -3px 8px rgba(0,0,0,.35),
    inset 3px 3px 10px rgba(255,255,255,.35);
}

/* Stainless Steel 316 — cool blue-silver mirror */
.mat-stainless {
  background:
    radial-gradient(ellipse at 31% 27%, rgba(220,240,255,.8) 0%, transparent 28%),
    radial-gradient(ellipse at 68% 70%, rgba(0,10,30,.55) 0%, transparent 40%),
    radial-gradient(circle at 45% 45%, #ddeeff 0%, #a8c8e0 18%, #6888a8 45%, #304858 72%, #0a1820 100%);
  box-shadow:
    4px 8px 28px rgba(0,0,0,.7),
    inset -2px -3px 9px rgba(0,10,40,.4),
    inset 3px 3px 9px rgba(180,220,255,.25);
}

/* Cast Iron — dark rough matte */
.mat-castiron {
  background:
    radial-gradient(ellipse at 35% 30%, rgba(120,120,120,.4) 0%, transparent 28%),
    radial-gradient(ellipse at 68% 70%, rgba(0,0,0,.7) 0%, transparent 38%),
    radial-gradient(circle at 45% 45%, #909090 0%, #646464 18%, #3c3c3c 42%, #1e1e1e 70%, #080808 100%);
  box-shadow:
    4px 8px 24px rgba(0,0,0,.8),
    inset -2px -3px 8px rgba(0,0,0,.6),
    inset 2px 2px 6px rgba(160,160,160,.08);
  filter: contrast(1.05);
}
.mat-castiron::after {
  opacity: .4; /* cast iron has less specular */
}

.mat-name { font-size: .87rem; font-weight: 700; }
.mat-sub { font-size: .72rem; color: var(--text-muted); line-height: 1.35; }

/* ═══════════════════════════════════════════════════════════════
   CONTACTO
═══════════════════════════════════════════════════════════════ */
#contacto {
  padding: 100px 0;
  background: var(--surface);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
}

/* WhatsApp Big Button */
.whatsapp-big-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--green-wa) 0%, var(--green-wa-dk) 100%);
  color: #000;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.whatsapp-big-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.12);
  opacity: 0;
  transition: var(--transition);
}
.whatsapp-big-btn:hover::before { opacity: 1; }
.whatsapp-big-btn:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(37,211,102,.35); }

.wa-big-icon {
  width: 48px; height: 48px;
  background: rgba(0,0,0,.15);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wa-big-icon svg { width: 26px; height: 26px; color: #000; }
.wa-big-text { flex: 1; }
.wa-big-text strong { display: block; font-size: 1.05rem; font-weight: 800; }
.wa-big-text span { font-size: .88rem; opacity: .75; }
.wa-arrow { width: 20px; height: 20px; color: #000; flex-shrink: 0; }

.contact-info-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-info-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: var(--transition);
}
.contact-info-card:hover {
  border-color: var(--border-acc);
  background: var(--card-hover);
}
.ci-icon-svg {
  width: 36px; height: 36px;
  background: var(--accent-glow);
  border: 1px solid var(--border-acc);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ci-icon-svg svg { width: 16px; height: 16px; color: var(--accent); }
.contact-info-card strong { display: block; font-size: .87rem; font-weight: 700; margin-bottom: 4px; }
.contact-info-card span, .contact-info-card a {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.contact-info-card a:hover { color: var(--accent); }

/* Form */
.contact-form-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
}
.contact-form h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -.01em;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.form-group label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: .92rem;
  padding: 12px 14px;
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--card);
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23606060' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}
.form-group select option { background: var(--card); color: var(--text); }
.form-group textarea { resize: vertical; min-height: 110px; }

.form-success {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(37,211,102,.1);
  border: 1px solid rgba(37,211,102,.3);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: .9rem;
  color: var(--green-wa);
  margin-top: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */
#footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 72px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-brand .nav-logo { margin-bottom: 16px; }
.footer-brand p {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.65;
  max-width: 260px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col strong {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.footer-col a, .footer-col span {
  font-size: .88rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: .78rem;
  color: var(--text-dim);
  gap: 8px;
}
.footer-made { font-family: 'JetBrains Mono', monospace; }
.footer-bottom a {
  color: var(--text-muted);
  font-weight: 600;
  transition: color var(--transition);
}
.footer-bottom a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════
   WHATSAPP FAB
═══════════════════════════════════════════════════════════════ */
.whatsapp-fab {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 900;
  background: var(--green-wa);
  color: #fff;
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.5);
  transition: var(--transition);
  animation: fabPulse 2.5s ease-in-out 3s infinite;
}
.whatsapp-fab svg { width: 28px; height: 28px; }
.whatsapp-fab:hover {
  transform: scale(1.12);
  box-shadow: 0 12px 40px rgba(37,211,102,.6);
  animation: none;
  border-radius: var(--radius-lg);
  width: auto;
  padding: 0 20px;
  gap: 10px;
}
.fab-label {
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  max-width: 0;
  overflow: hidden;
  transition: max-width .4s ease, opacity .3s ease;
  opacity: 0;
  color: #000;
}
.whatsapp-fab:hover .fab-label {
  max-width: 120px;
  opacity: 1;
}
.whatsapp-fab:hover svg { color: #000; }
@keyframes fabPulse {
  0%   { box-shadow: 0 8px 32px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.5); }
  70%  { box-shadow: 0 8px 32px rgba(37,211,102,.45), 0 0 0 18px rgba(37,211,102,0); }
  100% { box-shadow: 0 8px 32px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,0); }
}

/* ═══════════════════════════════════════════════════════════════
   LIGHTBOX WATERMARK & NAVIGATION
═══════════════════════════════════════════════════════════════ */
.lightbox-watermark {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  line-height: 1;
  pointer-events: none;
  z-index: 10;
  user-select: none;
  -webkit-user-select: none;
}
.wm-gp {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -.04em;
  color: rgba(255, 255, 255, 0.40);
  line-height: 1;
}
.wm-gp .wm-amp {
  color: rgba(255, 255, 255, 0.20);
  font-weight: 400;
}
.wm-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.wm-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: -.01em;
}
.wm-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 20, 20, 0.8);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s, transform .2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox-nav-btn:hover {
  background: rgba(240, 165, 0, 0.95);
  border-color: transparent;
  color: #000;
  transform: translateY(-50%) scale(1.08);
}
.lightbox-prev {
  left: 24px;
}
.lightbox-next {
  right: 24px;
}

/* Responsive Watermark & Nav for Tablet/Mobile */
@media (max-width: 768px) {
  .lightbox-watermark {
    top: 14px;
    left: 14px;
    gap: 8px;
  }
  .wm-gp {
    font-size: 1.4rem;
  }
  .wm-title {
    font-size: 0.85rem;
  }
  .wm-sub {
    font-size: 0.5rem;
  }
  .lightbox-nav-btn {
    width: 38px;
    height: 38px;
  }
  .lightbox-prev {
    left: 12px;
  }
  .lightbox-next {
    right: 12px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .pump-layout { grid-template-columns: 1fr; gap: 40px; }
  .pump-images { grid-template-columns: 1fr 1fr; }
  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .about-img-wrap { max-width: 480px; }
  .about-img-wrap img { aspect-ratio: 16/9; }
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  .materials-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  #hero { min-height: 100dvh; }
  .hero-content { padding: 100px 20px 80px; }
  .hero-stats { gap: 20px; }
  .hero-scroll { display: none; }

  .services-grid { grid-template-columns: 1fr; }
  .service-card--highlight { grid-column: span 1; }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
    padding: 0 16px;
  }
  .gallery-item--wide { grid-column: span 2; }
  .gallery-item--tall { grid-row: span 1; }

  .pump-images { grid-template-columns: 1fr; }
  .pump-img-sec:last-child { display: none; }
  .pump-img-main { aspect-ratio: 4/3; }

  .about-features { grid-template-columns: 1fr; }
  .about-img-chip { bottom: -14px; right: -8px; }

  .materials-grid { grid-template-columns: repeat(2, 1fr); }
  .material-card:last-child { grid-column: span 2; }

  .form-row { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 24px 20px; }

  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn-primary,
  .hero-actions .btn-outline { width: 100%; justify-content: center; }

  .pump-steps { gap: 18px; }

  section { padding: 72px 0; }
  #servicios, #trabajos, #especialidad, #nosotros, #materiales, #contacto { padding: 72px 0; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item--wide { grid-column: span 1; }
  .gallery-grid { grid-auto-rows: 240px; }

  .hero-stats { flex-direction: column; gap: 16px; }
  .stat-sep { width: 60px; height: 1px; }

  .materials-grid { grid-template-columns: 1fr; }
  .material-card:last-child { grid-column: span 1; }

  .whatsapp-fab { bottom: 20px; right: 20px; }
}
