 :root {
  --color-base-bg: #000000;
  --color-text-main: #F5F5F7;
  --color-text-muted: #A1A1A6;
  
  /* RESTORED: Elite Apple Design Tokens */
  --color-accent-blue: #007AFF;
  --color-accent-blue-hover: #0062CC;
  --color-surface: rgba(255, 255, 255, 0.05);
  --color-surface-hover: rgba(255, 255, 255, 0.1);
  --color-card-border: rgba(255, 255, 255, 0.1);
  --color-card-border-hover: rgba(10, 132, 255, 0.3);
  
  --glass-bg: rgba(0, 0, 0, 0.4);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-radius: 30px;
  --glass-blur: blur(15px) saturate(150%);
  --glass-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Modern Spacing System - Apple "Breathing" Logic (Fine-tuned) */
  --space-section: clamp(60px, 9vw, 110px);
  --space-header: clamp(30px, 4vw, 50px);
  --carousel-gap: 20px;

  /* Atmospheric Glow Colors — Standardized Blue */
  --glow-blue: #007AFF;
}

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

html, body {
  scroll-behavior: smooth;
  font-family: var(--font-family);
  background-color: var(--color-base-bg);
  color: var(--color-text-main);
}

body {
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Dynamic Light System (Restored & Vibrancy) ===== */
.bg-grid-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Background layer */
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 100 0 L 0 0 0 100' fill='none' stroke='white' stroke-width='1' opacity='0.08'/%3E%3Ccircle cx='0' cy='0' r='2' fill='white' opacity='0.25'/%3E%3C/svg%3E");
  background-size: 100px 100px;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.ambient-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(200px); /* Original Apple Softness */
  opacity: 0.12;       /* Targeted High Visibility */
  z-index: 2;          /* Above grid, below content */
  pointer-events: none;
  will-change: transform;
  animation: floatLight 20s infinite alternate ease-in-out;
}

/* Position & Sizing Utilities */
.light-left { left: -300px; }
.light-right { right: -300px; }
.light-large { width: 900px; height: 900px; }
.light-medium { width: 700px; height: 700px; }
.light-small { width: 400px; height: 400px; }

/* Vibrant Solid Backgrounds */
.bg-blue { background-color: var(--glow-blue); }
.bg-purple { background-color: var(--glow-blue); } /* Standardized to blue */

@keyframes floatLight {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -40px) scale(1.1); }
  100% { transform: translate(-30px, 30px) scale(0.9); }
}
/* ============================================== */
/* =============================== */

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--color-text-main);
}

h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* Typography Utilities */
.text-gradient {
  color: #FFFFFF;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 100;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  background: var(--color-surface);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: background-color 0.5s ease, border-color 0.5s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}

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

.logo {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--color-text-main);
}

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

.nav-links a {
  font-size: 14px;
  color: var(--color-text-muted);
  transition: color 0.3s ease;
}

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


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--glass-radius); /* Coerenza 30px */
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1.0);
  will-change: transform;
}

.btn-primary {
  background-color: var(--color-accent-blue);
  color: white;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.3);
}

.btn-primary:hover {
  background-color: var(--color-accent-blue-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(10, 132, 255, 0.5);
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text-main);
  backdrop-filter: blur(40px);
  border: 1px solid var(--color-card-border);
}

.btn-secondary:hover {
  background-color: var(--color-surface-hover);
  transform: translateY(-4px);
  border-color: var(--color-card-border-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Hero Section */
/* Hero Section Apple Rebuild */
.hero-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 160px 0 var(--space-section);
  position: relative;
  overflow: hidden; 
  background: transparent;
  z-index: 10; /* Above grid and lights */
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  font-size: clamp(40px, 9vw, 84px);
  font-weight: 500;
  line-height: 1.05;
  margin-bottom: 24px;
  color: #F5F5F7;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 300;
  color: var(--color-text-muted);
  max-width: 650px;
  margin: 0 auto 48px;
  line-height: 1.4;
}

.hero-ctas {
  margin-bottom: 80px;
}

.btn-vivid {
  padding: 16px 44px;
  border-radius: 50px;
  background: var(--color-accent-blue);
  color: white;
  font-weight: 600;
  text-decoration: none;
  font-size: 17px;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 10px 30px rgba(10, 132, 255, 0.2);
}

.btn-vivid:hover {
  background-color: var(--color-accent-blue-hover);
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 20px 40px rgba(10, 132, 255, 0.4);
}

/* Header button update */
.btn-primary {
  background: var(--color-accent-blue);
  color: white;
  border-radius: 50px;
  font-weight: 600;
}

/* Material 3.0: High-Fidelity Solid Glass Card */
.liquid-glass-card-3d {
  width: 90%;
  max-width: 1200px;
  padding: 35px; /* Glass Frame "Sporge" */
  border-radius: var(--glass-radius);
  position: relative;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  
  margin: 0 auto;
  z-index: 10;
  overflow: hidden;
  will-change: transform; /* GPU Optimization */
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Static Crystal Reflections (Apple Event Style) */
.liquid-glass-card-3d::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 60%;
  /* Pure Cold Highlights - Surgical 1px effect */
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.03) 20%, 
    transparent 60%);
  pointer-events: none;
  z-index: 2;
}

