﻿/* ===================================
   NETELEVATE  Minimal Premium 2026
   Typography-first, Mobile-first
   =================================== */

/* ===================================
   RESET & BASE
   =================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors */
  --color-text: #0a0a0a;
  --color-text-muted: #6b6b6b;
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-accent: #0a0a0a;
  --color-accent-hover: #2a2a2a;
  --color-border: #e5e5e5;
  --color-whatsapp: #25d366;
  
  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "SF Pro Display", system-ui, -apple-system, sans-serif;
  
  /* Spacing - optimized for viewport fit */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Layout */
  --container-narrow: 42rem;
  --container: 68rem;
  
  /* Animation */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 280ms;
  --duration-slow: 400ms;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ===================================
   TYPOGRAPHY
   =================================== */

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: var(--space-md) 0;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: var(--space-md) 0;
}

h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: var(--space-sm) 0;
}

p {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.7;
  color: var(--color-text-muted);
  margin: var(--space-sm) 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-smooth);
}

/* ===================================
   LAYOUT
   =================================== */

main {
  min-height: 100vh;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

/* Webkit scrollbar styling */
main::-webkit-scrollbar {
  width: 8px;
}

main::-webkit-scrollbar-track {
  background: transparent;
}

main::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

main::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

section {
  padding: var(--space-xl) var(--space-md);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ===================================
   HERO MINIMAL
   =================================== */

.hero-minimal {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: var(--space-md);
}

.logo-mark {
  display: inline-flex;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: fadeInUp var(--duration-slow) var(--ease-smooth) forwards;
}

.hero-minimal h1 {
  opacity: 0;
  font-size: clamp(2rem, 7vw, 4rem);
  margin: var(--space-sm) 0;
  animation: fadeInUp var(--duration-slow) var(--ease-smooth) 0.2s forwards;
}

.tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.4;
  color: var(--color-text-muted);
  max-width: 32rem;
  margin: var(--space-md) auto;
  opacity: 0;
  animation: fadeInUp var(--duration-slow) var(--ease-smooth) 0.4s forwards;
}

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.5rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: var(--space-md);
  opacity: 0;
  animation: fadeInUp var(--duration-slow) var(--ease-smooth) 0.6s forwards;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  animation: pulse 2s ease-in-out infinite;
}

/* ===================================
   BENEFITS SECTION
   =================================== */

.benefits {
  background: var(--color-surface);
  padding: var(--space-2xl) var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100vh;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.benefit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-md);
  width: 100%;
  justify-items: center;
}

.benefit-card {
  padding: 1rem 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  /* Start with a subtle base shadow rendered as a separate layer via pseudo-element */
  position: relative;
  overflow: visible; /* allow shadow to render outside */
  z-index: 1;
  /* keep a tiny, static shadow to avoid complete flatness */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  /* Only animate transform on the card; shadow handled by ::after (transform+opacity) to avoid repaint
     and the box-shadow on hover fades in more slowly for a natural effect */
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, box-shadow;
  max-width: 460px;
  width: 100%;
  align-self: start; /* avoid grid items stretching */
  display: block; /* single column layout */
}

.benefit-card:hover,
 .benefit-card:focus-visible {
  /* Immediately stop background animations for instant response */
  animation: none !important;
  /* Card lifts off the wall + subtle scale for depth */
  transform: translateY(-6px) scale(1.035);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  outline: none;
}

 /* Ensure keyboard users see the same effect; add visible shadow on hover/focus */
 .benefit-card:hover, .benefit-card:focus-visible {
   box-shadow: 0 12px 30px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.05);
 }
 .benefit-card:focus-visible { box-shadow: 0 12px 30px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.05); }
.benefit-card::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%; /* center behind the card */
  width: 110%;
  height: 60%;
  transform: translate(-50%, -50%) scale(1);
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.02) 50%, transparent 100%);
  border-radius: 40%;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  z-index: 0;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.benefit-card:hover::after {
  transform: translate(-50%, -50%) scale(1.2);
  opacity: 0.18; /* subtle, behind-the-card feel */
}

.benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
}

.benefit-num {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  color: var(--color-accent);
  opacity: 0.18;
  line-height: 1;
}

.benefit-emoji {
  font-size: clamp(1.75rem, 3vw, 2.2rem);
  opacity: 0.85;
  line-height: 1;
  font-weight: bold;
}

.benefit-body {
  display: block;
  text-align: left;
  margin-top: 0.25rem;
}

.benefit-card h3 {
  margin-top: 0;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
}

.benefit-card p {
  font-size: clamp(0.9rem, 2vw, 1rem);
  margin-bottom: var(--space-sm);
}

.benefit-meta {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  opacity: 0.7;
}

/* ===================================
   BENEFITS CAROUSEL (MOBILE ONLY)
   =================================== */

.benefits-inner {
  width: 100%;
  max-width: 1400px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  margin: 0 auto;
}

.benefits-header {
  text-align: center;
  flex-shrink: 0;
  padding: 0 var(--space-md);
}

/* Mobile: Carousel layout */
@media (max-width: 47.99rem) {
  .benefits-grid {
    display: flex;
    flex-direction: row;
    gap: var(--space-sm);
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: var(--space-xs);
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
    position: relative;
    margin-top: var(--space-md);
    width: 100%;
    justify-items: unset;
  }

  .benefits-grid::-webkit-scrollbar {
    height: 4px;
  }

  .benefits-grid::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
  }

  /* Mobile carousel card sizing */
  .benefit-card {
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    height: auto;
    min-height: auto;
    max-width: 100%;
    border-left: 3px solid var(--color-accent);
    padding-left: 1.25rem;
  }

  /* Show carousel indicators on mobile */
  .benefits-carousel-indicators {
    display: flex;
  }
}

/* Desktop: Grid layout */
@media (min-width: 48rem) {
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }

  /* Hide carousel indicators on desktop */
  .benefits-carousel-indicators {
    display: none !important;
  }
}

/* ===================================
   PORTFOLIO SECTION - 3D Orbit Showcase
   =================================== */

/* Old portfolio styles kept for reference */
.portfolio {
  display: none !important; /* Nascosto - usiamo portfolio-new */
}

/* ===================================
   NEW PORTFOLIO SECTION - Grid Layout
   =================================== */

.portfolio-new {
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  overflow: hidden;
}

.portfolio-new-inner {
  width: 100%;
  max-width: 1400px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
}

.portfolio-header {
  text-align: center;
  flex-shrink: 0;
  padding: 0 var(--space-md);
}

.portfolio-header h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin: var(--space-xs) 0;
}

.portfolio-subtitle {
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: var(--color-text-muted);
  margin: 0;
}

/* Projects Grid - Carousel Layout */
.projects-grid {
  display: flex;
  flex-direction: row;
  gap: var(--space-sm);
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: var(--space-xs);
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
  position: relative;
}

.projects-grid::-webkit-scrollbar {
  height: 4px;
}

.projects-grid::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

/* Carousel Indicators */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0 0;
  flex-wrap: wrap;
  margin-top: auto;
}

.carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  padding: 0;
}

.carousel-indicator:hover {
  background: var(--color-text-muted);
  transform: scale(1.2);
}

.carousel-indicator.active {
  background: var(--color-accent);
  transform: scale(1.3);
}

/* Show indicators on mobile and tablet */
@media (max-width: 63rem) {
  .carousel-indicators {
    display: flex;
  }
}

/* Hide indicators on desktop (4+ cards visible) */
@media (min-width: 64rem) {
  .carousel-indicators {
    display: none;
  }
}

/* Project Card */
.project-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: transform 0.3s var(--ease-smooth),
              box-shadow 0.4s var(--ease-smooth),
              border-color 0.3s var(--ease-smooth);
  cursor: pointer;
  overflow: visible;
  /* Carousel sizing */
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  height: auto;
  min-height: 400px;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(0, 0, 0, 0.03),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card > * {
  position: relative;
  z-index: 1;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  border-color: var(--color-accent);
}

