/* ============================================================
   SHB Enginyeria — Archetype 05 Mouse-Reactive Gradient
   ============================================================ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:     #0a0a0a;
  --bg-2:   #111111;
  --bg-3:   #181818;
  --ink:    #f5f5f3;
  --mute:   #888886;
  --faint:  #333331;
  --accent: #00e5a0;   /* electric mint — ingeniería técnica */
  --g1:     #00e5a0;
  --g2:     #0066ff;
  --g3:     #7c3aed;
  --g4:     #00bfff;
  --nav-h:  72px;
  --ease:   cubic-bezier(.22,1,.36,1);
  --r:      12px;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  font-size: 16px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── Typography ── */
.hero-title, .section-title, .contact-title {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  line-height: 1.05;
  text-wrap: balance;
}
.hero-title em, .section-title em, .contact-title em {
  color: var(--accent);
  font-style: italic;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: .875rem;
  padding: .75rem 1.5rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: opacity .2s, transform .2s var(--ease);
}
.btn-primary:hover { opacity: .88; transform: translateY(-2px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  background: transparent;
  color: var(--ink);
  font-weight: 500;
  font-size: .875rem;
  padding: .75rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid var(--faint);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-full { width: 100%; justify-content: center; }

/* ── Section helpers ── */
.section-kicker {
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

/* ── Reveal animation ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem;
  transition: background .3s, backdrop-filter .3s;
}
.nav.is-solid {
  background: rgba(10,10,10,.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--faint);
}
.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.logo-shb {
  color: var(--accent);
  letter-spacing: -.02em;
}
.nav-logo span {
  font-weight: 300;
  font-size: .85rem;
  color: var(--mute);
  margin-left: .2rem;
  letter-spacing: .05em;
}
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: .875rem;
  color: var(--mute);
  transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: .45rem 1.1rem;
  border-radius: 9999px;
  transition: background .2s, color .2s;
}
.nav-cta:hover { background: var(--accent); color: #000; }
.nav-toggle { display: none; }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
  text-align: center;
}
.hero-gradient {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle 700px at var(--mx, 30%) var(--my, 60%),
      rgba(0,229,160,.28) 0%, transparent 55%),
    radial-gradient(circle 900px at calc(var(--mx, 30%) + 15%) calc(var(--my, 60%) - 20%),
      rgba(0,102,255,.22) 0%, transparent 55%),
    radial-gradient(circle 600px at 80% 20%,
      rgba(124,58,237,.18) 0%, transparent 55%),
    var(--bg);
  filter: blur(50px) saturate(140%);
  /* Gentle drift animation — not gated by reduced-motion (slow loop) */
  animation: gradDrift 25s ease-in-out infinite;
}
@keyframes gradDrift {
  0%,100% { transform: scale(1) rotate(0deg); }
  33%      { transform: scale(1.08) rotate(2deg); }
  66%      { transform: scale(1.04) rotate(-1deg); }
}
.hero-grain {
  position: absolute; inset: 0; z-index: 1;
  opacity: .035;
  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='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}
.hero-brand-bg {
  position: absolute;
  bottom: -0.1em;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(14rem, 32vw, 32rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,229,160,.14);
  letter-spacing: -.02em;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  white-space: nowrap;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.hero-eyebrow-line {
  display: block;
  width: 72px;
  height: 1px;
  background: var(--accent);
  opacity: .9;
}
.hero-content {
  position: relative; z-index: 2;
  padding: 5rem 2.5rem 5rem;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}
.hero-kicker {
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: .65;
}
.hero-title {
  font-size: clamp(3.5rem, 7vw, 7rem);
  margin-bottom: 1.5rem;
  letter-spacing: -.02em;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--mute);
  line-height: 1.65;
  max-width: 52ch;
  margin: 0 auto 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-bottom: 3.5rem; }
.hero-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--faint);
}
.hero-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
}
.hero-metric-num {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
}
.hero-metric-label {
  font-size: .65rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--mute);
}
.hero-metric-sep {
  width: 1px;
  height: 36px;
  background: var(--faint);
}
.hero-scroll-hint {
  position: absolute; bottom: 2rem; left: 5vw; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity: .3; transform: scaleY(1); }
  50%      { opacity: 1; transform: scaleY(1.2); }
}
.scroll-label {
  font-size: .65rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--mute);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ── TRUST STRIP ── */
.trust-strip {
  background: var(--bg);
  border-top: 2px solid rgba(0,229,160,.35);
  border-bottom: 1px solid var(--faint);
  padding: 1.1rem 5vw;
}
.trust-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}
.trust-item {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  opacity: .7;
}
.trust-sep { color: var(--faint); font-size: .75rem; }

