/* =============================================
   SOLVYRA — SHARED STYLESHEET
   ============================================= */

/* ===== VARIABLES ===== */
:root {
  --bg-primary: #07070F;
  --bg-secondary: #0D0D1A;
  --bg-card: #111122;
  --bg-card-hover: #161630;
  --accent: #0F9B8E;
  --accent-glow: #0FDDCC;
  --accent-soft: rgba(15, 155, 142, 0.12);
  --text-primary: #F0F0F5;
  --text-secondary: #8888A0;
  --text-muted: #555570;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(15, 155, 142, 0.3);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== NOISE TEXTURE OVERLAY ===== */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
}

nav.scrolled {
  background: rgba(7, 7, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.8rem 2rem;
}

/* Force scrolled style on inner pages (no transparent hero) */
nav.nav-solid {
  background: rgba(7, 7, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.8rem 2rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--accent); }

.logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.3s;
  letter-spacing: 0.02em;
}

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

/* Active nav state */
.nav-links a.active {
  color: var(--accent);
}

.nav-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.2rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover {
  background: rgba(42, 157, 143, 0.08);
  box-shadow: 0 0 14px rgba(42, 157, 143, 0.3);
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: 2rem;
  margin-right: 1.5rem;
}
.nav-social-link {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}
.nav-social-link:hover {
  color: var(--accent);
}
@media (max-width: 768px) {
  .nav-social { display: none; }
}

.mobile-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: auto;
  padding: 2rem 0;
}

/* ===== NAV DROPDOWN (Servizi) ===== */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 0.4rem;
  vertical-align: middle;
  transition: transform 0.3s;
}

.nav-dropdown:hover > a::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.8rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: rgba(13, 13, 26, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary) !important;
  transition: all 0.2s;
}

.dropdown-menu a:hover {
  background: var(--accent-soft);
  color: var(--accent) !important;
}

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(7, 7, 15, 0.97);
  backdrop-filter: blur(30px);
  z-index: 999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding-top: 120px;
}

.mobile-menu.active { display: flex; }

.mobile-menu a {
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s;
}

.mobile-menu.active a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu a.active {
  color: var(--accent);
}

/* Mobile menu sub-links for services */
.mobile-submenu {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding-left: 1rem;
}

.mobile-submenu a {
  font-size: 1.1rem !important;
  font-weight: 400 !important;
  color: var(--text-secondary) !important;
}

.mobile-submenu a:hover {
  color: var(--accent) !important;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: hidden;
}

.hero-gradient-1 {
  position: absolute;
  top: -30%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(15, 155, 142, 0.08) 0%, transparent 70%);
  animation: float1 12s ease-in-out infinite;
}

.hero-gradient-2 {
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(15, 100, 200, 0.05) 0%, transparent 70%);
  animation: float2 15s ease-in-out infinite;
}

.hero-grid {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 30px) scale(1.1); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border-hover);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 2rem;
  background: var(--accent-soft);
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s forwards;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: btn-pulse 2.5s ease-in-out infinite;
}

@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(42, 157, 143, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(42, 157, 143, 0); }
}

.btn-primary:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 30px rgba(15, 221, 204, 0.25);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== SECTION COMMON ===== */
section {
  padding: 7rem 0;
  position: relative;
}

.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

.section-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 600px;
}

/* Section CTA link at bottom */
.section-cta {
  margin-top: 2.5rem;
  text-align: center;
}

.section-cta a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.3s, color 0.3s;
}

