/* ============================================================
   ROVIRA'S CORPORATION — Design System
   Space Grotesk + Space Mono | Blue accent
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:      #0f0f0f;
  --white:      #ffffff;
  --blue:       #3b6ef8;
  --blue-light: #6b93ff;
  --blue-pale:  #eef2ff;
  --blue-dark:  #1e3fa0;
  --gray-50:    #f7f7f8;
  --gray-100:   #efefef;
  --gray-200:   #e0e0e0;
  --gray-400:   #9a9a9a;
  --gray-600:   #555555;
  --border:     2px solid var(--black);
  --shadow:     4px 4px 0 var(--black);
  --shadow-lg:  6px 6px 0 var(--black);
  --r:          12px;
  --r-lg:       24px;
  --r-xl:       36px;
  --font:       'Space Grotesk', sans-serif;
  --mono:       'Space Mono', monospace;
  --nav-h:      70px;
  --gap:        96px;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  line-height: 1.65;
  overflow-x: hidden;
}

/* ---- MOTION PREFS ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .marquee-track { animation: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---- FOCUS ---- */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ---- LAYOUT ---- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.section { padding: var(--gap) 0; }

/* ---- TYPOGRAPHY ---- */
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); font-weight: 700; line-height: 1.07; letter-spacing: -1.5px; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); font-weight: 700; line-height: 1.18; letter-spacing: -0.5px; }
h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
p  { color: var(--gray-600); line-height: 1.72; }
a  { color: inherit; text-decoration: none; }

/* ---- EYEBROW ---- */
.eyebrow {
  display: inline-flex; align-items: center;
  background: var(--blue-pale); color: var(--blue-dark);
  border: 1.5px solid var(--blue);
  border-radius: 999px; padding: 5px 16px;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 18px;
}

/* ---- SECTION HEADER ---- */
.section-header { margin-bottom: 60px; }
.section-header h2 { margin-bottom: 14px; }
.section-header.center { text-align: center; }
.section-header.center p { max-width: 560px; margin: 0 auto; }
.section-header p { font-size: 1.05rem; max-width: 620px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r); padding: 14px 28px;
  font-family: var(--font); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: var(--border);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: var(--white); box-shadow: var(--shadow); }
.btn-primary:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.btn-primary:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--black); }
.btn-outline { background: var(--white); color: var(--black); box-shadow: var(--shadow); }
.btn-outline:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); background: var(--gray-50); }
.btn-outline:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--black); }
.btn-lg { padding: 18px 36px; font-size: 1rem; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-full { width: 100%; }
.btn-ghost { background: none; border-color: transparent; box-shadow: none; padding: 0; }
.btn-ghost:hover { background: none; box-shadow: none; transform: none; }

/* ---- LINK BUTTON ---- */
.link-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: inherit; color: inherit;
  text-decoration: underline; padding: 0;
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9990;
  background: var(--black); color: var(--white);
  border-top: 2px solid var(--blue);
  padding: 18px 28px;
  transform: translateY(0); transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.cookie-banner.hide { transform: translateY(110%); }
.cookie-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cookie-text { flex: 1; min-width: 220px; }
.cookie-text p { color: rgba(255,255,255,0.78); font-size: 0.9rem; }
.cookie-text strong { color: var(--white); }
.cookie-text a { color: var(--blue-light); text-decoration: underline; }
.cookie-actions { display: flex; gap: 12px; flex-shrink: 0; }
.cookie-actions .btn-outline { border-color: rgba(255,255,255,0.35); color: var(--white); background: transparent; }
.cookie-actions .btn-outline:hover { background: rgba(255,255,255,0.08); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav-wrapper {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border);
  height: var(--nav-h);
  transition: box-shadow 0.3s;
}
.nav-wrapper.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,0.08); }
.nav {
  display: flex; align-items: center; gap: 36px;
  height: 100%;
}
.nav-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-logo img { height: 36px; width: auto; display: block; }
.nav-logo-fallback {
  height: 36px; display: flex; align-items: center; justify-content: center;
  background: var(--blue); color: var(--white);
  border: var(--border); border-radius: 8px;
  font-weight: 700; font-size: 0.85rem; padding: 0 10px; letter-spacing: -0.5px;
}
.nav-links { display: flex; list-style: none; gap: 4px; flex: 1; margin: 0; padding: 0; }
.nav-links a {
  font-weight: 500; font-size: 0.9rem; padding: 6px 12px;
  border-radius: 8px; transition: background var(--transition), color var(--transition);
  color: var(--gray-600);
}
.nav-links a:hover { background: var(--gray-50); color: var(--black); }
.nav-links a.active { background: var(--blue-pale); color: var(--blue-dark); font-weight: 600; }

.nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

/* Lang */
.lang-sw { display: flex; background: var(--gray-100); border: var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.lang-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: 0.78rem; font-weight: 700; color: var(--gray-400);
  padding: 4px 9px; border-radius: 7px; transition: all var(--transition);
}
.lang-btn.active { background: var(--black); color: var(--white); }

/* Mobile toggle */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--black); transition: all 0.25s; border-radius: 2px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--white); border-top: var(--border);
  padding: 28px;
  transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column; gap: 8px; overflow-y: auto; z-index: 899;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  font-size: 1.2rem; font-weight: 600; padding: 14px 16px;
  border-radius: var(--r); border: 1.5px solid transparent;
  transition: all var(--transition); display: block; color: var(--gray-600);
}
.mobile-menu a:hover { background: var(--gray-50); color: var(--black); border-color: var(--gray-200); }
.mobile-menu a.active { background: var(--blue-pale); color: var(--blue-dark); }
.mobile-bottom { margin-top: auto; padding-top: 24px; border-top: 1.5px solid var(--gray-200); display: flex; flex-direction: column; gap: 12px; }
.mobile-lang { display: flex; gap: 8px; }
.mobile-lang .lang-btn { border: 1.5px solid var(--gray-200); border-radius: 8px; color: var(--gray-600); padding: 8px 16px; font-size: 0.9rem; }
.mobile-lang .lang-btn.active { background: var(--black); color: var(--white); border-color: var(--black); }

/* ============================================================
   PAGE HERO (shared across subpages)
   ============================================================ */
.page-hero {
  padding: 72px 0 80px;
  border-bottom: var(--border);
  background: var(--gray-50);
  overflow: hidden; position: relative;
}
.page-hero-inner { position: relative; z-index: 1; }
.page-hero h1 { margin-bottom: 20px; }
.page-hero p { font-size: 1.1rem; max-width: 560px; }
.page-hero-deco {
  position: absolute; right: -80px; top: -60px;
  width: 400px; height: 400px;
  border: 2px solid var(--blue);
  border-radius: 50%; opacity: 0.12;
  animation: rotate-slow 30s linear infinite;
}
.page-hero-deco2 {
  position: absolute; right: 60px; top: 20px;
  width: 220px; height: 220px;
  border: 2px solid var(--blue);
  border-radius: 50%; opacity: 0.08;
  animation: rotate-slow 20s linear infinite reverse;
}
@keyframes rotate-slow { to { transform: rotate(360deg); } }

/* ============================================================
   HERO (homepage)
   ============================================================ */
