/* ============================================================
   WanTech.it — Premium Dark-Themed CSS
   Mobile-First · Glassmorphism · Modern CSS
   ============================================================ */

/* —————————————————————————————————————————————————————————————
   0. CUSTOM PROPERTIES
   ————————————————————————————————————————————————————————————— */
:root {
  /* Backgrounds */
  --bg: #0a0a0f;
  --bg-alt: #0e0e16;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);

  /* Borders */
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  /* Brand */
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --secondary: #00cec9;
  --secondary-light: #81ecec;
  --accent-pink: #fd79a8;
  --accent-yellow: #fdcb6e;
  --brand-blue: #0066ff;

  /* Typography */
  --text: #f0f0f5;
  --text-secondary: rgba(240, 240, 245, 0.6);
  --text-muted: rgba(240, 240, 245, 0.35);
}

/* —————————————————————————————————————————————————————————————
   1. RESET & BASE
   ————————————————————————————————————————————————————————————— */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

::selection {
  background-color: var(--primary);
  color: #fff;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding: 60px 0;
}

.section-alt {
  background-color: var(--bg-alt);
}

/* —————————————————————————————————————————————————————————————
   2. GRADIENT TEXT
   ————————————————————————————————————————————————————————————— */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* —————————————————————————————————————————————————————————————
   3. NAVBAR
   ————————————————————————————————————————————————————————————— */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
}

.navbar.scrolled {
  background-color: rgba(10, 10, 15, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin-inline: auto;
  padding: 16px 24px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 32px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.nav-logo:hover .brand-logo-img {
  transform: scale(1.05);
}

.logo-text {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  transition: opacity 0.2s ease;
}

.logo-highlight {
  color: var(--brand-blue);
}

.nav-logo:hover .logo-text {
  opacity: 0.9;
}

/* Hamburger toggle */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #fff;
  border-radius: 2px;
  transition: transform 0.35s ease, opacity 0.25s ease;
  position: absolute;
}

.hamburger-line:nth-child(1) {
  transform: translateY(-7px);
}

.hamburger-line:nth-child(3) {
  transform: translateY(7px);
}

.nav-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg);
}

/* Nav menu — mobile */
.nav-menu {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: rgba(10, 10, 15, 0.98);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.nav-menu.active {
  transform: translateX(0);
}

.nav-link {
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 1rem;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--primary);
  color: #fff;
  font-weight: 600;
  border-radius: 99px;
  padding: 10px 24px;
  transition: filter 0.25s ease, transform 0.25s ease;
}

.nav-cta:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

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

/* Animated background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  will-change: transform;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  top: -100px;
  right: -100px;
  animation: float 20s ease-in-out infinite;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  bottom: -50px;
  left: -100px;
  animation: float 25s ease-in-out infinite reverse;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, var(--accent-pink), var(--primary-light));
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: float 18s ease-in-out infinite;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin-inline: auto;
  padding: 120px 24px 60px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 8px 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #55efc4;
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hide-mobile {
  display: none;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Trust strip */
.hero-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-top: 48px;
}

.trust-avatars {
  display: flex;
}

.trust-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  border: 2px solid var(--bg);
  flex-shrink: 0;
  background-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
}

img.trust-avatar {
  padding: 4px;
  object-fit: contain;
}

.trust-avatar + .trust-avatar {
  margin-left: -8px;
}

.trust-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-line {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  animation: scroll-down 2s ease-in-out infinite;
}

/* —————————————————————————————————————————————————————————————
   5. BUTTONS
   ————————————————————————————————————————————————————————————— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  line-height: 1.2;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  background-color: rgba(108, 92, 231, 0.1);
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.1rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* —————————————————————————————————————————————————————————————
   6. SECTION HEADER
   ————————————————————————————————————————————————————————————— */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--secondary);
  margin-bottom: 16px;
  padding: 6px 16px;
  background: rgba(0, 206, 201, 0.1);
  border: 1px solid rgba(0, 206, 201, 0.2);
  border-radius: 99px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

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

