/* ==========================================================
   STYLE.CSS — Metis Portfolio
   Vibe:   Dark Editorial / Ethereal Glass
   Layout: Asymmetric grid + Z-axis card depth
   Accent: #c8a96e — warm gold
   Fonts:  Syne (display) · DM Sans (body) · JetBrains Mono (labels)
   ========================================================== */

/* ----------------------------------------------------------
   CSS VARIABLES
   ---------------------------------------------------------- */
:root {
  /* Core palette */
  --bg:            #0e0e0e;
  --surface:       #161616;
  --surface-2:     #1d1d1d;
  --accent:        #c8a96e;
  --accent-hover:  #d4b97e;
  --accent-active: #b8995e;
  --accent-dim:    rgba(200, 169, 110, 0.10);
  --accent-border: rgba(200, 169, 110, 0.22);
  --accent-glow:   rgba(200, 169, 110, 0.28);

  /* Text */
  --text:          #ede8e3;
  --text-muted:    #7c7872;
  --text-subtle:   #3c3a37;

  /* Borders */
  --border:        rgba(255, 255, 255, 0.07);
  --border-bright: rgba(255, 255, 255, 0.12);

  /* Typography */
  --font-display:  'Syne', sans-serif;
  --font-body:     'DM Sans', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  /* Layout */
  --container-w:   1100px;
  --section-py:    clamp(5rem, 10vw, 9rem);

  /* Radius */
  --r-sm:  0.625rem;
  --r:     1.125rem;
  --r-lg:  1.75rem;
  --r-xl:  2.25rem;

  /* Easing */
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.72;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

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

/* ----------------------------------------------------------
   NOISE OVERLAY — fixed, pointer-events-none, GPU-safe
   ---------------------------------------------------------- */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ----------------------------------------------------------
   CONTAINER
   ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 2rem;
}

/* ----------------------------------------------------------
   TYPOGRAPHY
   ---------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.75rem, 6.5vw, 5.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.75rem);
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
}

/* ----------------------------------------------------------
   EYEBROW BADGE
   ---------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-bright);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* ----------------------------------------------------------
   BUTTONS
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.925rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition:
    transform 0.45s var(--ease-spring),
    box-shadow 0.45s var(--ease-spring),
    background 0.25s,
    color 0.25s,
    border-color 0.25s;
  will-change: transform;
  white-space: nowrap;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.96) !important;
}

/* Accent button */
.btn-accent {
  background: var(--accent);
  color: #0a0a0a;
}

.btn-accent:hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 36px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-accent:active {
  background: var(--accent-active) !important;
}

/* Button-in-button icon */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-spring);
}

.btn-accent:hover .btn-icon {
  transform: translate(2px, -2px) scale(1.15);
}

/* Ghost button */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-bright);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.26);
  color: var(--text);
  transform: translateY(-1px);
}

/* Small variant */
.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.83rem;
}

.btn-sm .btn-icon {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.72rem;
}

/* ----------------------------------------------------------
   NAVIGATION — floating glass pill
   ---------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: center;
  pointer-events: none; /* only inner pill is clickable */
}

.nav-inner {
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  max-width: 800px;
  background: rgba(14, 14, 14, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-bright);
  border-radius: 100px;
  padding: 0.6rem 0.7rem 0.6rem 1.625rem;
  transition: background 0.4s, box-shadow 0.4s;
}

.nav--scrolled .nav-inner {
  background: rgba(12, 12, 12, 0.90);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.nav-links a:not(.btn) {
  padding: 0.45rem 0.9rem;
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:not(.btn):hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.4s var(--ease-spring);
  transform-origin: center;
}

/* ----------------------------------------------------------
   MOBILE MENU OVERLAY
   ---------------------------------------------------------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.mobile-menu-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.mobile-menu-links a {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 9vw, 3.25rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
  padding: 0.375rem 1rem;
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity 0.5s var(--ease-out),
    transform 0.5s var(--ease-out),
    color 0.2s;
}

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

.mobile-menu.is-open .mobile-menu-links a:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.is-open .mobile-menu-links a:nth-child(2) { transition-delay: 0.10s; }
.mobile-menu.is-open .mobile-menu-links a:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.is-open .mobile-menu-links a:nth-child(4) { transition-delay: 0.20s; }

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

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

/* Gradient mesh background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 0% 100%, rgba(200, 169, 110, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 70% 65% at 5% 68%, rgba(200, 169, 110, 0.07) 0%, transparent 65%),
    radial-gradient(ellipse 50% 45% at 88% 22%, rgba(200, 169, 110, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 35% 55% at 55% 95%, rgba(200, 169, 110, 0.03) 0%, transparent 60%);
}

.hero-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 3rem;
  padding-top: 0;
  padding-bottom: 0;
  /* override .container max-width/padding for full-bleed hero */
  max-width: min(1560px, 96vw);
  padding-inline: max(2.5rem, 4vw);
}

