/* =============================================================
   1. Tokens
   ============================================================= */
@property --mesh-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  /* Dark industrial palette */
  --bg:        #0B0D0F;
  --bg-2:      #111417;
  --bg-3:      #181C20;
  --bg-card:   #1A1E23;
  --bg-card-2: #20252B;

  --cream:     #E8EAE6;
  --cream-2:   #B8BDB8;
  --cream-3:   #6E7470;

  --accent:    #6BAED6;   /* steel-blue aluminum accent */
  --accent-2:  #4A8DB5;
  --accent-glow: rgba(107,174,214,0.18);
  --silver:    #9EA8B0;
  --gold:      #C49A5B;

  --line:      rgba(232,234,230,0.08);
  --line-2:    rgba(232,234,230,0.14);

  --sans:      'Inter', system-ui, sans-serif;
  --serif:     'Fraunces', Georgia, serif;
  --mono:      'JetBrains Mono', 'IBM Plex Mono', monospace;

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

  --r:         8px;
  --r-lg:      16px;
  --gutter:    clamp(1rem, 4vw, 3rem);
  --container: min(1280px, 100% - 2 * var(--gutter));
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  text-wrap: balance;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
ul { list-style: none; }
input, textarea, select { font: inherit; }

::selection { background: var(--accent); color: var(--bg); }

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

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

.container { width: var(--container); margin-inline: auto; }

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Gotcha A.4.5 — split text must not be opacity:0 */
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   4. Typography
   ============================================================= */
.kicker {
  font-family: var(--mono);
  font-size: clamp(0.65rem, 1.1vw, 0.75rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.kicker::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-3);
}

/* =============================================================
   5. Splash loader
   ============================================================= */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  transition: opacity 0.7s var(--ease-out), clip-path 0.7s var(--ease-out);
  animation: splashSafety 0.01s 4.5s forwards;
}
@keyframes splashSafety {
  to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
}
#splash.is-out {
  opacity: 0;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
}
.splash-logo {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
}
.splash-logo span { color: var(--accent); }
.splash-bar {
  width: 120px;
  height: 1px;
  background: var(--line-2);
  position: relative;
  overflow: hidden;
}
.splash-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: splashLoad 1.4s var(--ease-out) 0.2s forwards;
}
@keyframes splashLoad {
  to { transform: translateX(0); }
}

/* =============================================================
   6. Navigation
   ============================================================= */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  transition: background 0.4s var(--ease-out), border-color 0.4s;
  border-bottom: 1px solid transparent;
}
#nav.is-solid {
  background: rgba(11,13,15,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0;
}
.nav-logo {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: none;
  gap: 2.2rem;
  align-items: center;
}
.nav-links a {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: var(--cream-2);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 1.2rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--r);
  transition: background 0.2s, transform 0.2s var(--ease-bounce);
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--cream);
  transform: scale(1.04);
}

.nav-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.4rem;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--cream);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  background: rgba(11,13,15,0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s var(--ease-out);
}
.nav-mobile.is-open { max-height: 320px; }
.nav-mobile a {
  display: block;
  padding: 1rem var(--gutter);
  font-size: 1rem;
  font-weight: 500;
  color: var(--cream-2);
  border-bottom: 1px solid var(--line);
  transition: color 0.2s, background 0.2s;
}
.nav-mobile a:hover { color: var(--cream); background: var(--bg-2); }
.nav-mobile .nav-mobile-cta {
  margin: 1rem var(--gutter);
  padding: 0.9rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--r);
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.85rem;
  border-bottom: none;
}

/* =============================================================
   7. Hero
   ============================================================= */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(0.7) contrast(1.05);
}
.hero-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(11,13,15,0.88) 0%,
    rgba(11,13,15,0.75) 50%,
    rgba(11,13,15,0.6) 100%
  );
}

/* Mesh gradient effect */
.hero-mesh {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 60% 40% at 15% 60%, rgba(107,174,214,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 80% 20%, rgba(196,154,91,0.07) 0%, transparent 60%);
  pointer-events: none;
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.04;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 10;
  padding-block: clamp(4rem, 8vw, 6rem);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
}
.hero-meta-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}
.hero-meta span {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--cream-3);
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: var(--cream);
  margin-bottom: 1.4rem;
  max-width: 14ch;
  text-wrap: balance;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--cream-2);
  max-width: 44ch;
  line-height: 1.65;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 1.8rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--r);
  transition: background 0.2s, transform 0.2s var(--ease-bounce), box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--cream);
  transform: scale(1.04);
  box-shadow: 0 12px 40px rgba(107,174,214,0.25);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--line-2);
  color: var(--cream-2);
  border-radius: var(--r);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--cream);
  background: var(--accent-glow);
}