.project-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Project Preview */
.project-preview {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 200px;
}

.project-browser {
  background: #f8f9fa;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-browser--dark {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.1);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.project-browser--dark .browser-bar {
  background: rgba(255, 255, 255, 0.05);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.browser-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
}

.browser-dot:first-child { background: #ff5f57; }
.browser-dot:nth-child(2) { background: #ffbd2e; }
.browser-dot:nth-child(3) { background: #28ca41; }

.browser-url {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--color-text-muted);
  font-family: monospace;
  opacity: 0.6;
}

.project-browser--dark .browser-url {
  color: rgba(255, 255, 255, 0.5);
}

.browser-viewport {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  flex: 1;
  display: flex;
}

.project-browser--dark .browser-viewport {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.preview-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: inherit;
  z-index: 1;
  overflow: hidden;
  flex-direction: column;
  gap: 0.5rem;
}

.preview-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

.project-browser--dark .preview-placeholder::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.placeholder-text {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  opacity: 0.7;
  letter-spacing: 0.05em;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.project-browser--dark .placeholder-text {
  color: rgba(255, 255, 255, 0.5);
}

.browser-viewport iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  transform: scale(0.5);
  transform-origin: top left;
  border: none;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.6s ease;
  background: white;
}

.browser-viewport iframe.loaded {
  opacity: 1;
}

.iframe-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 1;
}

/* Project Info */
.project-info {
  padding: var(--space-xs) 0 0;
}

.project-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: 4px 8px;
  background: var(--color-surface);
  border-radius: 4px;
  margin-bottom: var(--space-xs);
}

.project-info h3 {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin: 0 0 var(--space-xs);
  line-height: 1.2;
}

.project-info p {
  font-size: clamp(0.8rem, 1.8vw, 0.9rem);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Arrow Icon */
.project-arrow {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border-radius: 50%;
  color: var(--color-text-muted);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.3s var(--ease-smooth),
              transform 0.3s var(--ease-smooth),
              background 0.3s var(--ease-smooth);
}

.project-card:hover .project-arrow {
  opacity: 1;
  transform: translate(0, 0);
  background: var(--color-accent);
  color: var(--color-surface);
}

/* ===================================
   PORTFOLIO RESPONSIVE - Tablet
   =================================== */

@media (min-width: 48rem) {
  .portfolio-new {
    padding: var(--space-lg);
  }

  .portfolio-new-inner {
    gap: var(--space-lg);
    padding: var(--space-md) 0;
  }

  .portfolio-header {
    padding: 0;
  }

  .projects-grid {
    gap: var(--space-md);
    padding: 0;
  }

  .project-card {
    padding: var(--space-md);
    /* 2 cards visible at once on tablet */
    flex: 0 0 calc(50% - var(--space-sm));
  }

  .browser-viewport {
    height: 220px;
  }
}

/* ===================================
   PORTFOLIO RESPONSIVE - Desktop
   =================================== */

@media (min-width: 64rem) {
  .portfolio-new-inner {
    max-width: 1600px;
    padding: var(--space-md) 0;
  }

  .projects-grid {
    gap: var(--space-lg);
  }

  .project-card {
    padding: var(--space-md);
    /* 4 cards visible at once on desktop */
    flex: 0 0 calc(25% - var(--space-lg));
  }

  .browser-viewport {
    height: 240px;
  }

  .browser-viewport iframe {
    width: 300%;
    height: 300%;
    transform: scale(0.333);
  }

  .project-info h3 {
    font-size: 1.125rem;
  }

  .project-info p {
    font-size: 0.85rem;
  }
}

/* ===================================
   PORTFOLIO RESPONSIVE - Large Desktop
   =================================== */

@media (min-width: 90rem) {
  .browser-viewport {
    height: 180px;
  }

  .project-card {
    padding: var(--space-lg);
  }
}

/* ===================================
   PORTFOLIO ANIMATIONS
   =================================== */

.project-card {
  animation: none; /* No breathing on project cards */
}

.portfolio-new .project-card[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
}

.portfolio-new .project-card[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal */
.portfolio-new .project-card:nth-child(1) { transition-delay: 0.1s; }
.portfolio-new .project-card:nth-child(2) { transition-delay: 0.2s; }
.portfolio-new .project-card:nth-child(3) { transition-delay: 0.3s; }
.portfolio-new .project-card:nth-child(4) { transition-delay: 0.4s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .preview-placeholder::before {
    animation: none;
  }
  
  .portfolio-new .project-card {
    transition: none;
  }
  
  .browser-viewport iframe {
    transition: none;
    opacity: 1;
  }
}

/* Old Portfolio Styles - Hidden but preserved */
.portfolio {
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  height: auto;
  overflow: visible;
}

.portfolio .container {
  height: auto;
  display: grid;
  grid-template-rows: auto auto 1fr;
  row-gap: var(--space-md);
}

.portfolio h2 {
  max-width: 32rem;
  font-size: clamp(1.75rem, 5vw, 3rem);
  margin-bottom: var(--space-md);
}

.orbit {
  position: relative;
  width: 100%;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  overflow: visible;
  touch-action: none;
  margin-top: var(--space-md);
}

.orbit-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  will-change: transform;
  cursor: grab;
}

.orbit-inner.paused {
  cursor: grabbing;
}

.orbit-inner > .showcase-card {
  position: absolute;
  left: 50%;
  top: 50%;
  min-width: clamp(18rem, 36vw, 32rem);
  max-width: clamp(18rem, 36vw, 32rem);
  width: clamp(18rem, 36vw, 32rem);
  max-height: 42vh;
  transform-origin: 50% 50% 0;
  backface-visibility: hidden;
  will-change: transform, opacity;
  transition: box-shadow 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  scroll-snap-align: none;
  pointer-events: none;
  user-select: none;
  box-sizing: border-box;
  margin: 0;
  animation: none;
}

.showcase-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  align-content: start;
  pointer-events: none;
  user-select: none;
}