.hero-content {
  flex: 1;
  min-width: 0;
  max-width: 640px;
}

.hero-content h1 {
  font-size: clamp(1.875rem, 3.5vw, 2.75rem);
  margin-bottom: 0.75rem;
  max-width: 580px;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  max-width: 460px;
  line-height: 1.72;
}

/* Hero visual — browser mockup */
.hero-visual {
  flex: 1;
  min-width: 0;
  max-width: 640px;
}

.hero-mockup-shell {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--r-xl);
  padding: 4px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.hero-mockup-core {
  background: var(--surface-2);
  border-radius: calc(var(--r-xl) - 4px);
  overflow: hidden;
  border: 1px solid var(--border);
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.mockup-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--border-bright);
  flex-shrink: 0;
}

.mockup-url {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-left: 0.25rem;
}

.mockup-img {
  width: 100%;
  max-height: 52vh;
  height: auto;
  object-fit: contain;
  display: block;
}

.hero-content .eyebrow {
  margin-bottom: 0.75rem;
}

.hero-scarcity {
  font-size: 0.85rem;
  color: #c8a96e;
  font-style: italic;
  margin-bottom: 0.25rem;
  margin-top: 0;
}

.hero-mockup-link {
  display: block;
  font-size: 0.85rem;
  color: #888888;
  font-style: normal;
  margin-top: 4px;
  margin-bottom: 1rem;
  text-decoration: none;
  transition: color 0.2s;
}

.hero-mockup-link:hover {
  color: var(--text);
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-subtle);
  z-index: 1;
}

/* Hero load animations — staggered fade-up */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUpIn 0.85s var(--ease-out) forwards;
}

.fade-up.delay-1 { animation-delay: 0.12s; }
.fade-up.delay-2 { animation-delay: 0.26s; }
.fade-up.delay-3 { animation-delay: 0.42s; }
.fade-up.delay-4 { animation-delay: 0.68s; }

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

/* ----------------------------------------------------------
   SCROLL REVEAL — driven by IntersectionObserver in JS
   ---------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
}

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

/* Stagger helpers for sibling reveals */
.delay-reveal    { transition-delay: 0.12s; }
.delay-reveal-1  { transition-delay: 0.08s; }
.delay-reveal-2  { transition-delay: 0.16s; }
.delay-reveal-3  { transition-delay: 0.24s; }
.delay-reveal-4  { transition-delay: 0.32s; }

/* ----------------------------------------------------------
   SECTION BASE
   ---------------------------------------------------------- */
.section {
  padding-block: var(--section-py);
}

.section-header {
  margin-bottom: 3.75rem;
}

.section-header .eyebrow {
  margin-bottom: 0.875rem;
}

.section-header h2 {
  max-width: 520px;
}

/* ----------------------------------------------------------
   DOUBLE-BEZEL CARD — reusable shell/core pattern
   ---------------------------------------------------------- */
.dbl-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 4px;
}

.dbl-core {
  background: linear-gradient(145deg, var(--surface-2) 0%, var(--surface) 100%);
  border-radius: calc(var(--r-xl) - 4px);
  padding: 3.5rem 4rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
}

/* ----------------------------------------------------------
   PROBLEM SECTION
   ---------------------------------------------------------- */
#problema {
  padding-block: 80px;
}

.problem-heading {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: #f0ede6;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 2rem;
}

#problema .dbl-shell {
  max-width: 900px;
  background: #111111;
  border: none;
  border-left: 3px solid #c8a96e;
  border-radius: 0;
  padding: 0;
}

#problema .dbl-core {
  background: #111111;
  border: none;
  border-radius: 0;
  padding: 2.5rem 3rem;
  box-shadow: none;
}

.problem-text {
  font-size: 1.4rem;
  line-height: 1.7;
  color: var(--text);
  font-weight: 400;
  max-width: 100%;
  margin-top: 0.5rem;
}

/* ----------------------------------------------------------
   PROJECTS GRID
   ---------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  align-items: start;
}

/* Project card — double-bezel */
.project-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 4px;
  transition:
    transform 0.45s var(--ease-spring),
    box-shadow 0.45s var(--ease-spring);
}

.project-shell:hover {
  transform: translateY(-5px) rotate(0.25deg);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 0 1px var(--border-bright);
}

.project-core {
  background: var(--surface-2);
  border-radius: calc(var(--r-xl) - 4px);
  padding: 2.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  width: fit-content;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.72;
  flex: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-top: 0.25rem;
  transition: gap 0.35s var(--ease-spring), opacity 0.2s;
}

.project-link:hover {
  opacity: 0.72;
  gap: 0.5rem;
}

.project-private {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  width: fit-content;
  margin-top: 0.25rem;
}