.hero {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
  padding: 88px 0 100px;
  border-bottom: var(--border);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-pale); border: 1.5px solid var(--blue);
  color: var(--blue-dark); border-radius: 999px;
  padding: 6px 18px; font-size: 0.82rem; font-weight: 700;
  margin-bottom: 28px; letter-spacing: 0.3px;
}
.hero-badge svg { width: 16px; height: 16px; }
h1 em {
  font-style: normal; color: var(--blue);
  position: relative; display: inline-block;
}
h1 em::after {
  content: ''; position: absolute; bottom: 2px; left: 0; right: 0;
  height: 4px; background: var(--blue); border-radius: 2px; opacity: 0.25;
}
.hero-desc { font-size: 1.1rem; margin: 28px 0 40px; max-width: 500px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats {
  display: flex; gap: 36px; flex-wrap: wrap;
  padding-top: 36px; border-top: 1.5px solid var(--gray-200);
}
.hero-stats > div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong { font-size: 1.8rem; font-weight: 700; color: var(--black); line-height: 1; }
.hero-stats span { font-size: 0.75rem; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.5px; }

/* Hero visual */
.hero-visual { position: relative; height: 480px; }
.hero-ring {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 360px; height: 360px;
  border: 2px solid var(--blue); border-radius: 50%; opacity: 0.15;
  animation: pulse-ring 3s ease-in-out infinite;
}
.hero-ring2 {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 280px; height: 280px;
  border: 1.5px solid var(--blue); border-radius: 50%; opacity: 0.1;
  animation: pulse-ring 3s ease-in-out infinite 0.5s;
}
@keyframes pulse-ring { 0%,100%{transform:translate(-50%,-50%) scale(1);opacity:0.15} 50%{transform:translate(-50%,-50%) scale(1.05);opacity:0.25} }
.hero-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 180px; height: 180px; background: var(--blue);
  border: var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%,100%{transform:translate(-50%,-50%) translateY(0)} 50%{transform:translate(-50%,-50%) translateY(-12px)} }