.showcase-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.04);
}

/* Visual Area - Browser Mockup */
.showcase-visual {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
}

.showcase-browser {
  background: #f8f9fa;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.showcase-browser--dark {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.1);
}

.browser-dots {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.showcase-browser--dark .browser-dots {
  background: rgba(255, 255, 255, 0.05);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
}

.showcase-browser--dark .browser-dots span {
  background: rgba(255, 255, 255, 0.2);
}

.browser-dots span:first-child { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #ffbd2e; }
.browser-dots span:nth-child(3) { background: #28ca41; }

.browser-content {
  padding: var(--space-sm);
  min-height: 180px;
}

/* Mock UI Elements */
.mock-hero {
  height: 60px;
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 70%, white) 100%);
  border-radius: 6px;
  margin-bottom: var(--space-xs);
}

.mock-text {
  height: 8px;
  width: 60%;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  margin-bottom: var(--space-sm);
}

.mock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mock-item {
  height: 40px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}

/* Split layout mock */
.mock-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: var(--space-xs);
}

.mock-side {
  height: 100px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

.mock-side:first-child {
  background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
}

.mock-side:last-child {
  background: linear-gradient(135deg, #444 0%, #2a2a2a 100%);
}

.mock-nav {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.mock-nav::before,
.mock-nav::after {
  content: '';
  width: 24px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

/* Dashboard mock */
.mock-dashboard {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 8px;
  height: 140px;
}

.mock-sidebar {
  background: linear-gradient(180deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 80%, black) 100%);
  border-radius: 6px;
}

.mock-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-chart {
  flex: 1;
  background: linear-gradient(90deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.06) 50%, rgba(0,0,0,0.02) 100%);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.mock-chart::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  height: 40%;
  background: linear-gradient(90deg, 
    var(--accent) 0%, 
    color-mix(in srgb, var(--accent) 60%, white) 30%, 
    var(--accent) 60%,
    color-mix(in srgb, var(--accent) 80%, white) 100%
  );
  border-radius: 4px;
  opacity: 0.3;
  clip-path: polygon(0 80%, 15% 40%, 35% 60%, 55% 20%, 75% 50%, 100% 30%, 100% 100%, 0 100%);
}

.mock-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mock-mini {
  height: 30px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}

/* Glow effect behind browser */
.showcase-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 60%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, var(--accent) 0%, transparent 70%);
  opacity: 0;
  filter: blur(40px);
  z-index: -1;
  transition: opacity 0.6s ease;
}