/* Project image — sits above the core text block */
.project-image {
  width: 100%;
  overflow: hidden;
  border-radius: calc(var(--r-xl) - 4px) calc(var(--r-xl) - 4px) 0 0;
  background: var(--bg);
  line-height: 0;
}

.project-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-spring);
}

.project-shell:hover .project-image img {
  transform: scale(1.04);
}

/* Adjust core when image is present — remove top inner radius */
.project-image + .project-core {
  border-radius: 0 0 calc(var(--r-xl) - 4px) calc(var(--r-xl) - 4px);
}

/* ----------------------------------------------------------
   TESTIMONIAL
   ---------------------------------------------------------- */
.testimonial-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 4px;
}

.testimonial-core {
  background: linear-gradient(135deg, rgba(200, 169, 110, 0.05) 0%, var(--surface-2) 55%);
  border-radius: calc(var(--r-xl) - 4px);
  padding: 2.75rem 3rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(200, 169, 110, 0.10);
}

.testimonial-mark {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.22;
  line-height: 1;
  display: block;
  margin-bottom: -1.25rem;
}

.testimonial-text {
  font-size: 1.15rem;
  color: var(--text);
  font-style: normal;
  line-height: 1.65;
  font-weight: 400;
  margin-bottom: 1.75rem;
  max-width: 720px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), rgba(200, 169, 110, 0.35));
  flex-shrink: 0;
}

.testimonial-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.testimonial-location {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ----------------------------------------------------------
   OFFER SECTION
   ---------------------------------------------------------- */
.offer-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 5rem;
  align-items: start;
}

.offer-header h2 {
  margin-bottom: 0.875rem;
}

.offer-subline {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 300px;
  line-height: 1.65;
}

.offer-list {
  display: flex;
  flex-direction: column;
}

.offer-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.offer-item:last-child {
  border-bottom: none;
}

.offer-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  font-size: 0.68rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.12rem;
}

.offer-text {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
}

.offer-item--bonus {
  border-left: 2px solid #c8a96e;
  background: #111111;
  padding-left: 1rem;
  margin-top: 0.5rem;
  border-bottom: none;
}

.offer-item--bonus .offer-check {
  background: transparent;
  border: none;
  font-size: 1rem;
}

/* ----------------------------------------------------------
   PROCESS — 3 steps
   ---------------------------------------------------------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

/* Decorative connector line between step numbers */
.steps-grid::before {
  content: '';
  position: absolute;
  top: 1.05rem; /* vertically center on the step-num pill */
  left: calc(16.67% + 2rem);
  right: calc(16.67% + 2rem);
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border-bright) 20%,
    var(--border-bright) 80%,
    transparent
  );
  z-index: 0;
  pointer-events: none;
}

.step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  width: fit-content;
}

.step h3 {
  font-size: 1.15rem;
  margin-top: 0.25rem;
}

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

/* ----------------------------------------------------------
   RISK REVERSAL
   ---------------------------------------------------------- */
.risk-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.risk-inner {
  text-align: center;
}

.risk-text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ----------------------------------------------------------
   FINAL CTA
   ---------------------------------------------------------- */
.final-cta {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.cta-inner {
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
}

.cta-inner .eyebrow {
  margin-bottom: 1.25rem;
}

.cta-inner h2 {
  margin-bottom: 2.5rem;
}

.cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-mockup-link {
  display: block;
  font-size: 0.9rem;
  color: #c8a96e;
  text-decoration: none;
  margin-top: 16px;
  transition: text-decoration 0.2s, opacity 0.2s;
}

.cta-mockup-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* ----------------------------------------------------------
   FOOTER
   ---------------------------------------------------------- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: 1.75rem;
}

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

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.03em;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  text-transform: uppercase;
}

/* ----------------------------------------------------------
   WORKS GRID
   ---------------------------------------------------------- */
.works-sub {
  margin-bottom: 3.5rem;
}

.works-sub-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.works-sub-desc {
  font-size: 0.88rem;
  color: var(--text-subtle);
  margin-top: -0.75rem;
  margin-bottom: 1.25rem;
}

.works-grid {
  display: grid;
  gap: 1.25rem;
}

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

.works-grid--concepts {
  grid-template-columns: repeat(4, 1fr);
}

.work-card {
  position: relative;
}

.work-card .slide-inner img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: opacity 0.2s;
}

.work-card a.slide-inner:hover img {
  opacity: 0.85;
}