.section-cta a:hover {
  gap: 0.7rem;
  color: var(--accent-glow);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  padding: 1rem 0;
  margin-top: 70px;
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-list a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.breadcrumb-list a:hover {
  color: var(--accent);
}

.breadcrumb-list .separator {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.breadcrumb-list .current {
  color: var(--text-secondary);
}

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  padding: 6rem 0 3rem;
  margin-top: 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero .hero-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: hidden;
}

.page-hero .section-title {
  max-width: 700px;
  margin: 0 auto 1rem;
}

.page-hero .section-desc {
  max-width: 550px;
  margin: 0 auto;
}

/* ===== PROBLEMS / SOLUTIONS ===== */
.problems-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto repeat(4, auto);
  gap: 0;
  margin-top: 3rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.ps-col {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
  padding: 0 2.5rem;
}

.ps-col.problems {
  background: rgba(255, 60, 60, 0.03);
  border-right: 1px solid var(--border);
}

.ps-col.solutions {
  background: rgba(15, 155, 142, 0.03);
}

.ps-col-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 2.5rem 0 1rem;
  border-bottom: 1px solid var(--border);
  align-self: start;
}

.problems .ps-col-title { color: #FF6B6B; }
.solutions .ps-col-title { color: var(--accent); }

.ps-item {
  display: flex;
  align-items: flex-start;
  align-self: stretch;
  gap: 1rem;
  padding: 1rem 0;
  margin: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  cursor: default;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.ps-col .ps-item:last-child {
  padding-bottom: 2.5rem;
}

.ps-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.ps-icon svg {
  width: 18px;
  height: 18px;
}

.problems .ps-icon {
  background: rgba(255, 60, 60, 0.08);
  color: #ff5555;
}

.solutions .ps-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.ps-item h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.ps-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.service-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.service-card:hover::before { opacity: 1; }

.service-icon svg {
  color: var(--accent);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.service-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.service-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.3s;
}

.service-link:hover { gap: 0.6rem; }

/* ===== METHOD ===== */
.method-section { background: var(--bg-primary); }

.method-timeline {
  margin-top: 3rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  isolation: isolate;
  padding-left: 1rem;
}

.method-timeline::before {
  content: '';
  position: absolute;
  left: calc(28px + 1rem);
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-soft), transparent);
  overflow: hidden;
}

.method-timeline::after {
  content: '';
  position: absolute;
  left: calc(28px + 1rem);
  width: 2px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--accent), var(--accent-glow), transparent);
  animation: timeline-flow 2.5s ease-in-out infinite;
  z-index: 0;
  top: 0;
}
@keyframes timeline-flow {
  0%   { top: -80px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.method-step {
  display: flex;
  gap: 2rem;
  padding: 2rem 0;
  position: relative;
}
.method-step:nth-child(1) { transition-delay: 0s; }
.method-step:nth-child(2) { transition-delay: 0.15s; }
.method-step:nth-child(3) { transition-delay: 0.3s; }
.method-step:nth-child(4) { transition-delay: 0.45s; }
.method-step:nth-child(5) { transition-delay: 0.6s; }

.method-number {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  position: relative;
  z-index: 2;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.method-step.visible .method-number {
  box-shadow: 0 0 16px rgba(42, 157, 143, 0.5);
  background: rgba(42, 157, 143, 0.1);
}

.method-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.method-content p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 500px;
}

@media (min-width: 768px) {
  .method-timeline {
    flex-direction: row;
    align-items: flex-start;
    padding-left: 0;
    gap: 0;
    overflow: visible;
  }

  /* Linea orizzontale al posto di quella verticale */
  .method-timeline::before {
    left: 0;
    right: 0;
    top: 28px;
    bottom: auto;
    width: 100%;
    height: 2px;
  }

  /* Corrente orizzontale */
  .method-timeline::after {
    top: 28px;
    left: -80px;
    width: 80px;
    height: 2px;
    animation: timeline-flow-h 2.5s infinite;
  }

  @keyframes timeline-flow-h {
    0%   { left: -80px; }
    100% { left: 100%; }
  }

  .method-step {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    gap: 1rem;
  }

  .method-content p {
    max-width: 100%;
  }

  .method-content .inline-diag-cta {
    display: inline-flex;
    font-size: 0.8rem;
  }
}

/* ===== TEAM ===== */
.team-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  transition: all 0.4s;
}

.team-card:hover {
  border-color: var(--border-hover);
}

.team-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), rgba(15, 155, 142, 0.25));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.team-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.team-role {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.team-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.team-tag {
  padding: 0.3rem 0.8rem;
  background: var(--accent-soft);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
}

/* ===== PORTFOLIO ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s;
  text-decoration: none;
  color: var(--text-primary);
  display: block;
}

.portfolio-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.portfolio-thumb {
  height: 200px;
  background: linear-gradient(135deg, var(--bg-card-hover), rgba(15, 155, 142, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.portfolio-thumb svg {
  color: var(--accent);
  opacity: 0.7;
}

.portfolio-info {
  padding: 1.5rem;
}

.portfolio-sector {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.portfolio-info h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.portfolio-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== CTA SECTION (Contact) ===== */
.cta-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 6rem 0;
}