/* Hero stats bar */
.hero-stats {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 10;
  background: rgba(11,13,15,0.7);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.hero-stats-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.stat-block {
  padding: 1.2rem var(--gutter);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-block:last-child { border-right: none; }
.stat-num {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 500;
  color: var(--cream);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-num span { color: var(--accent); }
.stat-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--cream-3);
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* =============================================================
   8. Marquee
   ============================================================= */
.marquee-section {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding: 0.8rem 0;
}
.marquee-track {
  display: flex;
  gap: 0;
  animation: marqueeScroll 28s linear infinite;
  width: max-content;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0 2rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-3);
  white-space: nowrap;
}
.marquee-item::after {
  content: '✦';
  color: var(--accent);
  font-size: 0.5rem;
}

/* =============================================================
   9. Services section
   ============================================================= */
#servicios {
  padding-block: clamp(4rem, 8vw, 7rem);
  background: var(--bg);
}

.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-header h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 500;
  margin-top: 0.8rem;
  color: var(--cream);
}
.section-header h2 em {
  font-style: italic;
  color: var(--accent);
}
.section-header p {
  color: var(--cream-2);
  max-width: 50ch;
  margin-top: 0.8rem;
  font-size: 1rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.service-card {
  background: var(--bg-card);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background 0.3s var(--ease-out);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 200px at var(--mx, 50%) var(--my, 50%),
    rgba(107,174,214,0.07) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover { background: var(--bg-card-2); }

.service-icon {
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cream);
}
.service-card p {
  font-size: 0.9rem;
  color: var(--cream-2);
  line-height: 1.65;
}
.service-arrow {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
}
.service-card:hover .service-arrow {
  opacity: 1;
  transform: none;
}

/* =============================================================
   10. Gallery / Projects
   ============================================================= */
#proyectos {
  padding-block: clamp(4rem, 8vw, 7rem);
  background: var(--bg-2);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out), filter 0.4s;
  filter: saturate(0.7);
}
.gallery-item:hover img {
  transform: scale(1.07);
  filter: saturate(1.1);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(11,13,15,0.75) 0%,
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  align-items: flex-end;
  padding: 1.2rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(11,13,15,0.6);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  border: 1px solid rgba(107,174,214,0.3);
}

/* =============================================================
   11. About section
   ============================================================= */
#nosotros {
  padding-block: clamp(4rem, 8vw, 7rem);
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.about-text h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.8vw, 3.2rem);
  font-weight: 500;
  color: var(--cream);
  margin: 0.8rem 0 1.2rem;
  line-height: 1.08;
}
.about-text h2 em { font-style: italic; color: var(--accent); }

.about-lead {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: var(--cream);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}
.about-body {
  font-size: 0.95rem;
  color: var(--cream-2);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.about-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.pillar {
  background: var(--bg-card);
  padding: 1.2rem;
  text-align: center;
}
.pillar-icon {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}
.pillar strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 0.2rem;
}
.pillar span {
  font-size: 0.72rem;
  color: var(--cream-3);
}

.about-image {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.about-image img {
  width: 100%; height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.75);
}
.about-image-badge {
  position: absolute;
  bottom: 1.2rem; right: 1.2rem;
  background: rgba(11,13,15,0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 0.8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.badge-num {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--cream);
  line-height: 1;
}
.badge-num span { color: var(--accent); }
.badge-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-3);
}

/* =============================================================
   12. Testimonials
   ============================================================= */
#testimonials {
  padding-block: clamp(3.5rem, 6vw, 5rem);
  background: var(--bg-2);
  overflow: hidden;
}

.testimonials-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.testimonials-track::-webkit-scrollbar { display: none; }

.testimonial-card {
  flex: 0 0 min(360px, 85vw);
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.testimonial-stars {
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.testimonial-text {
  font-size: 0.9rem;
  color: var(--cream-2);
  line-height: 1.7;
  flex: 1;
}
.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.testimonial-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--cream);
}
.testimonial-loc {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--cream-3);
  text-transform: uppercase;
}

