/* ==========================================================================
   Go Tech - Design System & Base Styles
   ========================================================================== */

:root {
  /* Brand Primitives */
  --brand-teal: #00A896;
  --brand-teal-hover: #008F80;
  --brand-teal-glow: #00C4AE;
  --brand-teal-deep: #028090; /* button background: 4.67:1 with white text (WCAG AA) */
  --brand-teal-deep-hover: #016B78;
  
  --brand-violet: #7B2CBF;
  --brand-violet-hover: #6A25A5;
  --brand-violet-glow: #9D4EDD;
  
  --brand-dark: #161922;

  /* Backgrounds (Dark Mode Default) */
  --bg-base: #0D0F15;
  --bg-surface: #161924;
  --bg-surface-elevated: #1F2432;
  
  /* Typography */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  
  /* Borders */
  --border-default: #272E3F;
  
  /* Accents */
  --accent-teal: var(--brand-teal-glow);
  --accent-violet: var(--brand-violet-glow);
  
  /* Status Colors */
  --status-success: #34D399;
  --status-warning: #FBBF24;
  --status-error: #F87171;

  /* Typography Fonts */
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Border Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-brand: 10px;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.2;
}

h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 2.5rem; font-weight: 700; }
h3 { font-size: 1.75rem; font-weight: 700; }
p { color: var(--text-secondary); }
a { color: var(--brand-teal); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--brand-teal-glow); }