/* High-Intensity Mirror Points (#FFFFFF) - Thin surgical wires */
.liquid-glass-card-3d::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--glass-radius);
  border: 1px solid rgba(255, 255, 255, 0.05); /* Extra definition */
  background: 
    radial-gradient(circle at 0% 100%, rgba(255,255,255,0.4) 0%, transparent 12%),
    radial-gradient(circle at 100% 0%, rgba(255,255,255,0.4) 0%, transparent 12%);
  opacity: 0.3; 
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 3;
}

.liquid-glass-card-3d:hover {
  transform: translateY(-8px) scale(1.01);
}

.glass-video {
  width: 100%;
  height: auto;
  border-radius: 20px;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 1.2s ease;
  will-change: transform;
}

/* Global Glass Enforcement */
.service-card, .my-card, .boring-card {
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  border: var(--glass-border);
  will-change: transform;
}

.glass-video {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 1.2s ease;
}

.glass-canvas:hover .glass-video {
  transform: scale(1.05);
}

/* Mobile-First Fixes */
@media (max-width: 768px) {
  .hero-container {
    padding-top: 120px;
  }
  .glass-canvas {
    width: 95%;
    padding: 15px; /* Smaller frame on mobile */
    border-radius: 30px;
  }
  .inner-video-card {
    border-radius: 15px;
  }
  .ambient-light {
    opacity: 0.15;
    filter: blur(80px);
  }
  .hero-title { font-size: 42px; }
}

/* Dynamic Scrolling Words */
.dynamic-words {
  display: inline-grid;
  overflow: hidden;
  vertical-align: bottom;
  color: var(--color-accent-blue);
  font-weight: 600;
  min-width: 4.4em;
  margin: 0;
  padding: 0;
}

.dynamic-words .word {
  grid-area: 1/1;
  text-align: center;
  align-self: center;
  justify-self: center;
  margin: 0;
  padding: 0;
  animation: slideWords 6s infinite cubic-bezier(0.87, 0, 0.13, 1);
  opacity: 0;
  transform: translateY(100%);
}

.dynamic-words .word:nth-child(1) { animation-delay: 0s; }
.dynamic-words .word:nth-child(2) { animation-delay: 2s; }
.dynamic-words .word:nth-child(3) { animation-delay: 4s; }

@keyframes slideWords {
  0% { transform: translateY(100%); opacity: 0; }
  5% { transform: translateY(0); opacity: 1; }
  33% { transform: translateY(0); opacity: 1; }
  38% { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(-100%); opacity: 0; }
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

/* Availability Badge */
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: 40px;
  padding: 8px 18px;
  margin-bottom: 24px;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: 0 4px 14px var(--color-shadow);
  transition: background-color 0.5s ease, border-color 0.5s ease;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #32D74B;
  border-radius: 50%;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid #32D74B;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.8; }
  80%, 100% { transform: scale(2.4); opacity: 0; }
}

.badge-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-main);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Sections */
section {
  padding: var(--space-section) 0;
  position: relative;
  background: transparent;
  z-index: 10;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-header);
}

.section-header h2 {
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 16px;
  color: var(--color-text-main);
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 18px;
}

/* Apple Video Reveal */
.apple-reveal {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  will-change: clip-path, transform, opacity;
  transform: translateZ(0); /* Force Hardware Acceleration */
  opacity: 0.1; /* Starts completely faded */
}

.apple-reveal video {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Apple UI Comparison Section (Symmetrical Rebuild) --- */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 1000px;
  margin: 40px auto 0;
  position: relative;
  z-index: 20;
}

.comp-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 40px; /* Wider iOS style */
  padding: 40px;
  display: flex;
  flex-direction: column;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  height: auto;
}