.hero-center svg { width: 72px; height: 72px; color: var(--white); }
.hero-chip {
  position: absolute;
  background: var(--white); border: var(--border); border-radius: var(--r);
  padding: 12px 18px; font-size: 0.82rem; font-weight: 600;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px;
  white-space: nowrap; animation: float 4s ease-in-out infinite;
}
.hero-chip:nth-child(5) { top: 60px; left: 0; animation-delay: 0.3s; }
.hero-chip:nth-child(6) { top: 60px; right: 0; animation-delay: 0.6s; }
.hero-chip:nth-child(7) { bottom: 60px; left: 20px; animation-delay: 0.9s; }
.hero-chip:nth-child(8) { bottom: 60px; right: 20px; animation-delay: 1.2s; }
.chip-dot { width: 8px; height: 8px; background: var(--blue); border-radius: 50%; flex-shrink: 0; }
.chip-dot.on { animation: blink 2s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ============================================================
   LOGOS BAR
   ============================================================ */
.logos-bar { border-top: var(--border); border-bottom: var(--border); padding: 32px 0; background: var(--gray-50); overflow: hidden; }
.logos-bar-inner { display: flex; align-items: center; gap: 32px; }
.logos-label { font-size: 0.78rem; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.8px; white-space: nowrap; flex-shrink: 0; }
.logos-track { overflow: hidden; flex: 1; }
.marquee-track { display: flex; gap: 0; width: max-content; animation: marquee 28s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.logo-item {
  display: flex; align-items: center; justify-content: center;
  padding: 0 40px; height: 52px; flex-shrink: 0;
  border-right: 1.5px solid var(--gray-200);
}
.logo-item img { max-height: 32px; max-width: 120px; width: auto; filter: grayscale(1); opacity: 0.55; transition: all var(--transition); }
.logo-item img:hover { filter: grayscale(0); opacity: 1; }
/* Fallback text for missing logos */
.logo-item span { font-size: 0.82rem; font-weight: 700; color: var(--gray-400); letter-spacing: -0.3px; }

/* ============================================================
   SERVICES GRID
   ============================================================ */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.svc-card {
  border: var(--border); border-radius: var(--r-xl);
  padding: 40px 36px; display: flex; flex-direction: column; gap: 14px;
  background: var(--gray-50); position: relative; overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.svc-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--blue); opacity: 0; border-radius: var(--r-xl);
  transition: opacity var(--transition);
}
.svc-card:hover { transform: translate(-3px,-3px); box-shadow: var(--shadow-lg); }
.svc-card.dark { background: var(--black); color: var(--white); }
.svc-card.dark p { color: rgba(255,255,255,0.65); }
.svc-card.blue { background: var(--blue); color: var(--white); }
.svc-card.blue p { color: rgba(255,255,255,0.78); }
.svc-icon {
  width: 52px; height: 52px;
  background: var(--white); border: var(--border); border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative; z-index: 1;
}
.svc-card.dark .svc-icon { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.svc-card.blue .svc-icon { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.25); }
.svc-icon svg { width: 24px; height: 24px; color: var(--blue); }
.svc-card.dark .svc-icon svg,
.svc-card.blue .svc-icon svg { color: var(--white); }
.svc-card h3 { font-size: 1.25rem; position: relative; z-index: 1; }
.svc-card p { position: relative; z-index: 1; font-size: 0.94rem; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 7px; position: relative; z-index: 1; margin-top: 4px; }
.svc-tags span {
  border: 1.5px solid rgba(0,0,0,0.2); border-radius: 999px;
  padding: 3px 11px; font-size: 0.75rem; font-weight: 600; color: var(--gray-600);
}
.svc-card.dark .svc-tags span { border-color: rgba(255,255,255,0.25); color: rgba(255,255,255,0.7); }
.svc-card.blue .svc-tags span { border-color: rgba(255,255,255,0.35); color: rgba(255,255,255,0.85); }
.svc-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 0.88rem;
  border-bottom: 2px solid currentColor; padding-bottom: 1px; width: fit-content;
  transition: gap var(--transition); position: relative; z-index: 1; margin-top: auto;
}
.svc-link:hover { gap: 10px; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  border: var(--border); border-radius: var(--r-xl);
  background: var(--black); color: var(--white);
  padding: 64px 56px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px; flex-wrap: wrap;
  position: relative; overflow: hidden;
  margin: 0 0 var(--gap);
}
.cta-banner::before {
  content: ''; position: absolute;
  width: 400px; height: 400px; right: -100px; top: -150px;
  background: var(--blue); border-radius: 50%; opacity: 0.15;
  animation: pulse-ring 5s ease-in-out infinite;
}
.cta-banner-text { flex: 1; min-width: 280px; position: relative; z-index: 1; }
.cta-banner-text h2 { color: var(--white); margin-bottom: 12px; }
.cta-banner-text p { color: rgba(255,255,255,0.68); font-size: 1.02rem; }
.cta-banner .btn-outline { border-color: rgba(255,255,255,0.4); color: var(--white); background: transparent; position: relative; z-index: 1; }
.cta-banner .btn-outline:hover { background: rgba(255,255,255,0.08); }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.about-text p { margin-bottom: 18px; font-size: 1.02rem; }
.about-values { list-style: none; display: flex; flex-direction: column; gap: 20px; margin-top: 32px; }
.about-values li { display: flex; gap: 16px; align-items: flex-start; }
.val-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border: var(--border); border-radius: var(--r);
  background: var(--blue-pale); display: flex; align-items: center; justify-content: center;
}
.val-icon svg { width: 20px; height: 20px; color: var(--blue); }
.about-values strong { display: block; margin-bottom: 3px; }
.about-values p { margin: 0; font-size: 0.92rem; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-box {
  border: var(--border); border-radius: var(--r-lg);
  padding: 28px 24px; display: flex; flex-direction: column; gap: 6px;
  background: var(--gray-50);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-box:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow); }