/* Utility Classes for Glassmorphism & UI */
.glass-panel {
  background: rgba(22, 25, 36, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
}

.ai-badge {
  background: rgba(157, 78, 221, 0.15);
  color: var(--brand-violet-glow);
  border: 1px solid rgba(157, 78, 221, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-block;
}

.btn-primary {
  background-color: var(--brand-teal-deep);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 12px rgba(0, 196, 174, 0.25);
}

.btn-primary:hover {
  color: #fff;
  background-color: var(--brand-teal-deep-hover);
  box-shadow: 0 0 20px rgba(0, 196, 174, 0.4);
  transform: translateY(-2px);
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  text-align: center;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
  border-color: var(--text-secondary);
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding {
  padding: 100px 0;
}

.text-center { text-align: center; }
.text-brand { color: var(--brand-teal-glow); }
.text-violet { color: var(--brand-violet-glow); }

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(13, 15, 21, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-default);
  padding: 16px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  display: block;
}

.logo img {
  display: block;
}

.nav-links {
  display: flex;
  gap: 32px;
}

/* Hamburger (mobile only) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* "Fale Conosco" highlighted in the menu */
.nav-links a.text-brand {
  color: var(--brand-teal-glow);
}

.nav-links a.text-brand:hover {
  color: var(--text-primary);
}

/* Skip link: hidden until focused with the keyboard */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10001;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--brand-teal-deep);
  color: #fff;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
  color: #fff;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

main:focus {
  outline: none;
}

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

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(0, 196, 174, 0.15) 0%, rgba(123, 44, 191, 0.05) 50%, rgba(13, 15, 21, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-content h1 {
  margin-bottom: 24px;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-inline: auto;
}

/* Grid Layouts for Sections */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 32px;
}

/* Services / Features */
.feature-card {
  padding: 32px;
  transition: translate 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  translate: 0 -5px;
  border-color: var(--brand-teal);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  color: var(--brand-teal-glow);
  background: rgba(0, 196, 174, 0.1);
  border: 1px solid rgba(0, 196, 174, 0.25);
  box-shadow: 0 0 12px rgba(0, 196, 174, 0.15);
}

.feature-icon--violet {
  color: var(--brand-violet-glow);
  background: rgba(157, 78, 221, 0.12);
  border-color: rgba(157, 78, 221, 0.3);
  box-shadow: 0 0 12px rgba(157, 78, 221, 0.2);
}

/* Portfolio Section */
.portfolio-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  transition: translate 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
  border-color: var(--brand-violet-glow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  translate: 0 -5px;
}

.portfolio-img {
  width: 100%;
  height: 200px;
  background-color: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.portfolio-logo {
  max-width: 70%;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.9;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Square/vertical logos need more height to stay legible */
.portfolio-logo.logo-tall {
  max-height: 120px;
}

.marquee-group img.logo-tall {
  height: 56px;
}

.portfolio-card:hover .portfolio-logo {
  opacity: 1;
  transform: scale(1.05);
}

.portfolio-info {
  padding: 24px;
}

.portfolio-title {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

/* Portfolio filter */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: -24px 0 40px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font: 500 0.92rem var(--font-sans);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.filter-btn span {
  font-size: 0.75rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.filter-btn.is-active {
  color: var(--text-primary);
  border-color: var(--brand-teal-glow);
  background: rgba(0, 196, 174, 0.12);
  box-shadow: 0 0 12px rgba(0, 196, 174, 0.2);
}

.filter-btn.is-active span {
  background: rgba(0, 196, 174, 0.25);
}

.filter-btn:focus-visible {
  outline: 2px solid var(--brand-teal-glow);
  outline-offset: 2px;
}

.portfolio-card.is-filtered-out {
  display: none;
}

/* Illustrations for cases without a public site */
.portfolio-img--ia {
  background: radial-gradient(circle at 50% 40%, rgba(123, 44, 191, 0.25), transparent 70%), var(--bg-surface-elevated);
  padding: 20px 24px;
}

.chat-mock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 280px;
}

.chat-bubble {
  max-width: 85%;
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.chat-bubble--lead {
  align-self: flex-end;
  color: var(--text-primary);
  background: var(--border-default);
  border-bottom-right-radius: 4px;
}

.chat-bubble--bot {
  align-self: flex-start;
  color: var(--text-primary);
  background: rgba(157, 78, 221, 0.3);
  border: 1px solid rgba(157, 78, 221, 0.45);
  border-bottom-left-radius: 4px;
}

.chat-bubble--event {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--status-success);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.portfolio-img--flow {
  background: radial-gradient(circle at 50% 50%, rgba(0, 168, 150, 0.2), transparent 70%), var(--bg-surface-elevated);
  padding: 20px 16px;
}

.flow-mock {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 320px;
}

.flow-node {
  flex-shrink: 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
}

.flow-node--accent {
  color: var(--brand-teal-glow);
  border-color: var(--brand-teal-glow);
  box-shadow: 0 0 12px rgba(0, 196, 174, 0.25);
}

.flow-link {
  position: relative;
  flex: 1;
  min-width: 12px;
  height: 2px;
  background: linear-gradient(90deg, var(--border-default), var(--brand-teal-glow), var(--border-default));
  background-size: 200% 100%;
}

/* Whole card clickable: the link's ::after covers the card */
.portfolio-card {
  position: relative;
}

.portfolio-card:has(.portfolio-link) {
  cursor: pointer;
}

.portfolio-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.portfolio-card:has(.portfolio-link:focus-visible) {
  outline: 2px solid var(--brand-teal-glow);
  outline-offset: 4px;
}

.portfolio-link:focus-visible {
  outline: none;
}

.portfolio-card:hover .portfolio-link {
  color: var(--brand-teal-glow);
}

/* Partners (Sócios) Section */
.partner-card {
  text-align: center;
  padding: 40px 24px;
}

.partner-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 0 auto 24px;
  border: 2px solid var(--brand-teal-glow);
  padding: 4px;
  object-fit: cover;
  background-color: var(--bg-surface-elevated);
}

.partner-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-top: 16px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.partner-linkedin:hover {
  color: var(--brand-teal-glow);
  border-color: var(--brand-teal-glow);
}

.partner-linkedin:focus-visible {
  outline: 2px solid var(--brand-teal-glow);
  outline-offset: 2px;
}

/* Footer */
.footer-title {
  font-size: 1.1rem;
}

footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-default);
  padding: 60px 0 24px;
  margin-top: 80px;
}

/* ==========================================================================
   Animations
   ========================================================================== */

/* Hero network canvas */
.hero { isolation: isolate; }

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Client logo marquee */
.clients {
  padding: 48px 0 8px;
}

.clients-title {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.marquee {
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 72px;
  padding-right: 72px;
  list-style: none;
}

.marquee-group img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  opacity: 0.6;
  filter: grayscale(1);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.marquee-group img:hover {
  opacity: 1;
  filter: none;
}

/* Interactive cards: spotlight + gradient border following the pointer */
.feature-card,
.portfolio-card {
  position: relative;
  isolation: isolate;
  --mx: 50%;
  --my: 50%;
}

.feature-card::before,
.portfolio-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(0, 196, 174, 0.10), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.feature-card::after,
.portfolio-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(240px circle at var(--mx) var(--my), var(--brand-teal-glow), var(--brand-violet-glow) 45%, transparent 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

/* portfolio cards clip overflow, so keep the ring inside the border */
.portfolio-card::after {
  inset: 0;
}

.feature-card:hover::before,
.portfolio-card:hover::before,
.feature-card:hover::after,
.portfolio-card:hover::after {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance */
  .hero-anim {
    animation: fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: var(--d, 0ms);
  }

  .hero-title .word {
    display: inline-block;
    animation: word-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(80ms + var(--i) * 45ms);
  }

  .hero .btn-primary {
    animation: glow-pulse 2.8s ease-in-out 1.8s infinite;
  }

  .hero .btn-primary:hover {
    animation-play-state: paused;
  }

  /* Scroll reveal (uses `translate` so `transform` stays free for the tilt) */
  .reveal-on-scroll {
    opacity: 0;
    translate: 0 30px;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), translate 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    transition-delay: var(--stagger, 0ms);
  }

  /* keep side-sliding elements from widening the page on mobile */
  section:has([data-reveal]) { overflow-x: clip; }

  .reveal-on-scroll[data-reveal="left"] { translate: -60px 0; }
  .reveal-on-scroll[data-reveal="right"] { translate: 60px 0; }

  .reveal-on-scroll.is-visible {
    opacity: 1;
    translate: 0 0;
  }

  .feature-card.is-visible:hover,
  .portfolio-card.is-visible:hover {
    translate: 0 -5px;
  }

  .reveal-on-scroll.reveal-done {
    transition-delay: 0ms;
  }

  /* 3D tilt (JS sets --rx / --ry on devices with a fine pointer) */
  .feature-card,
  .portfolio-card {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  }

  .feature-card,
  .portfolio-card {
    transition-property: opacity, translate, border-color, box-shadow, transform;
    transition-duration: 0.8s, 0.8s, 0.3s, 0.3s, 0.5s;
  }

  /* after the entrance: snappier hover lift; near-instant while tilting */
  .feature-card.reveal-done,
  .portfolio-card.reveal-done {
    transition-duration: 0.8s, 0.3s, 0.3s, 0.3s, 0.5s;
  }

  .feature-card.reveal-done.is-tilting,
  .portfolio-card.reveal-done.is-tilting {
    transition-duration: 0.8s, 0.3s, 0.3s, 0.3s, 0.08s;
  }

  /* Case illustrations */
  .flow-link {
    animation: flow-pulse 2.4s linear infinite;
  }

  .portfolio-card.is-visible .chat-bubble {
    animation: fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .portfolio-card.is-visible .chat-bubble:nth-child(2) { animation-delay: 0.5s; }
  .portfolio-card.is-visible .chat-bubble:nth-child(3) { animation-delay: 1s; }

  /* Portfolio filter */
  .portfolio-card.is-filter-in {
    animation: fade-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  /* How we work: connectors draw in, a pulse travels 01 → 04, numbers light up in turn */
  .process-step .process-number {
    transition: none;
  }

  .process-step.is-visible .process-number {
    animation:
      num-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--stagger, 0ms) + 150ms) both,
      num-glow 4s ease-in-out calc(1.6s + var(--step, 0) * 1s) infinite;
  }

  .process-step:nth-child(1) { --step: 0; }
  .process-step:nth-child(2) { --step: 1; }
  .process-step:nth-child(3) { --step: 2; }
  .process-step:nth-child(4) { --step: 3; }

  .process-step.is-visible:hover {
    translate: 0 -5px;
  }

  @media (min-width: 1100px) {
    .process-step:not(:last-child)::after {
      transform: scaleX(0);
      transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--stagger, 0ms) + 450ms);
    }

    .process-step.is-visible:not(:last-child)::after {
      transform: scaleX(1);
    }

    /* the travelling pulse */
    .process-step:not(:last-child)::before {
      content: '';
      position: absolute;
      top: 47px;
      left: calc(24px + 44px + 12px);
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--brand-teal-glow);
      box-shadow: 0 0 10px 2px rgba(0, 196, 174, 0.7);
      opacity: 0;
      pointer-events: none;
    }

    .process-step.reveal-done:not(:last-child)::before {
      animation: pulse-travel 4s linear calc(0.6s + var(--step, 0) * 1s) infinite;
    }
  }

  /* FAQ: answer slides in when opened (height is animated in JS) */
  .faq-item[open] p {
    animation: faq-answer 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.08s both;
  }

  /* Marquee */
  .marquee-group {
    animation: marquee 32s linear infinite;
  }

  .marquee:hover .marquee-group {
    animation-play-state: paused;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-group { flex-wrap: wrap; justify-content: center; padding-right: 0; row-gap: 24px; width: 100%; }
  .marquee-group[aria-hidden="true"] { display: none; }
}

@keyframes fade-up {
  from { opacity: 0; translate: 0 24px; }
  to { opacity: 1; translate: 0 0; }
}

/* starts at 0.01 (not 0) so the browser counts the title as painted immediately (LCP) */
@keyframes word-in {
  from { opacity: 0.01; translate: 0 0.5em; filter: blur(8px); }
  to { opacity: 1; translate: 0 0; filter: blur(0); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 196, 174, 0.25); }
  50% { box-shadow: 0 0 28px rgba(0, 196, 174, 0.55), 0 0 0 6px rgba(0, 196, 174, 0.08); }
}