.showcase-card:hover .showcase-glow {
  opacity: 0.15;
}

/* Info Area */
.showcase-info {
  padding: var(--space-xs) 0;
}

.showcase-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.showcase-info h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  margin: 0 0 var(--space-xs);
  line-height: 1.2;
}

.showcase-info p {
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Stats */
.showcase-stats {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--color-text);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Portfolio Meta Statement (visually hidden) */
.portfolio-meta {
  /* Rimosso: visualmente nascosto, mantenuto in HTML per l'accessibilità */
  display: none !important;
}

.portfolio-meta p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.6;
  margin: 0;
}

.portfolio-meta strong {
  display: block;
  margin-top: var(--space-xs);
  font-size: clamp(1.125rem, 3vw, 1.5rem);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .orbit-inner { transition: none !important; }
  .orbit-inner > .showcase-card { transition: none !important; }
}

/* ===================================
   CTA SECTION
   =================================== */

.cta-section {
  padding: var(--space-lg) var(--space-md);
  background: var(--color-surface);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-content {
  max-width: 32rem;
}

.cta-content h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: var(--space-sm);
}

.cta-content p:first-of-type {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  margin-bottom: var(--space-md);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.875rem 1.75rem;
  margin-top: var(--space-md);
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  font-weight: 600;
  color: #ffffff;
  background: var(--color-whatsapp);
  border-radius: 100px;
  transition: all var(--duration-normal) var(--ease-smooth);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background: #22c55e;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:active {
  transform: translateY(0) scale(1);
}

.cta-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

/* ===================================
   FOOTER
   =================================== */

.footer {
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  border-top: 1px solid var(--color-border);
  scroll-snap-align: end;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: var(--space-xs) 0;
}

.footer-note {
  font-size: 0.75rem;
  opacity: 0.6;
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

/* Subtle breathing animation for a living feel */
@keyframes breathe {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1px) scale(1.002); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes breathe-slow {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(-0.6px) scale(1.001); opacity: 0.99; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Apply subtle breathing to benefit cards with staggered delays */
.benefit-card {
  animation: breathe 6s var(--ease-smooth) infinite;
  will-change: transform;
}
.benefit-card:nth-child(1) { animation-delay: 0s; }
.benefit-card:nth-child(2) { animation-delay: 0.6s; }
.benefit-card:nth-child(3) { animation-delay: 1.2s; }

/* Pause animation on hover so hover transform takes precedence */
.benefit-card:hover { animation-play-state: paused; }

/* Small breathing on hero elements */
.logo-mark, .tagline { animation: breathe-slow 8s var(--ease-smooth) infinite; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .benefit-card,
  .logo-mark,
  .tagline {
    animation: none !important;
    transition: none !important;
  }
}

/* Subtle universal breathe (very small scale/translate) for a living feel.
   Applied to key blocks only to avoid heavy repaints. Pauses on hover. */
@keyframes breathe-subtle {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1px) scale(1.003); }
  100% { transform: translateY(0) scale(1); }
}

/* Apply to main structural blocks */
.hero-minimal .container-narrow,
.benefits .container-narrow,
.portfolio .container,
.benefit-card,
.showcase-card,
.cta-content,
.footer {
  animation: breathe-subtle 14s var(--ease-smooth) infinite;
  will-change: transform;
}