.comp-card h3 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 32px;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

/* Winner Variant (CT) */
.comp-winner {
  border: 1px solid rgba(0, 113, 227, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 113, 227, 0.15);
  animation: winnerPulse 6s infinite alternate ease-in-out;
}

@keyframes winnerPulse {
  0% { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 113, 227, 0.15); border-color: rgba(0, 113, 227, 0.3); }
  100% { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 50px rgba(0, 113, 227, 0.4); border-color: rgba(0, 113, 227, 0.6); }
}

/* Loser Variant (Agencies) */
.comp-loser {
  border: 1px solid rgba(255, 255, 255, 0.05);
  opacity: 0.95;
}

/* Official Badge Style */
.comp-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  background: #0071e3; /* Blue Apple */
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 6px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Comparison List Styles */
.comp-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.comp-list li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-muted);
  display: flex;
  align-items: flex-start;
}

.comp-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

/* Winner Icons (Checks) */
.comp-winner .comp-list li { color: #FFFFFF; }
.comp-winner .comp-list li::before {
  content: '✓';
  color: #34c759; /* Green Apple */
}

/* Loser Icons (X) */
.comp-loser .comp-list li::before {
  content: '✕';
  color: #ff3b30; /* Red Apple */
}

/* Symmetry Adjustment for Mobile */
@media (max-width: 900px) {
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 20px;
  }
  .comp-card {
    min-height: auto;
    padding: 32px;
  }
}


/* Method Section — Premium Reveal Layout */
.method-section {
  padding: var(--space-section) 0;
  position: relative;
  /* Removal of overflow: hidden allows flare to bleed into next section naturally */
}

.method-container {
  z-index: 10;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.method-header {
  text-align: center;
  margin-bottom: 60px;
  max-width: 800px;
}

.method-header .subtitle-small {
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.method-header h2 {
  font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 24px;
  color: #FFFFFF;
}

.method-header p {
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1.6;
}

.method-cards-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 1100px;
}

.method-card-3d {
  background: rgba(15, 15, 20, 0.4);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--color-card-border);
  border-radius: 32px;
  padding: 40px;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.method-card-3d:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-accent-blue);
  transform: translateY(-10px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

.method-card-3d .card-number {
  font-size: 14px;
  color: var(--color-accent-blue);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.method-card-3d h3 {
  font-size: 22px;
  margin-bottom: 16px;
  color: #FFFFFF;
}

.method-card-3d p {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Asymmetrical Spanning Grid (Desktop) */
@media (min-width: 901px) {
  .card-01 { grid-column: 1 / 5; }
  .card-02 { grid-column: 5 / 9; transform: translateY(30px); }
  .card-03 { grid-column: 9 / 13; }
  .card-04 { grid-column: 3 / 7; transform: translateY(20px); }
  .card-05 { grid-column: 7 / 11; transform: translateY(50px); }
}

/* Mobile & Tablet Refinements */
@media (max-width: 900px) {
  .method-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .method-card-3d {
    grid-column: auto !important;
    transform: none !important;
    padding: 32px;
  }
}


/* ============================================================
   CASE STUDIES CAROUSEL — Apple-tier Precision (v3)
   Math: card = (100vw - 2*gap) / 1.5
   → side peek per lato = (100vw - cardWidth)/2 - gap ≈ cardWidth/4
   ============================================================ */

/* --- Sezione wrapper --- */
.case-studies-section {
  padding: var(--space-section) 0;
  background: #000000;              /* sfondo nero puro */
  position: relative;
  /* Removal of overflow: hidden to allow flares to breathe */
}

/* --- Viewport: taglio netto senza sfumature ai bordi --- */
.cs-viewport {
  width: 100%;
  overflow: hidden;                 /* clip netto */
}

/* --- Track scorrevole --- */
.cs-track {
  display: flex;
  align-items: center;               /* card allineate verticalmente al centro */
  gap: 20px;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Fallback padding prima che il JS calcoli il valore esatto          */
  /* Formula: (100vw - cardWidth) / 2  dove cardWidth ≈ 60vh × (4/5)   */
  padding-inline: calc((100vw - 60vh * 0.8) / 2);
  scroll-padding-inline: calc((100vw - 60vh * 0.8) / 2);
}

.cs-track::-webkit-scrollbar {
  display: none;
}

/* --- Card: PROPORZIONI VERTICALI FISSE (4/5 — 'quadrato alto') --- */
.case-card {
  flex: 0 0 auto;                    /* larghezza derivata da aspect-ratio + height */
  height: 60vh;                      /* altezza fissa 60% viewport */
  min-height: 360px;
  aspect-ratio: 4 / 5;               /* PORTRAIT verticale 'quadrato alto' */
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  background: #111;
  scroll-snap-align: center;         /* snap al centro */
  cursor: grab;
  user-select: none;
  will-change: transform;
}

.case-card:active { cursor: grabbing; }

/* Immagine riempie tutta la card senza deformazione */
.case-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  pointer-events: none;
  transition: transform 1.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.case-card:hover img {
  transform: scale(1.06);
}

/* Gradient SOLO in basso — protegge il testo senza coprire il soggetto */
.case-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.80) 0%,
    rgba(0, 0, 0, 0.35) 28%,
    rgba(0, 0, 0, 0.00) 52%
  );
  pointer-events: none;
}