@keyframes flow-pulse {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@keyframes num-pop {
  from { opacity: 0; scale: 0.4; }
  to { opacity: 1; scale: 1; }
}

@keyframes num-glow {
  0%, 30%, 100% {
    background: rgba(0, 196, 174, 0.1);
    box-shadow: 0 0 12px rgba(0, 196, 174, 0.2);
    color: var(--brand-teal-glow);
  }
  8%, 18% {
    background: var(--brand-teal-deep);
    box-shadow: 0 0 22px rgba(0, 196, 174, 0.6), 0 0 0 6px rgba(0, 196, 174, 0.12);
    color: #fff;
  }
}

@keyframes pulse-travel {
  0% { left: calc(24px + 44px + 12px); opacity: 0; }
  4% { opacity: 1; }
  22% { opacity: 1; }
  25% { left: calc(100% + 6px); opacity: 0; }
  100% { left: calc(100% + 6px); opacity: 0; }
}

@keyframes faq-answer {
  from { opacity: 0; translate: 0 -12px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes marquee {
  to { translate: -100% 0; }
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25D366; /* WhatsApp Green */
  color: #FFF;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  transition: all 0.3s ease;
}

.whatsapp-float:hover {
  transform: translateY(-5px) scale(1.05);
  background-color: #1EBE55;
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
  color: #FFF;
}

/* How we work */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 24px;
  list-style: none;
}

.process-step {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
}

.process-step h3 {
  font-size: 1.2rem;
  margin: 16px 0 8px;
}

.process-step p {
  font-size: 0.95rem;
}

.process-step:hover {
  border-color: rgba(0, 196, 174, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 196, 174, 0.1);
}

.process-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--brand-teal-glow);
  background: rgba(0, 196, 174, 0.1);
  border: 1px solid rgba(0, 196, 174, 0.35);
  box-shadow: 0 0 12px rgba(0, 196, 174, 0.2);
}