.cta-section .section-title {
  max-width: 700px;
  margin: 0 auto 1rem;
}

.cta-section .section-desc {
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

/* ===== FORMS ===== */
.contact-form {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row { display: flex; gap: 1rem; }

.form-group {
  flex: 1;
  position: relative;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group select {
  appearance: none;
  cursor: pointer;
}

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

.form-submit {
  margin-top: 0.5rem;
}

.form-submit .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: 1rem;
}

/* ===== CONTACT CARDS LAYOUT ===== */
.contact-cards {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

/* Card Diagnostico (protagonista) */
.diag-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(15, 155, 142, 0.06), rgba(15, 221, 204, 0.03));
  border: 1px solid var(--border-hover);
  border-radius: 16px;
  padding: 2.2rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.diag-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-glow), var(--accent), transparent);
  opacity: 0.7;
}

.diag-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 40px rgba(15, 155, 142, 0.12);
}

.diag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: var(--accent-soft);
  border: 1px solid var(--border-hover);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-glow);
  margin-bottom: 1.2rem;
  width: fit-content;
}

.diag-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.diag-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.diag-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.diag-card > p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.diag-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.diag-bullets li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.diag-bullets li svg {
  width: 16px;
  height: 16px;
  min-width: 16px;
  color: var(--accent);
}

.diag-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: fit-content;
  animation: subtleGlow 3s ease-in-out infinite;
}

.diag-cta-btn:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 30px rgba(15, 221, 204, 0.3);
  transform: translateY(-2px);
}

.diag-cta-btn svg {
  width: 16px;
  height: 16px;
}

@keyframes subtleGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(15, 221, 204, 0); }
  50% { box-shadow: 0 0 20px rgba(15, 221, 204, 0.15); }
}

.diag-social-proof {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.diag-social-proof svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

/* Card Contatto Diretto (secondaria) */
.direct-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.direct-card:hover {
  border-color: var(--border-hover);
}

.direct-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.direct-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.direct-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.direct-card > p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.direct-card .contact-form {
  max-width: 100%;
  gap: 0.75rem;
}

.direct-card .form-group input,
.direct-card .form-group textarea {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
}

.direct-card .form-group textarea {
  min-height: 70px;
}

.direct-card .form-submit .btn-primary {
  padding: 0.8rem;
  font-size: 0.88rem;
}

/* ===== INLINE DIAGNOSTICO CTA ===== */
.inline-diag-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent-soft);
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.inline-diag-cta:hover {
  background: rgba(15, 155, 142, 0.18);
  color: var(--accent-glow);
  transform: translateX(3px);
}

.inline-diag-cta svg {
  width: 14px;
  height: 14px;
}

/* ===== CTA DIAGNOSTICO BANNER (reusable component) ===== */
.diag-banner {
  background: linear-gradient(135deg, rgba(15, 155, 142, 0.05), rgba(15, 221, 204, 0.02));
  border: 1px solid var(--border-hover);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.diag-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-glow), var(--accent), transparent);
  opacity: 0.5;
}

.diag-banner .diag-badge {
  margin: 0 auto 1rem;
}

.diag-banner h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.diag-banner p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

.diag-banner .btn-primary {
  animation: subtleGlow 3s ease-in-out infinite;
}