/* Slightly stagger the timing to avoid synchronous motion */
.benefit-card:nth-child(1) { animation-delay: 0s; }
.benefit-card:nth-child(2) { animation-delay: 0.6s; }
.benefit-card:nth-child(3) { animation-delay: 1.2s; }
.showcase-card:nth-child(1) { animation-delay: 0.3s; }
.showcase-card:nth-child(2) { animation-delay: 0.9s; }
.showcase-card:nth-child(3) { animation-delay: 1.5s; }

/* Pause on hover/focus so interactions feel crisp */
.benefit-card:hover,
.showcase-card:hover,
.cta-content:hover,
.btn-whatsapp:hover,
.hero-minimal .container-narrow:hover {
  animation-play-state: paused;
  /* ensure instant responsiveness on hover */
  will-change: transform;
}

/* Keep very subtle effect on small screens (reduced magnitude) */
@media (max-width: 48rem) {
  @keyframes breathe-subtle { 50% { transform: translateY(-0.4px) scale(1.0015); } }
  .benefit-card,
  .showcase-card,
  .cta-content { animation-duration: 18s; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-minimal .container-narrow,
  .benefits .container-narrow,
  .benefit-card,
  .showcase-card,
  .cta-content,
  .footer { animation: none !important; }
}

/* Intersection Observer reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: transform var(--duration-normal) var(--ease-smooth), opacity var(--duration-normal) var(--ease-smooth);
  will-change: transform, opacity;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (min-width: 48rem) {
  section {
    padding: var(--space-lg) var(--space-lg);
  }
  
  /* Make Benefits more "approdata" on larger screens */
  .benefits {
    min-height: 120vh; /* taller section for landing/anchor feeling */
    padding-top: calc(var(--space-2xl) + 2rem);
    padding-bottom: var(--space-xl);
    justify-content: flex-start;
  }
  
  .benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }

  /* Desktop: keep single-column card layout; place icon above the content */
  .benefit-card {
    display: block;
  }

  .benefit-icon {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: var(--space-sm);
    margin-top: 0.25rem;
  }

  .benefit-num { font-size: 1.6rem; display: none; }
  .benefit-emoji { font-size: 1.9rem; }

  /* Showcase rail: tighter width on tablet */
  .showcase-grid {
    gap: var(--space-lg);
    padding-bottom: var(--space-md);
  }

  .showcase-card {
    min-width: 70vw;
    max-width: 70vw;
  }
}

/* Progress Indicator */
.scroll-progress {
  position: fixed;
  top: 50%;
  right: var(--space-md);
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.scroll-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  transition: all var(--duration-normal) var(--ease-smooth);
  cursor: pointer;
}

.scroll-progress-dot:hover {
  background: var(--color-text-muted);
  transform: scale(1.3);
}

.scroll-progress-dot.active {
  background: var(--color-accent);
  height: 24px;
  border-radius: 4px;
}

@media (max-width: 48rem) {
  .scroll-progress {
    right: var(--space-sm);
  }
  
  .scroll-progress-dot {
    width: 6px;
    height: 6px;
  }
  
  .scroll-progress-dot.active {
    height: 18px;
  }
}

@media (min-width: 64rem) {
  :root {
    font-size: 17px;
  }
  /* Desktop: make benefits feel large and anchored but not excessively tall */
  .benefits {
    min-height: 100vh;
    padding: var(--space-2xl) var(--space-md);
    justify-content: center;
  }

  .benefits .container-narrow {
    max-width: 1200px;
  }

  .benefits .benefit-grid {
    grid-template-columns: repeat(3, minmax(320px, 1fr));
    gap: calc(var(--space-lg) + 1rem);
  }

  .benefit-card {
    max-width: 460px;
    width: 100%;
  }
  
  /* Showcase: larger browsers on desktop */
  .showcase-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-lg);
    align-items: center;
    min-width: 50vw;
    max-width: 50vw;
  }
  
  .showcase-card:nth-child(even) {
    grid-template-columns: 1fr 1.2fr;
  }
  
  .showcase-card:nth-child(even) .showcase-visual {
    order: 2;
  }
  
  .browser-content {
    min-height: 220px;
  }
  
  .portfolio-meta {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
}