/* connector line between steps (desktop, single row) */
@media (min-width: 1100px) {
  .process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50px;
    left: calc(24px + 44px + 12px);
    right: -12px;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 196, 174, 0.5), transparent);
    transform-origin: left center;
  }
}

/* FAQ */
.faq-container {
  max-width: 820px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  position: relative;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

/* accent bar that grows on the open question */
.faq-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-teal-glow), var(--brand-violet-glow));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item[open]::before {
  transform: scaleY(1);
}

.faq-item:hover {
  background-color: var(--bg-surface-elevated);
}

.faq-item[open] {
  border-color: rgba(0, 196, 174, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 196, 174, 0.12), 0 10px 30px rgba(0, 196, 174, 0.08);
}

.faq-item {
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 16px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '';
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(0, 196, 174, 0.35);
  background: rgba(0, 196, 174, 0.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300C4AE' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item summary:hover::after {
  background-color: rgba(0, 196, 174, 0.18);
}

.faq-item[open] summary::after {
  transform: rotate(135deg);
  background-color: rgba(0, 196, 174, 0.2);
  box-shadow: 0 0 14px rgba(0, 196, 174, 0.35);
}

.faq-item[open] summary {
  color: var(--brand-teal-glow);
}

.faq-item summary:hover {
  color: var(--brand-teal-glow);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--brand-teal-glow);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.faq-item p {
  padding: 0 20px 20px;
  line-height: 1.7;
}

/* Contact / lead form */
.contact-section {
  background: radial-gradient(ellipse at 20% 50%, rgba(0, 196, 174, 0.08), transparent 60%), var(--bg-surface);
  border-top: 1px solid var(--border-default);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.contact-intro h2 {
  margin: 16px 0;
}

.contact-benefits {
  list-style: none;
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.contact-benefits li {
  position: relative;
  padding-left: 30px;
  color: var(--text-primary);
}

.contact-benefits li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 196, 174, 0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300C4AE' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.contact-form {
  padding: 32px;
  display: grid;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-base);
  color: var(--text-primary);
  font: 400 1rem var(--font-sans);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
}

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}