/* ===== STICKY MOBILE CTA ===== */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: rgba(7, 7, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-hover);
  padding: 0.7rem 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-cta.visible {
  transform: translateY(0);
}

.sticky-cta.dismissed {
  display: none !important;
}

.sticky-cta-link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
}

.sticky-cta-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticky-cta-icon svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.sticky-cta-text {
  font-size: 0.8rem;
  font-weight: 600;
}

.sticky-cta-text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.sticky-cta-btn {
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s;
}

.sticky-cta-btn:hover {
  background: var(--accent-glow);
}

.sticky-cta-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s;
}

.sticky-cta-close:hover {
  color: var(--text-primary);
}

.sticky-cta-close svg {
  width: 16px;
  height: 16px;
}

/* ===== PLACEHOLDER PAGE ===== */
.placeholder-content {
  text-align: center;
  padding: 4rem 0;
}

.placeholder-content .placeholder-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.placeholder-content .placeholder-icon svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.placeholder-content p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* ===== FOOTER ===== */
footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.footer-brand .nav-logo {
  display: inline-block;
  margin-bottom: 0.8rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 300px;
  line-height: 1.6;
}

.footer-links-group h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-links-group a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.3rem 0;
  transition: color 0.3s;
}

.footer-links-group a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== ANIMATIONS (scroll-triggered) ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes revealFallback {
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  animation: revealFallback 0.6s ease forwards;
  animation-delay: 0.5s;
}

.reveal-delay-1 { animation-delay: 0.6s; transition-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.7s; transition-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.8s; transition-delay: 0.3s; }
.reveal-delay-4 { animation-delay: 0.9s; transition-delay: 0.4s; }
.reveal-delay-5 { animation-delay: 1.0s; transition-delay: 0.5s; }
.reveal-delay-6 { animation-delay: 1.1s; transition-delay: 0.6s; }

/* ===== PS DRAMATIC SEQUENCE (PROBLEMI/SOLUZIONI) ===== */

/* Initial states — everything invisible */
.ps-col.problems,
.ps-col.solutions {
  opacity: 0;
}
.ps-col.problems .ps-item,
.ps-col.solutions .ps-item {
  opacity: 0;
}