.stat-box.blue { background: var(--blue); border-color: var(--black); }
.stat-box.blue strong { color: var(--white); }
.stat-box.blue span { color: rgba(255,255,255,0.7); }
.stat-box strong { font-size: 2.6rem; font-weight: 700; line-height: 1; }
.stat-box span { font-size: 0.88rem; color: var(--gray-600); font-weight: 500; }

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.proj-card {
  border: var(--border); border-radius: var(--r-xl);
  padding: 36px 30px; display: flex; flex-direction: column; gap: 14px;
  background: var(--gray-50);
  transition: transform var(--transition), box-shadow var(--transition);
}
.proj-card:hover { transform: translate(-3px,-3px); box-shadow: var(--shadow-lg); }
.proj-card.dark { background: var(--black); color: var(--white); }
.proj-card.dark p { color: rgba(255,255,255,0.68); }
.proj-card.dark .proj-result-num { color: var(--white); }
.proj-card.blue { background: var(--blue); color: var(--white); }
.proj-card.blue p { color: rgba(255,255,255,0.78); }
.proj-card.blue .proj-result-num { color: var(--white); }
.proj-meta { display: flex; align-items: center; gap: 10px; }
.proj-num { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; opacity: 0.4; }
.proj-tag {
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: 999px; padding: 3px 10px; font-size: 0.75rem; font-weight: 600;
}
.proj-card.dark .proj-tag { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: var(--white); }
.proj-card.blue .proj-tag { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); color: var(--white); }
.proj-card h3 { font-size: 1.2rem; }
.proj-result { margin-top: auto; padding-top: 18px; border-top: 1.5px solid rgba(0,0,0,0.1); }
.proj-card.dark .proj-result { border-color: rgba(255,255,255,0.15); }
.proj-card.blue .proj-result { border-color: rgba(255,255,255,0.2); }
.proj-result-num { font-size: 1.9rem; font-weight: 700; display: block; line-height: 1; color: var(--blue); }
.proj-result p { font-size: 0.82rem; color: var(--gray-400); margin-top: 3px; }

/* ============================================================
   PROCESS / ACCORDION
   ============================================================ */
.accordion { display: flex; flex-direction: column; }
.acc-item {
  border: var(--border); border-radius: var(--r);
  margin-bottom: -2px; background: var(--white);
  transition: background var(--transition);
}
.acc-item:first-child { border-radius: var(--r) var(--r) 0 0; }
.acc-item:last-child { border-radius: 0 0 var(--r) var(--r); margin-bottom: 0; }
.acc-item.open { background: var(--gray-50); }
.acc-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 28px; background: none; border: none; cursor: pointer;
  font-family: var(--font); text-align: left;
}
.acc-btn-left { display: flex; align-items: center; gap: 20px; }
.acc-num { font-family: var(--mono); font-size: 0.8rem; color: var(--gray-400); font-weight: 700; flex-shrink: 0; }
.acc-btn h3 { font-size: 1.05rem; font-weight: 600; margin: 0; }
.acc-icon {
  width: 34px; height: 34px; border: var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform var(--transition), background var(--transition);
}
.acc-icon svg { width: 14px; height: 14px; }
.acc-item.open .acc-icon { background: var(--blue); transform: rotate(45deg); }
.acc-item.open .acc-icon svg { color: var(--white); }
.acc-body {
  overflow: hidden; max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
}
.acc-body-inner { padding: 0 28px 22px 68px; }
.acc-body-inner p { max-width: 600px; font-size: 0.95rem; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.test-card {
  border: var(--border); border-radius: var(--r-xl);
  padding: 32px 28px; background: var(--gray-50);
  display: flex; flex-direction: column; gap: 18px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.test-card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow); }