/* =============================================================
   13. FAQ
   ============================================================= */
#faq {
  padding-block: clamp(4rem, 7vw, 6rem);
  background: var(--bg);
}

.faq-list {
  margin-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--cream);
  transition: color 0.2s;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.faq-question:hover { color: var(--accent); }
.faq-icon {
  width: 22px; height: 22px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--accent);
  transition: transform 0.3s var(--ease-out);
}
.faq-item.is-open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out);
}
.faq-answer-inner {
  padding-bottom: 1.2rem;
  font-size: 0.9rem;
  color: var(--cream-2);
  line-height: 1.7;
}

/* =============================================================
   14. Contact / Presupuesto form
   ============================================================= */
#contacto {
  padding-block: clamp(4rem, 8vw, 7rem);
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
#contacto::before {
  content: '';
  position: absolute;
  top: -40%; left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(107,174,214,0.07) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.contact-info h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  font-weight: 500;
  color: var(--cream);
  margin: 0.8rem 0 1rem;
}
.contact-info h2 em { font-style: italic; color: var(--accent); }
.contact-info p {
  font-size: 0.95rem;
  color: var(--cream-2);
  line-height: 1.7;
  max-width: 44ch;
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: var(--cream-2);
}
.contact-item-icon {
  width: 32px; height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.contact-item strong { color: var(--cream); font-weight: 600; }

/* Form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.form-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--cream);
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-3);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0.75rem 1rem;
  color: var(--cream);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--cream-3);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107,174,214,0.12);
}
.form-group textarea { resize: vertical; min-height: 110px; }

.form-select-wrapper {
  position: relative;
}
.form-select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 1rem; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--cream-3);
  font-size: 0.75rem;
}
.form-select-wrapper select {
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-submit {
  width: 100%;
  padding: 0.9rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: var(--r);
  margin-top: 1rem;
  transition: background 0.2s, transform 0.15s var(--ease-bounce), box-shadow 0.2s;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}
.form-submit:hover {
  background: var(--cream);
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(107,174,214,0.3);
}
.form-submit:active { transform: scale(0.98); }
.form-submit.is-sending { pointer-events: none; opacity: 0.7; }

.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem;
  gap: 1rem;
}
.form-success.is-visible { display: flex; }
.form-success-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(107,174,214,0.15);
  border: 1px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  animation: popIn 0.5s var(--ease-bounce) forwards;
}
@keyframes popIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.form-success h3 { color: var(--cream); font-size: 1.1rem; }
.form-success p { color: var(--cream-2); font-size: 0.9rem; }

/* =============================================================
   15. Footer
   ============================================================= */
footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding-block: 3rem 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.footer-logo {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-logo span { color: var(--accent); }
.footer-desc {
  font-size: 0.85rem;
  color: var(--cream-3);
  max-width: 30ch;
  line-height: 1.65;
}

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-3);
  margin-bottom: 0.9rem;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.footer-col a {
  font-size: 0.85rem;
  color: var(--cream-2);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.footer-copy {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--cream-3);
}
.footer-credits {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--cream-3);
  opacity: 0.5;
}
.footer-credits a {
  color: var(--cream-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =============================================================
   16. Tilt cards
   ============================================================= */
[data-tilt] {
  transform-style: preserve-3d;
  perspective: 800px;
  transition: transform 0.1s linear;
}

/* =============================================================
   17. Responsive — tablet+
   ============================================================= */
@media (min-width: 540px) {
  .hero-stats-inner {
    grid-template-columns: repeat(4, 1fr);
  }
  .stat-block { border-bottom: none; }
  .stat-block:last-child { border-right: none; }
  .stat-block:nth-child(odd) { border-right: 1px solid var(--line); }

  .form-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 720px) {
  .nav-links { display: flex; }
  .nav-burger, .nav-mobile { display: none !important; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }

  .about-grid { grid-template-columns: 1fr 1fr; }

  .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }

  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 960px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }

  .about-grid { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 5vw, 6rem); }
}

/* =============================================================
   18. Mobile nav show
   ============================================================= */
@media (max-width: 719px) {
  .nav-mobile { display: flex; }
}

/* =============================================================
   19. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-meta-dot { animation: none; }
  .marquee-track { animation: none; }
  .splash-bar::after { animation: none; transform: none; }
}