/* Phase 1: Left card fade-in */
.ps-col.problems.ps-fade-in {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Phase 1: Shake */
@keyframes cardShake {
  0%   { transform: translateX(0); }
  15%  { transform: translateX(-4px) rotate(-0.3deg); }
  30%  { transform: translateX(4px) rotate(0.3deg); }
  45%  { transform: translateX(-3px); }
  60%  { transform: translateX(3px); }
  75%  { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}
.ps-col.problems.ps-shake {
  animation: cardShake 0.5s ease-in-out;
}

/* Phase 1: Problem items slide from left */
.ps-col.problems .ps-item {
  transform: translateX(-20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.ps-col.problems .ps-item .ps-icon {
  opacity: 0.3;
  transition: opacity 0.4s ease;
}
.ps-col.problems .ps-item.ps-item-in {
  opacity: 1;
  transform: translateX(0);
}
.ps-col.problems .ps-item.ps-item-in .ps-icon {
  opacity: 1;
}

/* Phase 2: Right card slide from right */
.ps-col.solutions {
  transform: translateX(40px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.ps-col.solutions.ps-slide-in {
  opacity: 1;
  transform: translateX(0);
}

/* Phase 2: Solution items slide from right */
.ps-col.solutions .ps-item {
  transform: translateX(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.ps-col.solutions .ps-item .ps-icon {
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ps-col.solutions .ps-item.ps-item-in {
  opacity: 1;
  transform: translateX(0);
}

/* Solution icon pulse */
@keyframes iconPulse {
  0%   { transform: scale(0.8); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.ps-col.solutions .ps-item.ps-item-in .ps-icon {
  animation: iconPulse 0.3s ease forwards;
}

/* PS row highlight — absolute overlay spanning both columns */
.ps-row-highlight {
  position: absolute;
  left: 0; right: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.04) 50%,
    rgba(42,157,143,0.08) 50%,
    rgba(42,157,143,0.08) 100%
  );
  transition: top 0.2s ease, height 0.2s ease, opacity 0.2s ease;
}

/* PS hover match — dimming + text highlights */
.ps-grid.ps-hover-active .ps-col .ps-item.ps-item-in {
  opacity: 0.4 !important;
  transition: opacity 0.2s ease;
}
.ps-grid.ps-hover-active .ps-col .ps-item.ps-item-in.ps-hl {
  opacity: 1 !important;
  border-top-color: transparent;
}
.ps-grid.ps-hover-active .ps-col.problems .ps-item.ps-hl h4 {
  color: #ffffff;
  transition: color 0.2s ease;
}
.ps-grid.ps-hover-active .ps-col.solutions .ps-item.ps-hl h4 {
  color: #2a9d8f;
  transition: color 0.2s ease;
}
.ps-grid.ps-hover-active .ps-col.solutions .ps-item.ps-hl .ps-icon {
  text-shadow: 0 0 8px rgba(42,157,143,0.7);
}
.ps-grid.ps-hover-active .ps-col.solutions .ps-item.ps-hl .ps-icon svg {
  filter: drop-shadow(0 0 8px rgba(42,157,143,0.7));
  transition: filter 0.2s ease;
}

/* Mobile: reduced shake */
@media (max-width: 768px) {
  @keyframes cardShake {
    0%   { transform: translateX(0); }
    15%  { transform: translateX(-2px) rotate(-0.2deg); }
    30%  { transform: translateX(2px) rotate(0.2deg); }
    45%  { transform: translateX(-1px); }
    60%  { transform: translateX(1px); }
    75%  { transform: translateX(-1px); }
    100% { transform: translateX(0); }
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero-content { padding-top: 6rem; }
  .hero h1 { font-size: 2.2rem; }

  .ps-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .ps-col {
    grid-row: auto;
    display: flex;
    flex-direction: column;
  }

  .ps-col.problems { border-right: none; border-bottom: 1px solid var(--border); }

  .services-grid,
  .team-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .form-row { flex-direction: column; }

  .contact-cards {
    grid-template-columns: 1fr;
  }

  .diag-card { padding: 1.8rem; }
  .direct-card { padding: 1.8rem; }

  .sticky-cta { display: flex; }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-bottom { flex-direction: column; gap: 0.5rem; }

  section { padding: 4rem 0; }

  .page-hero { padding: 4rem 0 2rem; }

  .diag-banner { padding: 2rem 1.5rem; }
}

/* ===== FIXED BUTTONS ===== */
.pf-back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: scale(1);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s,
              box-shadow 0.2s, background 0.2s;
  color: var(--accent);
}
.pf-back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}
.pf-back-top:hover {
  background: rgba(42, 157, 143, 0.08);
  box-shadow: 0 0 14px rgba(42, 157, 143, 0.3);
  transform: scale(1.05);
}
.pf-back-top svg { width: 20px; height: 20px; color: var(--accent); }

/* ===== WHATSAPP BUTTON ===== */
.pf-whatsapp {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37,211,102,0.35);
  transition: transform 0.3s, box-shadow 0.3s;
  animation: pf-wa-pulse 3s ease-in-out infinite;
}
.pf-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,211,102,0.5);
  animation: none;
}
.pf-whatsapp svg { width: 28px; height: 28px; color: #fff; }
.pf-whatsapp-tip {
  position: absolute;
  left: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: #1a1a2e;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  border: 1px solid var(--border);
}
.pf-whatsapp:hover .pf-whatsapp-tip { opacity: 1; }
@keyframes pf-wa-pulse {
  0%,100% { box-shadow: 0 4px 16px rgba(37,211,102,0.35); }
  50% { box-shadow: 0 4px 24px rgba(37,211,102,0.55),
        0 0 0 8px rgba(37,211,102,0.1); }
}

/* ===== FOOTER SOCIAL ===== */
.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}
.footer-social-link {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}
.footer-social-link:hover {
  color: var(--accent);
}

/* ===== AI BADGE & LINK ===== */
.ai-badge {
  display: inline-block;
  background: #2a9d8f;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-left: 0.6rem;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

.ai-paragraph {
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
}

.link-ai {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: text-decoration 0.2s;
}
.link-ai:hover {
  text-decoration: underline;
}

/* ===== AI SECTION (Homepage) ===== */
.ai-section {
  background: #0d1b2a;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.ai-header {
  margin-bottom: 3rem;
}

.ai-title {
  color: #fff;
}

.ai-title-line1 {
  opacity: 0;
  animation: aiFadeLeft 0.4s ease forwards;
}

@keyframes aiFadeLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.ai-title-line2 {
  color: var(--accent);
}

.ai-title-line2.shimmer-active {
  background: linear-gradient(
    90deg,
    #2a9d8f 0%,
    #2a9d8f 40%,
    #7fffd4 50%,
    #2a9d8f 60%,
    #2a9d8f 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerSlide 1.2s ease 0s 1;
}

@keyframes shimmerSlide {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.ai-cursor {
  color: var(--accent);
  font-weight: 400;
  animation: aiCursorBlink 0.6s step-end infinite;
}

.ai-cursor.done {
  animation: aiCursorFadeOut 0.3s 1s ease forwards;
}

@keyframes aiCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes aiCursorFadeOut {
  to { opacity: 0; }
}

.ai-body {
  max-width: 720px;
  margin-top: 1.5rem;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
}

/* --- AI Feature Rows --- */
.ai-rows {
  margin-top: 3rem;
}

.ai-row.visible {
  opacity: 1;
  transform: translateX(0);
}

.ai-row:nth-child(1) { transition-delay: 0ms; }
.ai-row:nth-child(2) { transition-delay: 120ms; }
.ai-row:nth-child(3) { transition-delay: 240ms; }
.ai-row:nth-child(4) { transition-delay: 360ms; }

.ai-row-line {
  height: 1px;
  background: rgba(42,157,143,0.2);
  margin-bottom: 1.5rem;
}

.ai-row:first-child .ai-row-line {
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.8s ease;
}

.ai-row:first-child.visible .ai-row-line {
  transform: scaleX(1);
}

.ai-row-content {
  display: grid;
  grid-template-columns: 35% 65%;
  gap: 2rem;
  padding-bottom: 2rem;
}

.ai-row-left {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}

.ai-row-num {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.6;
  flex-shrink: 0;
  transition: opacity 0.25s ease, text-shadow 0.3s ease;
}

.ai-row-left h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #e0e0e0;
  transition: color 0.25s ease, text-shadow 0.3s ease;
}

/* --- Row glow sequence --- */
.ai-row.row-glow-active .ai-row-num,
.ai-row.row-glow-active .ai-row-left h3 {
  text-shadow: 0 0 12px rgba(42,157,143,0.8);
  color: #fff;
}

.ai-row.row-glow-active .ai-row-num {
  opacity: 1;
}

/* --- Row base + hover illumination --- */
.ai-row {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.5s ease, transform 0.5s ease, background 0.25s ease;
  cursor: default;
  border-radius: 8px;
  padding: 0 0.5rem;
  margin: 0 -0.5rem;
}

.ai-row:hover {
  background: rgba(42,157,143,0.04);
}

.ai-row:hover .ai-row-num {
  opacity: 1;
  text-shadow: 0 0 8px rgba(42,157,143,0.5);
}

.ai-row:hover .ai-row-left h3 {
  color: #ffffff;
}

.ai-row-right p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
}

.ai-section-cta {
  margin-top: 3rem;
  text-align: center;
}

.ai-section-cta .btn-primary {
  display: inline-block;
}

@media (max-width: 768px) {
  .ai-section {
    padding: 4rem 0;
  }
  .ai-row-content {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .ai-row-left {
    flex-direction: row;
    align-items: baseline;
  }
}