.form-field select:invalid {
  color: var(--text-secondary);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #64748B;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand-teal-glow);
  box-shadow: 0 0 0 3px rgba(0, 196, 174, 0.2);
}

.form-field [aria-invalid="true"] {
  border-color: var(--status-error);
}

.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  color: var(--status-error);
  font-size: 0.9rem;
}

.form-error[hidden] {
  display: none;
}

.form-submit {
  width: 100%;
  padding: 14px 24px;
  font-size: 1rem;
}

.form-note {
  font-size: 0.8rem;
  text-align: center;
}

/* Subpages (privacy policy, 404) */
.subpage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.subpage main {
  flex: 1;
  width: 100%;
  padding-top: 140px;
  padding-bottom: 80px;
}

.legal {
  max-width: 780px;
}

.legal h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 24px;
}

.legal h2 {
  font-size: 1.4rem;
  margin: 40px 0 12px;
}

.legal h3 {
  font-size: 1.1rem;
  margin: 24px 0 8px;
}

.legal p,
.legal li {
  line-height: 1.75;
}

.legal p + p {
  margin-top: 12px;
}

.legal ul {
  margin: 12px 0 0 22px;
  color: var(--text-secondary);
  display: grid;
  gap: 6px;
}

.legal strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.legal a,
.cookie-banner a,
.form-note a,
.footer-links a {
  color: var(--brand-teal-glow);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Buttons inside text pages keep button styling (not the underlined text-link style) */
.legal a.btn-primary,
.legal a.btn-primary:hover {
  color: #fff;
  text-decoration: none;
}

.legal a.btn-secondary,
.legal a.btn-secondary:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.legal-updated {
  font-size: 0.85rem;
  margin-bottom: 12px;
}

/* Case study pages */
.case-page {
  max-width: 820px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--brand-teal-glow);
}

.case-page h1 {
  margin-top: 16px;
}

.case-lead {
  font-size: 1.15rem;
  color: var(--text-primary);
  opacity: 0.9;
}

.case-external {
  margin-top: 16px;
}

.badge-teal {
  background: rgba(0, 168, 150, 0.15);
  color: var(--brand-teal-glow);
  border-color: rgba(0, 168, 150, 0.3);
}

.case-section h2 {
  margin-top: 48px;
}

.case-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 16px;
  margin: 16px 0 20px;
}

.case-stat {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid rgba(0, 196, 174, 0.3);
}

.case-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--brand-teal-glow);
  line-height: 1.2;
}

.case-stat span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.case-steps {
  margin: 12px 0 0 22px;
  color: var(--text-secondary);
  display: grid;
  gap: 8px;
}

.case-steps + p {
  margin-top: 16px;
}

.case-cta {
  margin-top: 56px;
  padding: 32px;
  text-align: center;
}

.case-cta h2 {
  margin: 0 0 8px;
}

.case-back {
  margin-top: 32px;
}

/* Case screenshots: desktop in a browser frame + phone */
.case-shots {
  position: relative;
  margin: 40px 0 8px;
  padding-right: 90px;
}

.shot-desktop {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.shot-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-default);
}

.shot-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-default);
}

.case-shots img {
  display: block;
  width: 100%;
  height: auto;
}