/* ── TRUST BADGES ── */
.trust-badges {
  background: var(--bg-2);
  border-bottom: 1px solid var(--faint);
  padding: 1.4rem 5vw;
}
.trust-badges-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0,229,160,.07);
  border: 1px solid rgba(0,229,160,.2);
  padding: .4rem 1rem;
  border-radius: 9999px;
}
.trust-badge-icon {
  font-size: .85rem;
  line-height: 1;
}

/* ── TESTIMONIALS CAROUSEL ── */
.testimonials {
  padding: 6rem 5vw;
  background: var(--bg-3);
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
}
.testimonials-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.testimonials-header { margin-bottom: 3rem; }
.google-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--faint);
  border-radius: 9999px;
  padding: .4rem 1rem;
  font-size: .78rem;
  color: var(--mute);
  margin-top: 1.25rem;
}
.google-icon { flex-shrink: 0; }
.google-stars {
  color: #fbbc04;
  letter-spacing: .05em;
  font-size: .9rem;
}
.tcarousel-track {
  display: grid;
  grid-template-columns: 1fr;
}
.tcarousel-item {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0 2rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
  pointer-events: none;
}
.tcarousel-item.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.tcarousel-stars {
  color: #fbbc04;
  font-size: 1.1rem;
  letter-spacing: .15em;
  margin-bottom: 1.5rem;
}
.tcarousel-quote {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 2rem;
  padding: 0 .5rem;
}
.tcarousel-quote::before {
  content: '\201C';
  color: var(--accent);
  font-size: 3.5rem;
  line-height: 0;
  vertical-align: -.5em;
  margin-right: .1rem;
  font-style: normal;
}
.tcarousel-cite {
  font-style: normal;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
}
.tcarousel-cite strong {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
}
.tcarousel-cite span {
  font-size: .75rem;
  color: var(--mute);
  letter-spacing: .04em;
}
.tcarousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding-top: 1rem;
}
.tcarousel-btn {
  background: none;
  border: 1px solid var(--faint);
  color: var(--mute);
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: .95rem;
  transition: border-color .2s, color .2s;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tcarousel-btn:hover { border-color: var(--accent); color: var(--accent); }
.tcarousel-dots { display: flex; gap: .45rem; align-items: center; }
.tcarousel-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--faint);
  border: none;
  cursor: pointer;
  transition: background .3s, transform .3s;
  padding: 0;
}
.tcarousel-dot.is-active { background: var(--accent); transform: scale(1.5); }

/* ── STATS ── */
.stats {
  background: var(--bg-2);
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
  padding: 4rem 5vw;
}
.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.stat-item { text-align: center; }
.stat-num {
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 700;
  font-family: "Playfair Display", serif;
  color: var(--accent);
  font-style: italic;
  tabular-nums: true;
}
.stat-suffix { font-size: 1.4rem; color: var(--mute); }
.stat-label {
  font-size: .8rem;
  color: var(--mute);
  margin-top: .5rem;
  letter-spacing: .02em;
}

/* ── SERVEIS ── */
.serveis {
  padding: 8rem 5vw;
  max-width: 1200px;
  margin: 0 auto;
}
.serveis-header { margin-bottom: 4rem; }
.serveis-header .section-title {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
}
.serveis-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--faint);
  border: 1px solid var(--faint);
  border-radius: var(--r);
  overflow: hidden;
}
.servei-card {
  background: var(--bg-2);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: start;
  transition: background .3s;
  cursor: default;
}
.servei-card:hover { background: var(--bg-3); }
.servei-num {
  font-size: .75rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .1em;
  margin-top: .3rem;
}
.servei-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: .75rem;
}
.servei-body p {
  font-size: .9rem;
  color: var(--mute);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.servei-tags {
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.servei-tags li {
  font-size: .7rem;
  background: rgba(0,229,160,.1);
  color: var(--accent);
  border: 1px solid rgba(0,229,160,.2);
  padding: .2rem .65rem;
  border-radius: 9999px;
}
.servei-arrow {
  font-size: 1.2rem;
  color: var(--faint);
  transition: color .2s, transform .2s;
  margin-top: .2rem;
}
.servei-card:hover .servei-arrow { color: var(--accent); transform: translateX(4px); }

/* ── ABOUT ── */
.about {
  padding: 8rem 5vw;
  background: var(--bg-2);
  border-top: 1px solid var(--faint);
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.about-text .section-title {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  margin-bottom: 2rem;
}
.about-body {
  font-size: .95rem;
  color: var(--mute);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}
.about-img-wrap {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--r);
  overflow: hidden;
}
.about-img { transition: transform .8s var(--ease); }
.about-img-wrap:hover .about-img { transform: scale(1.04); }
.about-img-accent {
  position: absolute;
  bottom: -20px; right: -20px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .15;
  filter: blur(40px);
}

/* ── SECTORS ── */
.sectors {
  padding: 8rem 5vw;
  max-width: 1200px;
  margin: 0 auto;
}
.sectors-header { margin-bottom: 3rem; }
.sectors-list { margin-bottom: 4rem; }
.sector-row {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--faint);
  transition: color .2s;
}
.sector-row:hover { color: var(--accent); }
.sector-num { color: var(--accent); font-size: .85rem; }
.sector-name { font-size: 1.2rem; font-weight: 500; }
.sector-count { font-size: .8rem; color: var(--mute); }
.sectors-img-wrap {
  position: relative;
  height: 380px;
  border-radius: var(--r);
  overflow: hidden;
}
.sectors-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,.7) 0%, transparent 50%);
}