/* Testo card */
.case-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 36px 32px;
  z-index: 2;
}

.case-card__content h3 {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.2;
}

.case-card__content p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  max-width: 85%;
}

/* --- Footer: dots centrati + frecce a destra --- */
.cs-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 36px;
}

/* --- Dots --- */
.cs-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cs-dot {
  height: 6px;
  width: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.35s ease;
}

.cs-dot.active {
  width: 22px;                      /* pillola orizzontale */
  background: #FFFFFF;
}

/* --- Frecce --- */
.cs-arrows {
  position: absolute;
  right: 0;
  display: flex;
  gap: 10px;
}

.cs-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s ease,
              border-color 0.3s ease,
              transform 0.25s ease;
}

.cs-arrow svg {
  width: 18px;
  height: 18px;
}

.cs-arrow:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}

.cs-arrow:active {
  transform: scale(0.94);
}

/* --- Mobile (≤ 768px) --- */
@media (max-width: 768px) {
  .case-studies-section {
    padding: 80px 0 60px;
  }

  .case-card {
    flex: 0 0 auto;
    height: 52vh;
    min-height: 280px;
    aspect-ratio: 4 / 5;   /* stessa proporzione verticale su mobile */
    border-radius: 22px;
  }

  .cs-track {
    gap: 12px;
    padding-left: 5vw;       /* margine sinistro ridotto su mobile */
    scroll-padding-left: 5vw;
  }

  .case-card__content {
    padding: 24px 22px;
  }

  .cs-footer {
    flex-direction: column;
    gap: 20px;
    margin-top: 28px;
  }

  .cs-arrows {
    position: static;
  }
}


/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.service-card {
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  background: var(--color-surface);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 40px;
  padding: 48px;
  transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.service-card:hover { 
  transform: translateY(-12px); 
  border-color: var(--color-accent-blue);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}

.service-icon {
  width: 72px;
  height: 72px;
  background: rgba(10, 132, 255, 0.1);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--color-accent-blue);
  margin-bottom: 32px;
  transition: transform 0.5s ease;
}

.service-card:hover .service-icon { transform: scale(1.1) rotate(5deg); }