@media (max-width: 900px) {
  .works-grid--live     { grid-template-columns: repeat(2, 1fr); }
  .works-grid--concepts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .works-grid--live,
  .works-grid--concepts {
    display: block;
    overflow: hidden;
    position: relative;
  }

  /* Fade edges */
  .works-grid--live::before,
  .works-grid--live::after,
  .works-grid--concepts::before,
  .works-grid--concepts::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 48px;
    z-index: 2;
    pointer-events: none;
  }

  .works-grid--live::before,
  .works-grid--concepts::before {
    left: 0;
    background: linear-gradient(to right, var(--bg), transparent);
  }

  .works-grid--live::after,
  .works-grid--concepts::after {
    right: 0;
    background: linear-gradient(to left, var(--bg), transparent);
  }

  .works-marquee-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    will-change: transform;
    padding-block: 0.5rem;
  }

  .works-marquee-track .work-card {
    flex: 0 0 78vw;
    transition: transform 0.15s ease;
  }

  .works-marquee-track .work-card:active {
    transform: scale(0.97);
  }

  /* Dot indicators */
  .works-marquee-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 0.875rem;
  }

  .works-marquee-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-bright);
    transition: background 0.3s, transform 0.3s;
  }

  .works-marquee-dots span.active {
    background: var(--accent);
    transform: scale(1.3);
  }
}

/* ----------------------------------------------------------
   SLIDER — auto-scroll marquee
   ---------------------------------------------------------- */
.slider-wrap {
  width: 100%;
  overflow: hidden;
  margin-top: 3rem;
}

.slider-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  cursor: grab;
  user-select: none;
}


.slide {
  flex: 0 0 auto;
  width: clamp(280px, 38vw, 560px);
}

.slide-inner {
  position: relative;
  display: block;
  text-decoration: none;
}

.slide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: var(--r-xl);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: opacity 0.2s;
}

a.slide-inner:hover img {
  opacity: 0.85;
}

.slide-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
}

.badge-live {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #4ade80;
}

.badge-concept {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #c4c4c4;
}

.badge-dot {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

a.slide-inner::after {
  content: 'Visita il sito →';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: grid;
  place-items: center;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

a.slide-inner:hover::after {
  opacity: 1;
}

/* ----------------------------------------------------------
   RESPONSIVE — TABLET (≤ 900px)
   ---------------------------------------------------------- */
@media (max-width: 900px) {
  /* Hero: stack vertically, hide mockup */
  .hero-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 2.5rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-visual {
    width: 100%;
    max-width: 100%;
  }

  .offer-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .offer-subline {
    max-width: 100%;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .steps-grid::before {
    display: none;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------
   RESPONSIVE — MOBILE (≤ 680px)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  /* Hide nav while hero is in view */
  .nav {
    transition: opacity 0.4s, transform 0.4s;
  }

  .nav.nav--hero-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
  }

  /* Hero — centering fix + full-width CTA */
  .hero {
    height: 100svh;
  }

  .hero-container {
    padding-top: 0;
    padding-bottom: 0;
  }

  .hero .btn-accent {
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }
}

@media (max-width: 680px) {
  html {
    font-size: 16px;
  }

  :root {
    --section-py: 4.5rem;
  }

  .container {
    padding-inline: 1.25rem;
  }

  /* Slider — immagini più grandi su mobile */
  .slide {
    width: 88vw;
  }

  /* Nav: hide links, show hamburger */
  .nav {
    padding: 1rem 1.25rem;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-inner {
    padding: 0.5rem 0.6rem 0.5rem 1.25rem;
  }

  /* Hero: hide mockup on small screens */
  .hero-visual {
    display: none;
  }

  .hero-content h1 {
    max-width: 100%;
  }

  .hero-sub {
    max-width: 100%;
  }

  /* Problem card narrower padding */
  #problema .dbl-core {
    padding: 1.75rem 1.5rem;
  }

  .problem-text {
    font-size: 1.15rem;
  }

  .problem-heading {
    font-size: 2.25rem;
  }

  /* Project images smaller on mobile */
  .project-image img {
    height: 180px;
  }

  /* Testimonial */
  .testimonial-core {
    padding: 1.875rem 1.625rem;
  }

  .testimonial-text {
    font-size: 1rem;
  }

  /* CTA */
  .cta-inner h2 {
    font-size: clamp(1.875rem, 8vw, 2.5rem);
  }

  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-buttons .btn {
    justify-content: center;
  }

  /* Risk */
  .risk-text {
    font-size: 1.35rem;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* ----------------------------------------------------------
   REDUCED MOTION
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .fade-up {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border: 1.5px solid #C9A84C;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #C9A84C;
  flex-shrink: 0;
  line-height: 1;
}

.logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.03em;
}

/* ── Before/After Slider — Milano Nights ── */
.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.ba-after,
.ba-before {
  position: absolute;
  inset: 0;
}

.ba-after img,
.ba-before img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.ba-before {
  clip-path: inset(0 50% 0 0);
}

.ba-label {
  position: absolute;
  bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 3;
}

.ba-label--prima { left: 12px; }
.ba-label--dopo  { right: 12px; }

.ba-divider {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: #fff;
  pointer-events: none;
  z-index: 2;
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}