/* ── PROCESS ── */
.process {
  padding: 8rem 5vw;
  background: var(--bg-2);
  border-top: 1px solid var(--faint);
}
.process-header { max-width: 1200px; margin: 0 auto 3rem; }
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}
.process-step { padding: 2rem; border-left: 1px solid var(--faint); }
.step-num {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .1em;
  margin-bottom: 1rem;
}
.process-step h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: .75rem; }
.process-step p { font-size: .9rem; color: var(--mute); line-height: 1.6; }

/* ── CONTACT ── */
.contact {
  padding: 8rem 5vw;
  max-width: 1200px;
  margin: 0 auto;
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}
.contact-title {
  font-size: clamp(2.5rem, 4.5vw, 4.5rem);
  margin-bottom: 1rem;
}
.contact-sub { color: var(--mute); font-size: 1rem; margin-bottom: 2.5rem; }
.contact-details { display: flex; flex-direction: column; gap: 1rem; }
.contact-detail {
  display: flex; align-items: center; gap: .75rem;
  font-size: .9rem; color: var(--mute);
  transition: color .2s;
}
.contact-detail:hover { color: var(--ink); }
.detail-icon { font-size: 1rem; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { width: 100%; }
.form-input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--faint);
  color: var(--ink);
  padding: .875rem 1.1rem;
  border-radius: var(--r);
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  appearance: none;
}
.form-input::placeholder { color: var(--mute); }
.form-input:focus { border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 110px; }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-3); }

/* ── FOOTER ── */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--faint);
  padding: 3rem 5vw;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
}
.footer-logo em { font-style: normal; font-weight: 300; color: var(--mute); }
.footer-brand p { font-size: .8rem; color: var(--mute); margin-top: .3rem; }
.footer-cert {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  color: var(--accent);
  opacity: .75;
  margin-top: .45rem;
  letter-spacing: .04em;
}
.footer-nav { display: flex; gap: 2rem; }
.footer-nav a { font-size: .85rem; color: var(--mute); transition: color .2s; }
.footer-nav a:hover { color: var(--ink); }
.footer-copy { font-size: .75rem; color: var(--mute); }

/* ── CURSOR (desktop only) ── */
@media (hover: hover) and (pointer: fine) {
  .cursor { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; }
  .cursor-dot {
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity .25s;
    will-change: transform;
  }
  .cursor-ring {
    width: 36px; height: 36px;
    border: 1.5px solid rgba(0,229,160,.45);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity .25s, transform .18s var(--ease), width .2s, height .2s;
    will-change: transform;
  }
  .cursor.is-ready .cursor-dot,
  .cursor.is-ready .cursor-ring { opacity: 1; }
  .cursor.is-hovering .cursor-ring {
    width: 56px; height: 56px;
    border-color: var(--accent);
  }
}
@media (hover: none) { .cursor { display: none; } }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .about-inner { grid-template-columns: 1fr; gap: 3rem; }
  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
  .serveis-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column;
    gap: 5px; background: none; border: none;
    cursor: pointer; padding: .5rem;
  }
  .nav-toggle span {
    display: block; width: 22px; height: 1.5px;
    background: var(--ink);
    transition: .2s;
  }
  .hero-title { font-size: 2.8rem; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .about-img-wrap { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-nav { flex-wrap: wrap; gap: 1rem; }
}