.test-card.blue { background: var(--blue); color: var(--white); }
.test-stars { color: #f59e0b; font-size: 0.95rem; letter-spacing: 1.5px; }
.test-quote { font-size: 0.93rem; line-height: 1.75; font-style: italic; color: var(--gray-600); flex: 1; }
.test-card.blue .test-quote { color: rgba(255,255,255,0.8); }
.test-person { display: flex; align-items: center; gap: 12px; }
.test-avatar {
  width: 44px; height: 44px; background: var(--black); color: var(--white);
  border: var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; flex-shrink: 0;
}
.test-card.blue .test-avatar { background: rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.25); }
.test-name { font-weight: 700; font-size: 0.92rem; display: block; }
.test-role { font-size: 0.8rem; color: var(--gray-400); }
.test-card.blue .test-role { color: rgba(255,255,255,0.65); }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { display: flex; flex-direction: column; }
.faq-item { border: var(--border); border-radius: var(--r); margin-bottom: -2px; }
.faq-item:first-child { border-radius: var(--r) var(--r) 0 0; }
.faq-item:last-child { border-radius: 0 0 var(--r) var(--r); margin-bottom: 0; }
.faq-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 28px; background: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: 0.97rem; font-weight: 600; text-align: left;
  transition: background var(--transition);
}
.faq-btn:hover { background: var(--gray-50); }
.faq-icon { width: 32px; height: 32px; border: var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all var(--transition); }
.faq-icon svg { width: 13px; height: 13px; }
.faq-item.open .faq-icon { background: var(--blue); border-color: var(--blue); transform: rotate(45deg); }
.faq-item.open .faq-icon svg { color: var(--white); }
.faq-body { overflow: hidden; max-height: 0; transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1); }
.faq-body-inner { padding: 0 28px 20px 28px; }
.faq-body-inner p { font-size: 0.94rem; max-width: 700px; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.7fr; gap: 60px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-item-icon {
  width: 46px; height: 46px; background: var(--blue-pale);
  border: var(--border); border-radius: var(--r);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-item-icon svg { width: 20px; height: 20px; color: var(--blue); }
.contact-item strong { display: block; font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.contact-item a, .contact-item span { font-size: 0.93rem; color: var(--gray-600); }
.contact-item a:hover { color: var(--blue); text-decoration: underline; }

/* Form wrapper */
.form-card {
  border: var(--border); border-radius: var(--r-xl);
  padding: 40px; background: var(--gray-50);
}
.form-card h3 { margin-bottom: 6px; }
.form-note { font-size: 0.8rem; color: var(--gray-400); margin-bottom: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-field label { font-size: 0.86rem; font-weight: 600; }
.form-field label .req { color: #e44; margin-left: 2px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 15px;
  border: var(--border); border-radius: 10px;
  font-family: var(--font); font-size: 0.93rem;
  background: var(--white); color: var(--black);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none; -webkit-appearance: none;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,110,248,0.15);
}
.form-field input.err, .form-field select.err, .form-field textarea.err { border-color: #e44; }
.field-err { font-size: 0.78rem; color: #e44; min-height: 16px; }
.form-field textarea { resize: vertical; min-height: 100px; }
.check-row { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; font-size: 0.86rem; line-height: 1.55; }
.check-row input[type="checkbox"] { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; accent-color: var(--blue); cursor: pointer; }
.form-success {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center; padding: 56px 24px;
}
.form-success svg { width: 56px; height: 56px; color: var(--blue); }
.form-success h3 { font-size: 1.4rem; }
.form-sending { opacity: 0.6; pointer-events: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--black); color: var(--white); border-top: var(--border); padding: 64px 0 32px; }
.footer p { color: rgba(255,255,255,0.55); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-brand img { height: 32px; width: auto; filter: brightness(0) invert(1); }
.footer-logo-fallback { height: 32px; background: var(--blue); border: 1.5px solid rgba(255,255,255,0.2); border-radius: 7px; display: inline-flex; align-items: center; padding: 0 10px; font-weight: 700; font-size: 0.85rem; color: var(--white); width: fit-content; }
.footer-brand p { font-size: 0.9rem; max-width: 280px; line-height: 1.6; }
.footer-social { display: flex; gap: 10px; margin-top: 4px; }
.footer-social a {
  width: 38px; height: 38px; border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: var(--r); display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.footer-social a svg { width: 18px; height: 18px; color: rgba(255,255,255,0.6); }
.footer-social a:hover { border-color: var(--blue-light); background: rgba(59,110,248,0.15); }
.footer-social a:hover svg { color: var(--blue-light); }
.footer-col h4 { font-size: 0.9rem; font-weight: 700; color: var(--white); margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-btn { font-size: 0.88rem; color: rgba(255,255,255,0.55); transition: color var(--transition); cursor: pointer; background: none; border: none; font-family: var(--font); text-align: left; }
.footer-col a:hover, .footer-btn:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { font-size: 0.83rem; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-bg {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.modal-bg.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--white); border: var(--border); border-radius: var(--r-xl);
  padding: 44px 44px 36px;
  max-width: 620px; width: 100%; max-height: 85vh; overflow-y: auto;
  position: relative;
  transform: scale(0.93) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-bg.open .modal-box { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 34px; height: 34px; background: var(--gray-100); border: var(--border);
  border-radius: var(--r); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.modal-close svg { width: 14px; height: 14px; }
.modal-close:hover { background: var(--gray-200); }
.modal-box h2 { margin-bottom: 24px; font-size: 1.5rem; }
.modal-body h3 { font-size: 0.95rem; margin: 18px 0 6px; }
.modal-body p { font-size: 0.88rem; margin-bottom: 8px; }
.modal-body a { color: var(--blue); text-decoration: underline; }
.cookie-modal-btns { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1), transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
[data-reveal="up"]    { transform: translateY(32px); }
[data-reveal="left"]  { transform: translateX(-32px); }
[data-reveal="right"] { transform: translateX(32px); }
[data-reveal="scale"] { transform: scale(0.92); }
[data-reveal="fade"]  { transform: none; }
[data-reveal].visible { opacity: 1; transform: none; }

/* Stagger children */
[data-stagger] > * {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1), transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
[data-stagger].visible > *:nth-child(1) { transition-delay: 0.05s; }
[data-stagger].visible > *:nth-child(2) { transition-delay: 0.13s; }
[data-stagger].visible > *:nth-child(3) { transition-delay: 0.21s; }
[data-stagger].visible > *:nth-child(4) { transition-delay: 0.29s; }
[data-stagger].visible > *:nth-child(5) { transition-delay: 0.37s; }
[data-stagger].visible > *:nth-child(6) { transition-delay: 0.45s; }
[data-stagger].visible > * { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  :root { --gap: 64px; --nav-h: 64px; }
  .nav-links, .nav-right .btn, .nav-right .lang-sw { display: none; }
  .nav-toggle { display: flex; }
  .hero { grid-template-columns: 1fr; padding: 48px 0 64px; gap: 40px; }
  .hero-visual { height: 280px; }
  .hero-center { width: 120px; height: 120px; }
  .hero-center svg { width: 48px; height: 48px; }
  .hero-ring { width: 240px; height: 240px; }
  .hero-ring2 { width: 180px; height: 180px; }
  .hero-chip { font-size: 0.76rem; padding: 9px 13px; }
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .cta-banner { flex-direction: column; padding: 40px 28px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .logos-bar-inner { flex-direction: column; gap: 14px; }
  .modal-box { padding: 28px 20px 24px; }
  .acc-body-inner { padding-left: 28px; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 20px; }
  .about-stats { grid-template-columns: 1fr; }
  .hero-chip:nth-child(6), .hero-chip:nth-child(8) { display: none; }
  .page-hero-deco, .page-hero-deco2 { display: none; }
  .form-card { padding: 24px 18px; }
}

/* ============================================================
   CRITICAL: hidden attribute support
   ============================================================ */
[hidden] { display: none !important; }

/* ============================================================
   PROMO BANNER (estiu)
   ============================================================ */
.promo-banner {
  background: var(--blue); color: var(--white);
  text-align: center; padding: 11px 24px;
  font-size: 0.85rem; font-weight: 600;
  position: relative; z-index: 910;
  border-bottom: 2px solid var(--black);
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
}
.promo-banner a { color: var(--white); text-decoration: underline; text-underline-offset: 2px; }
.promo-countdown {
  font-family: var(--mono); font-size: 0.82rem; font-weight: 700;
  background: rgba(0,0,0,0.25); border-radius: 6px; padding: 2px 10px;
  letter-spacing: 0.5px;
}
.promo-close {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--white);
  opacity: 0.7; transition: opacity var(--transition); padding: 4px;
  display: flex; align-items: center; justify-content: center;
}
.promo-close:hover { opacity: 1; }
.promo-close svg { width: 14px; height: 14px; }

/* ============================================================
   LANG SWITCHER — slide animation
   ============================================================ */
.lang-sw { position: relative; }
.lang-indicator {
  position: absolute; top: 3px; bottom: 3px;
  background: var(--black); border-radius: 7px;
  transition: left 0.28s cubic-bezier(0.4,0,0.2,1), width 0.28s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none; z-index: 0;
}
.lang-btn { position: relative; z-index: 1; }
.lang-btn.active { color: var(--white) !important; }
/* Mobile lang */
.mobile-lang { position: relative; }
.mobile-lang-indicator {
  position: absolute; top: 0; bottom: 0;
  background: var(--black); border-radius: 8px;
  transition: left 0.28s cubic-bezier(0.4,0,0.2,1), width 0.28s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none; z-index: 0;
}
.mobile-lang .lang-btn { position: relative; z-index: 1; }
.mobile-lang .lang-btn.active { color: var(--white) !important; border-color: transparent !important; }

/* ============================================================
   LANG CONTENT TRANSITION
   ============================================================ */
.lang-fade-out { opacity: 0; transform: translateX(-12px); transition: opacity 0.18s, transform 0.18s; }
.lang-fade-in  { animation: langSlideIn 0.28s cubic-bezier(0.4,0,0.2,1) both; }
@keyframes langSlideIn {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   PRICING PAGE
   ============================================================ */
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.price-card {
  border: var(--border); border-radius: var(--r-xl); padding: 40px 32px;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--gray-50); position: relative; overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.price-card:hover { transform: translate(-3px,-3px); box-shadow: var(--shadow-lg); }
.price-card.featured { background: var(--black); color: var(--white); }
.price-card.featured p { color: rgba(255,255,255,0.65); }
.price-badge {
  position: absolute; top: 20px; right: 20px;
  background: var(--blue); color: var(--white); border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; padding: 3px 11px; letter-spacing: 0.3px;
}
.price-name { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--blue); margin-bottom: 4px; }
.price-card.featured .price-name { color: var(--blue-light); }
.price-amount { font-size: 2.8rem; font-weight: 700; line-height: 1; margin: 10px 0 4px; }
.price-card.featured .price-amount { color: var(--white); }
.price-from { font-size: 0.8rem; color: var(--gray-400); margin-bottom: 20px; }
.price-card.featured .price-from { color: rgba(255,255,255,0.45); }
.price-divider { height: 1.5px; background: var(--gray-200); margin: 18px 0; }
.price-card.featured .price-divider { background: rgba(255,255,255,0.15); }
.price-features { list-style: none; display: flex; flex-direction: column; gap: 12px; flex: 1; margin-bottom: 28px; }
.price-features li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; }
.price-features li .chk { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--blue); }
.price-card.featured .chk { color: var(--blue-light); }
.price-note {
  background: var(--blue-pale); border: 1.5px solid var(--blue);
  border-radius: var(--r); padding: 16px 18px;
  font-size: 0.86rem; margin-bottom: 36px;
}
.price-note strong { color: var(--blue-dark); display: block; margin-bottom: 4px; }
.price-note p { color: var(--gray-600); margin: 0; }

@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ============================================================
   PROMO CARD (inline, pàgina de preus)
   ============================================================ */
.promo-card {
  border: 2px solid var(--blue); border-radius: var(--r-xl);
  background: var(--blue-pale); padding: 36px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  flex-wrap: wrap; position: relative; overflow: hidden;
  margin-bottom: var(--gap);
}
.promo-card::before {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 200px; height: 200px; background: var(--blue); opacity: 0.08; border-radius: 50%;
}
.promo-card-text h3 { font-size: 1.3rem; color: var(--blue-dark); margin-bottom: 6px; }
.promo-card-text p { color: var(--blue-dark); opacity: 0.8; font-size: 0.95rem; }
.promo-timer-block { font-family: var(--mono); font-size: 0.82rem; font-weight: 700; color: var(--blue-dark); margin-top: 8px; }