/* —————————————————————————————————————————————————————————————
   7. BENTO GRID
   ————————————————————————————————————————————————————————————— */
.bento-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

/* —————————————————————————————————————————————————————————————
   8. GLASS CARD
   ————————————————————————————————————————————————————————————— */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(108, 92, 231, 0),
    rgba(108, 92, 231, 0),
    rgba(108, 92, 231, 0)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: background 0.4s ease;
}

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

.glass-card:hover::before {
  background: linear-gradient(
    135deg,
    rgba(108, 92, 231, 0.25),
    rgba(0, 206, 201, 0.15),
    rgba(108, 92, 231, 0.05)
  );
}

/* —————————————————————————————————————————————————————————————
   9. BENTO CARD
   ————————————————————————————————————————————————————————————— */
.bento-card .card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  background: color-mix(in srgb, var(--icon-color) 15%, transparent);
  color: var(--icon-color);
}

.bento-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
}

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

.card-tags {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* —————————————————————————————————————————————————————————————
   10. ABOUT
   ————————————————————————————————————————————————————————————— */
.about-grid {
  display: grid;
  gap: 64px;
  grid-template-columns: 1fr;
}

.about-content h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
}

.about-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-values {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.value-item {
  display: flex;
  gap: 16px;
  align-items: center;
}

.value-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(108, 92, 231, 0.1);
  color: var(--primary);
  font-size: 1.25rem;
}

.value-item strong {
  display: block;
  color: var(--text);
}

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

/* —————————————————————————————————————————————————————————————
   11. STATS
   ————————————————————————————————————————————————————————————— */
.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.stat-card {
  text-align: center;
  padding: 32px 16px;
}

.stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1.1;
}

.stat-suffix {
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.stat-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 8px;
}

/* —————————————————————————————————————————————————————————————
   12. PORTFOLIO
   ————————————————————————————————————————————————————————————— */
/* --- Portfolio Layout --- */
.portfolio-featured-container {
  width: 100%;
  margin-bottom: 56px;
}

.portfolio-featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 28px;
  position: relative;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.portfolio-featured-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.portfolio-featured-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  order: 2; /* Info below on mobile */
}