.shot-mobile {
  position: absolute;
  right: 0;
  bottom: 28px;
  width: 26%;
  max-width: 190px;
  padding: 6px;
  border-radius: 22px;
  background: #0b0d12;
  border: 1px solid var(--border-default);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

.shot-mobile img {
  border-radius: 17px;
}

.case-shots figcaption {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Related cases on service pages */
.related-cases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 12px;
  margin-top: 16px;
}

.legal a.related-case {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.2s ease, translate 0.2s ease;
}

.legal a.related-case:hover {
  border-color: var(--brand-teal-glow);
  translate: 0 -3px;
}

.related-case strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.related-case span:last-child {
  color: var(--brand-teal-glow);
  font-size: 0.9rem;
}

/* Service link on the specialties cards (covers the whole card) */
.feature-link {
  display: inline-block;
  margin-top: 16px;
  font-weight: 600;
  color: var(--brand-teal-glow);
}

.feature-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.feature-card:has(.feature-link) {
  cursor: pointer;
}

.feature-card:has(.feature-link:focus-visible) {
  outline: 2px solid var(--brand-teal-glow);
  outline-offset: 4px;
}

.feature-link:focus-visible {
  outline: none;
}

/* Secondary link inside a card whose main link covers the whole card */
.portfolio-case-link {
  position: relative;
  z-index: 3;
  margin-left: 16px;
  font-size: 0.95rem;
}

.notfound {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.notfound-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 20vw, 9rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand-teal-glow), var(--brand-violet-glow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 16px;
}

.notfound h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin-bottom: 12px;
}

.notfound p:not(.notfound-code) {
  max-width: 480px;
}

.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.footer-simple {
  margin-top: 0;
  text-align: center;
}

.footer-links {
  margin-top: 8px;
  font-size: 0.9rem;
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 10000;
  max-width: 400px;
  padding: 20px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.cookie-banner p:not(.cookie-title) {
  font-size: 0.9rem;
}

.cookie-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.cookie-actions button {
  padding: 10px 20px;
}

.cookie-settings {
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}

.cookie-settings:hover {
  color: var(--text-primary);
}

.cookie-settings[hidden] {
  display: none;
}

/* Responsive adjustments */
/* Hamburger menu up to tablet width (5 nav items don't fit horizontally below ~1024px) */
@media (max-width: 1024px) {
  header {
    padding: 12px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    background: var(--bg-base);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-default);
    opacity: 0;
    visibility: hidden;
    translate: 0 -8px;
    transition: opacity 0.25s ease, translate 0.25s ease, visibility 0.25s;
  }

  .nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border-default);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }
}

@media (max-width: 768px) {
  h1 { font-size: clamp(1.85rem, 8.5vw, 2.2rem); }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.4rem; }

  .section-padding { padding: 72px 0; }
  .container { padding: 0 20px; }

  .hero { min-height: 100svh; }
  .hero-content p { font-size: 1.1rem; }

  .feature-card { padding: 24px; }
  .feature-icon { width: 46px; height: 46px; margin-bottom: 14px; }

  .portfolio-img { height: 160px; }

  .portfolio-filters { gap: 8px; margin: -16px 0 32px; }
  .filter-btn { min-height: 40px; padding: 6px 13px; font-size: 0.85rem; }
  .filter-btn span { display: none; }

  .clients-title { letter-spacing: 0.08em; }

  footer { margin-top: 0; }
  
  .grid-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .case-shots { padding-right: 56px; }
  .shot-mobile { width: 30%; bottom: 36px; border-radius: 16px; padding: 4px; }
  .shot-mobile img { border-radius: 12px; }
  .contact-form { padding: 24px 20px; }
  
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-cta a {
    width: 100%;
    max-width: 300px;
  }
  
  footer .grid-2 > div {
    text-align: center !important;
  }
  
  footer img {
    margin: 0 auto;
  }

  footer p {
    margin-inline: auto;
  }

  /* room so the floating WhatsApp button doesn't cover the last lines */
  footer {
    padding-bottom: 96px;
  }
  
  .marquee-group { gap: 48px; padding-right: 48px; }
  .marquee-group img { height: 28px; }

  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }

  .cookie-actions button {
    flex: 1;
  }

  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
}