.service-card h3 { font-size: 24px; margin-bottom: 16px; color: #FFFFFF; }
.service-card p { font-size: 16px; color: rgba(255, 255, 255, 0.7); line-height: 1.7; }

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.about-photo {
  width: 100%;
  height: auto;
  border-radius: 48px;
  border: 1px solid var(--color-card-border);
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
  transform: rotate(-2deg);
  transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.about-media:hover .about-photo { transform: rotate(0deg) scale(1.02); }

.about-content h2 { font-size: clamp(32px, 4vw, 56px); line-height: 1.1; margin-bottom: 40px; }
.about-content p { font-size: 18px; color: var(--color-text-muted); line-height: 1.8; margin-bottom: 48px; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  border-top: 1px solid var(--color-card-border);
  padding-top: 48px;
}

.stat-block { text-align: left; }
.stat-number { font-size: 40px; font-weight: 700; color: #FFFFFF; display: block; margin-bottom: 8px; }
.stat-label { font-size: 13px; color: rgba(255, 255, 255, 0.7); text-transform: uppercase; letter-spacing: 2px; }

/* Authority Numbers */
.authority-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.authority-box {
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  background: var(--color-surface);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 40px;
  padding: 64px 32px;
  text-align: center;
  transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.authority-box:hover { transform: translateY(-10px); border-color: var(--color-card-border-hover); }
.authority-number { font-size: 64px; font-weight: 700; margin-bottom: 12px; color: #FFFFFF; }
.authority-number.highlight { color: #FFFFFF; }
.authority-label { font-size: 15px; color: rgba(255, 255, 255, 0.7); text-transform: uppercase; letter-spacing: 2px; line-height: 1.4; }

/* Testimonials Marquee */
.marquee-wrapper {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  padding: 40px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 24px;
  animation: scrollMarquee 50s linear infinite;
}

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

@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.testimonial-card {
  width: 420px;
  position: relative;
  overflow: hidden;
  
  /* Crystal Pane: Triple-gradient for SHEEN and LENS effects in one layer */
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 40%), /* Top-Left Surface Sheen */
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.03) 0%, transparent 60%), /* Subtle Depth Glow */
    rgba(15, 15, 15, 0.45); /* Base Material */
  
  backdrop-filter: blur(25px) saturate(175%) brightness(1.1);
  -webkit-backdrop-filter: blur(25px) saturate(175%) brightness(1.1);
  
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 36px;
  padding: 40px;
  transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.5),
    inset 0 0 40px rgba(0, 122, 255, 0.08); /* Faint Ambient Blue */
  display: flex;
  flex-direction: column;
}

.testimonial-card:hover { 
  transform: translateY(-10px) scale(1.02); 
  border-color: rgba(0, 122, 255, 0.4);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

.testimonial-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.testimonial-profile {
  display: flex;
  gap: 16px;
  align-items: center;
}

.testimonial-avatar {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #1c1c1e 0%, #3a3a3c 100%);
  border-radius: 50%;
  border: 1px solid var(--color-card-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-author h4 { font-size: 18px; margin-bottom: 2px; color: #FFFFFF; }
.testimonial-author p { font-size: 13px; color: rgba(255, 255, 255, 0.7); }
.gold-star { color: var(--color-neon-yellow); font-size: 20px; }

.testimonial-text {
  font-size: 16px;
  color: var(--color-text-muted);
  line-height: 1.8;
  font-style: italic;
  position: relative;
}

/* FAQ Section */
/* "THE APPLE CLEANUP" - Global Glass Enforcement */
.service-card, .my-card, .boring-card, .glass-card, .faq-item {
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  will-change: transform;
}

/* Sticky FAQ Flex Logic */
.faq-wrapper {
  display: flex;
  gap: 100px;
  align-items: flex-start;
}

.faq-header-side {
  flex: 1;
  position: sticky;
  top: 15vh;
  align-self: flex-start;
}

.faq-header-side h2 {
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.1;
  margin-top: 20px;
  color: #FFFFFF;
}

.faq-list {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  will-change: transform;
}

.faq-question {
  width: 100%;
  padding: 24px;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 500;
  text-align: left;
}

@media (max-width: 900px) {
  .faq-wrapper { flex-direction: column; gap: 40px; }
  .faq-list { position: relative; top: 0; }
}

.faq-answer {
  padding: 0 24px 20px 24px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-muted);
}

@media (max-width: 900px) {
  .faq-wrapper { flex-direction: column; gap: 40px; }
  .faq-list { position: relative; top: 0; }
  .faq-header-side { position: relative; top: 0; }
  .faq-header-side h2 { font-size: 38px; }
}

.faq-icon {
  font-size: 22px;
  color: var(--color-text-muted);
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.faq-item.active .faq-icon { transform: rotate(45deg); color: var(--color-accent-blue); }

.faq-answer-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.faq-item.active .faq-answer-wrapper { max-height: 400px; }
.faq-answer { padding: 0 32px 40px 32px; color: var(--color-text-muted); font-size: 17px; line-height: 1.8; }





/* Contact Section */
.form-control {
  width: 100%;
  padding: 20px 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--color-card-border);
  border-radius: 20px;
  color: white;
  font-family: inherit;
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent-blue);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.1);
}

textarea.form-control { height: 180px; resize: none; }

/* Utilities - Scroll Reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: all 1.0s cubic-bezier(0.25, 0.1, 0.25, 1.0);
  will-change: transform, opacity;
}

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

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Mobile & Tablet Refinements */
@media (max-width: 1024px) {
  .about-grid, .faq-grid { gap: 40px; }
  .about-photo { transform: rotate(0); }
}

@media (max-width: 900px) {
  header .nav-links { display: none; }
  .about-grid, .faq-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr; gap: 24px; }
  .method-cards-grid { display: flex; flex-direction: column; }
  .method-card-3d { grid-column: auto !important; margin: 0 !important; }
}