.portfolio-featured-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.featured-badge {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.15) 0%, rgba(0, 206, 201, 0.15) 100%);
  color: var(--text-primary);
  font-weight: 600;
  border: 1px solid rgba(162, 155, 254, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.featured-platforms {
  display: flex;
  gap: 8px;
}

.platform-tag {
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
}

.portfolio-featured-info h3 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.featured-slogan {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  font-weight: 600;
  background: linear-gradient(135deg, #00cec9 0%, #6c5ce7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.featured-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.featured-highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.highlight-item {
  display: flex;
  gap: 12px;
  align-items: start;
}

.highlight-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.highlight-icon svg {
  stroke-width: 2px;
}

.highlight-text h4 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 3px;
  color: var(--text-primary);
}

.highlight-text p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.featured-tech-stack {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tech-tag-badge {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.featured-actions {
  display: flex;
  gap: 12px;
}

/* --- Visual Showcase Area --- */
.portfolio-featured-showcase {
  position: relative;
  width: 100%;
  height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: visible;
  order: 1; /* Showcase on top on mobile */
  margin-bottom: 20px;
}

.showcase-web-mockup {
  width: 92%;
  background: rgba(10, 10, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transition: all 0.5s ease;
  z-index: 1;
  transform: perspective(1000px) rotateX(3deg) rotateY(-3deg) rotateZ(0.5deg);
}

.mockup-header-bar {
  height: 24px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.mockup-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.mockup-dot.red { background: #ff5f56; }
.mockup-dot.yellow { background: #ffbd2e; }
.mockup-dot.green { background: #27c93f; }

.mockup-address {
  font-size: 0.6rem;
  color: var(--text-secondary);
  opacity: 0.5;
  margin-left: auto;
  font-family: monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
}

.mockup-screen-content {
  width: 100%;
  aspect-ratio: 1024/500;
  overflow: hidden;
  background: #09090d;
}

.showcase-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Staggered iPhone Mockups --- */
.showcase-mobiles-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  overflow: visible;
}

.phone-mockup-wrapper {
  width: 110px;
  height: 235px;
  position: absolute;
  bottom: 0px;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.2);
  cursor: pointer;
  z-index: 3;
}

/* Base states for iPhones */
.phone-left {
  left: 5%;
  transform: rotate(-9deg) translateY(10px) scale(0.9);
}

.phone-center {
  left: 50%;
  transform: translateX(-50%) translateY(-10px) scale(1.02);
  z-index: 5;
}

.phone-right {
  right: 5%;
  transform: rotate(9deg) translateY(10px) scale(0.9);
}

.phone-hidden {
  left: 50%;
  transform: translateX(-50%) translateY(60px) scale(0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* Premium physical details of the phone mockup */
.phone-frame {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  border: 4.5px solid #1a1a26;
  background: #000;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}

.phone-earpiece {
  width: 30px;
  height: 3.5px;
  background: #2a2a35;
  border-radius: 1.5px;
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.phone-screen-display {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}

.phone-screen-display img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone-bar-home {
  width: 35px;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 1.5px;
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* Hover and active states for phones */
.phone-mockup-wrapper:hover,
.phone-mockup-wrapper.active-phone {
  transform: translateY(-30px) scale(1.1) rotate(0deg) !important;
  z-index: 12 !important;
}

.phone-mockup-wrapper:hover .phone-frame,
.phone-mockup-wrapper.active-phone .phone-frame {
  border-color: #6c5ce7;
  box-shadow: 0 20px 45px rgba(108, 92, 231, 0.4);
}

/* Instructions */
.mobiles-instruction {
  position: absolute;
  bottom: -22px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  opacity: 0.4;
  width: 100%;
  text-align: center;
  font-style: italic;
}

/* Secondary projects grid */
.portfolio-grid-secondary {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.portfolio-card {
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.portfolio-image {
  height: 200px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(0, 206, 201, 0.06));
}

/* Browser mockup */
.portfolio-mockup {
  width: 80%;
  max-width: 300px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mockup-bar {
  height: 24px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
}

.mockup-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.mockup-content {
  padding: 8px;
}

.mockup-nav {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-bottom: 8px;
  width: 60%;
}

.mockup-hero-block {
  height: 30%;
  min-height: 28px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  margin-bottom: 8px;
}

.mockup-grid-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.mockup-grid-block div {
  height: 24px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

/* Real site previews inside mockups */
.mockup-screen-display {
  width: 100%;
  aspect-ratio: 1.5;
  overflow: hidden;
  background: #09090d;
}

.mockup-screen-display img.preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover .preview-img {
  transform: scale(1.05);
}

/* Portfolio info */
.portfolio-info {
  padding: 24px;
}

.portfolio-info .portfolio-tags {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.portfolio-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* Project Logos in Titles */
.project-title-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.project-title-wrapper h3 {
  margin-bottom: 0 !important;
}

.project-logo {
  border-radius: 6px; /* Preserva gli angoli e i bordi delle icone app originali */
  flex-shrink: 0;
  object-fit: contain;
}

.portfolio-featured-info .project-logo {
  width: 36px;
  height: 36px;
}

.portfolio-card .project-logo {
  width: 24px;
  height: 24px;
}

/* —————————————————————————————————————————————————————————————
   13. TIMELINE
   ————————————————————————————————————————————————————————————— */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(108, 92, 231, 0.3),
    rgba(0, 206, 201, 0.3),
    rgba(108, 92, 231, 0.05)
  );
}

.timeline-item {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
  position: relative;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.timeline-step {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--primary);
}

.timeline-content {
  flex: 1;
}

.timeline-content .timeline-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.25rem;
  background: color-mix(in srgb, var(--icon-color, var(--primary)) 15%, transparent);
  color: var(--icon-color, var(--primary));
}

.timeline-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.timeline-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* —————————————————————————————————————————————————————————————
   14. TESTIMONIALS
   ————————————————————————————————————————————————————————————— */
.testimonials-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.testimonial-card .testimonial-stars {
  color: var(--accent-yellow);
  font-size: 1.1rem;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.testimonial-card blockquote p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.testimonial-author strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
}

.testimonial-author span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* —————————————————————————————————————————————————————————————
   15. CTA BANNER
   ————————————————————————————————————————————————————————————— */
.cta-banner {
  padding: 60px 0;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.blob-cta-1,
.blob-cta-2 {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.2;
}

.blob-cta-1 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  top: -80px;
  right: -60px;
  animation: float 20s ease-in-out infinite;
}

.blob-cta-2 {
  width: 280px;
  height: 280px;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  bottom: -60px;
  left: -60px;
  animation: float 25s ease-in-out infinite reverse;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
}

.cta-content p {
  color: var(--text-secondary);
  margin: 16px auto 32px;
  max-width: 500px;
  line-height: 1.7;
}

/* —————————————————————————————————————————————————————————————
   16. CONTACT GRID
   ————————————————————————————————————————————————————————————— */
.contact-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}

/* —————————————————————————————————————————————————————————————
   17. CONTACT FORM
   ————————————————————————————————————————————————————————————— */
.contact-form {
  padding: 24px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

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

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='rgba(240,240,245,0.35)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-group select option {
  background: var(--bg);
  color: var(--text);
}

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

.form-error {
  display: block;
  color: #ff6b6b;
  font-size: 0.8rem;
  margin-top: 6px;
  min-height: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.form-error.visible {
  opacity: 1;
}

.form-success {
  display: none;
  text-align: center;
  padding: 24px;
  color: #55efc4;
}

.form-success.visible {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* —————————————————————————————————————————————————————————————
   18. CONTACT INFO
   ————————————————————————————————————————————————————————————— */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px 24px;
}

.info-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(0, 206, 201, 0.1);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.info-card strong {
  display: block;
  color: var(--text);
  margin-bottom: 2px;
}

.info-card a,
.info-card span {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.25s ease;
}

.info-card a:hover {
  color: var(--secondary);
}

/* —————————————————————————————————————————————————————————————
   19. FOOTER
   ————————————————————————————————————————————————————————————— */
.footer {
  padding: 64px 0 0;
  border-top: 1px solid var(--border);
  background-color: var(--bg);
}

.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}

.footer-brand .nav-logo {
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-links h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.25s ease;
}

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

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

.social-link:hover {
  background: rgba(108, 92, 231, 0.15);
  color: var(--primary);
  border-color: rgba(108, 92, 231, 0.3);
}

.footer-bottom {
  padding: 24px 0;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* —————————————————————————————————————————————————————————————
   20. BACK TO TOP
   ————————————————————————————————————————————————————————————— */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

/* —————————————————————————————————————————————————————————————
   21. KEYFRAME ANIMATIONS
   ————————————————————————————————————————————————————————————— */
@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(30px, -30px) rotate(5deg);
  }
  50% {
    transform: translate(-20px, 20px) rotate(-5deg);
  }
  75% {
    transform: translate(20px, 10px) rotate(3deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.5);
  }
}

@keyframes scroll-down {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* —————————————————————————————————————————————————————————————
   22. SCROLL ANIMATIONS
   ————————————————————————————————————————————————————————————— */
.anim-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.anim-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-delay-1 { transition-delay: 0.1s; }
.anim-delay-2 { transition-delay: 0.2s; }
.anim-delay-3 { transition-delay: 0.3s; }
.anim-delay-4 { transition-delay: 0.4s; }

.anim-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered children — bento grid */
.bento-grid .anim-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.bento-grid .anim-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.bento-grid .anim-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.bento-grid .anim-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.bento-grid .anim-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* Staggered children — portfolio grid */
.portfolio-grid-secondary .anim-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.portfolio-grid-secondary .anim-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.portfolio-grid-secondary .anim-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.portfolio-grid-secondary .anim-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.portfolio-grid-secondary .anim-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* Staggered children — testimonials grid */
.testimonials-grid .anim-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.testimonials-grid .anim-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.testimonials-grid .anim-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* Staggered children — timeline items */
.timeline .timeline-item:nth-child(2) { transition-delay: 0.1s; }
.timeline .timeline-item:nth-child(3) { transition-delay: 0.2s; }
.timeline .timeline-item:nth-child(4) { transition-delay: 0.3s; }
.timeline .timeline-item:nth-child(5) { transition-delay: 0.4s; }

/* —————————————————————————————————————————————————————————————
   23. REDUCED MOTION
   ————————————————————————————————————————————————————————————— */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* —————————————————————————————————————————————————————————————
   24. RESPONSIVE — SMALL PHONES (≥ 480px)
   ————————————————————————————————————————————————————————————— */
@media (min-width: 480px) {
  .hero-content {
    padding: 140px 24px 80px;
  }

  .hide-mobile {
    display: inline;
  }

  .contact-form {
    padding: 32px;
  }

  .portfolio-image {
    height: 220px;
  }
}

/* —————————————————————————————————————————————————————————————
   24b. RESPONSIVE — TABLET (≥ 768px)
   ————————————————————————————————————————————————————————————— */
@media (min-width: 768px) {
  .section {
    padding: 80px 0;
  }

  /* Navbar desktop */
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    flex-direction: row;
    align-items: center;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: none;
    gap: 8px;
  }

  /* Grids: 2 columns */
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-grid-secondary {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-image {
    height: 240px;
  }

  .portfolio-featured-showcase {
    height: 380px;
  }

  .phone-mockup-wrapper {
    width: 120px;
    height: 255px;
  }

  .cta-banner {
    padding: 80px 0;
  }

  /* Footer 2x2 */
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }

  .contact-form {
    padding: 40px;
  }
}

/* —————————————————————————————————————————————————————————————
   24c. RESPONSIVE — DESKTOP (≥ 1024px)
   ————————————————————————————————————————————————————————————— */
@media (min-width: 1024px) {
  .section {
    padding: 100px 0;
  }

  /* 3-column grids */
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* About: 2-column */
  .about-grid {
    grid-template-columns: 1.2fr 1fr;
  }

  /* Contact: 2-column */
  .contact-grid {
    grid-template-columns: 1.2fr 1fr;
  }

  .hero-content {
    padding: 160px 24px 100px;
  }

  /* Featured Portfolio Card (Desktop) */
  .portfolio-featured-card {
    grid-template-columns: 1fr 1.1fr;
    gap: 48px;
    padding: 48px;
  }

  .portfolio-featured-info {
    order: 1;
  }

  .portfolio-featured-showcase {
    order: 2;
    height: 480px;
    margin-bottom: 0;
  }

  .showcase-web-mockup {
    width: 85%;
  }

  .phone-mockup-wrapper {
    width: 135px;
    height: 290px;
    bottom: -195px;
  }

  .phone-left {
    left: 8%;
    transform: rotate(-9deg) translateY(20px) scale(0.92);
  }

  .phone-center {
    left: 50%;
    transform: translateX(-50%) translateY(-15px) scale(1.03);
  }

  .phone-right {
    right: 8%;
    transform: rotate(9deg) translateY(20px) scale(0.92);
  }

  .phone-hidden {
    left: 50%;
    transform: translateX(-50%) translateY(80px) scale(0.6);
  }

  .mobiles-instruction {
    bottom: -235px; /* Posizionato sotto il bordo inferiore dei telefoni a -195px con più respiro */
  }

  .featured-highlights {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* —————————————————————————————————————————————————————————————
   24d. RESPONSIVE — LARGE DESKTOP (≥ 1440px)
   ————————————————————————————————————————————————————————————— */
@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }

  .hero-content {
    max-width: 900px;
  }
}
