/* ============================================
   ARTURO SALOTTI CASE STUDY · prefix: as-
   palette cuoio raffinata su dark soul
   slider prima/dopo VERTICALE + emoji volanti
   ============================================ */

:root {
  --as-bg: #0a0a0a;
  --as-text: #E8DCC4;
  --as-text-muted: #c4b59a;
  --as-text-soft: rgba(232, 220, 196, 0.65);
  --as-cuoio: #8B6F47;
  --as-cuoio-dark: #5C4528;
  --as-cuoio-light: #B8956A;
  --as-tortora: #C4A57B;
  --as-avorio: #E8DCC4;
  --as-glow-warm: rgba(139, 111, 71, 0.55);
  --as-glow-soft: rgba(196, 165, 123, 0.25);
  --as-glow-hot: rgba(139, 111, 71, 0.5);
  --as-bg-soft: rgba(139, 111, 71, 0.12);
  --as-bg-cuoio: rgba(139, 111, 71, 0.08);
  --as-border: rgba(196, 165, 123, 0.4);
  --as-divider: rgba(196, 165, 123, 0.22);
}

.as-main {
  background: var(--as-bg);
  color: var(--as-text);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
}
.as-main * { box-sizing: border-box; }

/* SECTIONS */
.as-section {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}
.as-section + .as-section {
  border-top: 1px solid var(--as-divider);
}

/* GLOW */
.as-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 75%;
  height: 65%;
  background: radial-gradient(ellipse, var(--as-glow-warm) 0%, var(--as-glow-soft) 35%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
  z-index: 0;
}
.as-glow--center { width: 85%; height: 80%; }
.as-glow--hot {
  background: radial-gradient(ellipse, rgba(139, 111, 71, 0.55) 0%, var(--as-glow-soft) 40%, transparent 70%);
}

/* EMOJI VOLANTI */
.as-fly {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  opacity: 0.32;
  will-change: transform;
}
.as-fly--a { animation: as-fly-a 12s ease-in-out infinite; }
.as-fly--b { animation: as-fly-b 14s ease-in-out infinite; }
.as-fly--c { animation: as-fly-c 10s ease-in-out infinite; }
.as-fly--d { animation: as-fly-d 16s ease-in-out infinite; }

@keyframes as-fly-a {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(20px, -30px) rotate(15deg); }
  50% { transform: translate(-10px, -50px) rotate(-10deg); }
  75% { transform: translate(-25px, -20px) rotate(8deg); }
}
@keyframes as-fly-b {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-30px, -20px) rotate(-15deg); }
  66% { transform: translate(15px, -40px) rotate(20deg); }
}
@keyframes as-fly-c {
  0%, 100% { transform: translate(0, 0) rotate(-5deg); }
  50% { transform: translate(25px, 25px) rotate(15deg); }
}
@keyframes as-fly-d {
  0%, 100% { transform: translate(0, 0) rotate(8deg); }
  20% { transform: translate(-15px, 20px) rotate(-10deg); }
  40% { transform: translate(20px, 10px) rotate(15deg); }
  60% { transform: translate(-10px, -25px) rotate(-8deg); }
  80% { transform: translate(15px, -15px) rotate(12deg); }
}

/* CONTENT */
.as-content { position: relative; z-index: 2; }

/* KICKER */
.as-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--as-tortora);
  margin-bottom: 20px;
}
.as-kicker::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--as-cuoio);
  box-shadow: 0 0 14px var(--as-cuoio);
}

/* TITLE */
.as-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--as-text);
  margin: 0 0 20px;
}
.as-title__cuoio {
  background: linear-gradient(135deg, var(--as-cuoio-dark), var(--as-cuoio), var(--as-tortora), var(--as-avorio));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.as-title__emoji {
  display: inline-block;
  font-size: 0.85em;
  transform: rotate(-12deg);
  margin-left: 6px;
  -webkit-text-fill-color: initial;
  background: none;
  -webkit-background-clip: initial;
  color: initial;
}

/* COPY */
.as-copy {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--as-text-muted);
  max-width: 640px;
  margin: 0;
}
.as-copy--lead {
  font-size: 19px;
  margin-bottom: 32px;
}

/* SECTION HEAD */
.as-section-head {
  text-align: center;
  margin-bottom: 50px;
}
.as-section-head .as-copy {
  margin: 20px auto 0;
}

/* HERO con foto verticale a destra */
.as-hero {
  padding: 140px 0 100px;
}
.as-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.as-hero-text .as-title { margin: 0 0 20px; }
.as-hero-text .as-copy { margin-bottom: 28px; }
.as-hero-photo {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid var(--as-border);
  box-shadow:
    0 0 0 1px rgba(196, 165, 123, 0.15),
    0 0 100px var(--as-glow-warm),
    0 30px 60px rgba(0, 0, 0, 0.6);
  max-width: 480px;
  margin: 0 auto;
}
.as-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* HERO KPI ROW */
.as-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  max-width: 540px;
}
.as-kpi {
  padding: 16px 10px;
  border: 1px solid var(--as-border);
  border-radius: 12px;
  background: var(--as-bg-cuoio);
  text-align: center;
}
.as-kpi__num {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--as-cuoio-dark), var(--as-tortora));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.as-kpi__label {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--as-text-muted);
  margin-top: 6px;
}

/* PILLS */
.as-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.as-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--as-bg-soft);
  border: 1px solid var(--as-border);
  font-size: 12px;
  font-weight: 700;
  color: var(--as-tortora);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

/* MEDIA + HOVER GLOW */
.as-media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
  background: linear-gradient(160deg, #2a1f14, #1a1208);
}
.as-media::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow 0.4s ease;
  pointer-events: none;
  z-index: -1;
}
.as-media:hover {
  transform: translateY(-6px) scale(1.03);
}
.as-media:hover::after {
  box-shadow:
    0 0 60px 8px var(--as-glow-warm),
    0 0 140px 24px var(--as-glow-soft);
}
.as-media img,
.as-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* CHI È — sezione testuale */
.as-chi-e {
  padding: 80px 0;
}
.as-chi-e .as-section-head { margin-bottom: 0; }

/* ============================================
   SLIDER PRIMA/DOPO VERTICALE - signature
   ============================================ */
.as-ba-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
}

.as-beforeafter {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 14px;
  overflow: hidden;
  cursor: ns-resize;
  user-select: none;
  border: 2px solid var(--as-border);
  box-shadow:
    0 0 0 1px rgba(196, 165, 123, 0.1),
    0 0 80px var(--as-glow-warm),
    0 30px 60px rgba(0, 0, 0, 0.6);
}
.as-ba-after,
.as-ba-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.as-ba-after {
  z-index: 1;
}
.as-ba-before {
  z-index: 2;
  clip-path: inset(0 0 50% 0);
}
.as-ba-divider {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--as-tortora);
  transform: translateY(-50%);
  box-shadow: 0 0 12px var(--as-tortora);
  pointer-events: none;
  z-index: 4;
}
.as-ba-divider::after {
  content: '⇅';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--as-tortora);
  color: var(--as-cuoio-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 24px rgba(196, 165, 123, 0.7);
}
.as-ba-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
  z-index: 5;
}
.as-ba-label--before {
  top: 14px;
  background: rgba(139, 111, 71, 0.85);
  color: #fff;
}
.as-ba-label--after {
  bottom: 14px;
  background: rgba(196, 165, 123, 0.85);
  color: var(--as-cuoio-dark);
}
.as-ba-hint {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(196, 165, 123, 0.6);
  margin: 20px 0 0;
  text-transform: uppercase;
}

/* MODELLI GRID 3x2 (6 foto) */
.as-modelli-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 960px;
  margin: 0 auto;
}
.as-modello-card { aspect-ratio: 3/4; }

/* REEL GRID 3 colonne */
.as-reel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
}
.as-reel-card { aspect-ratio: 9/16; }

/* BROCHURE GRID 4 colonne */
.as-brochure-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
}
.as-brochure-card { aspect-ratio: 4/5; }

/* CTA */
.as-cta {
  text-align: center;
  padding: 120px 0;
}
.as-cta .as-title { max-width: 720px; margin: 0 auto 32px; }
.as-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 36px;
  background: linear-gradient(135deg, var(--as-cuoio-dark), var(--as-cuoio));
  color: #ffffff !important;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.01em;
  box-shadow:
    0 0 60px var(--as-glow-warm),
    0 0 0 1px rgba(196, 165, 123, 0.3);
  transition: all 0.3s ease;
}
.as-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 0 80px var(--as-glow-warm),
    0 0 0 1px var(--as-tortora);
}
.as-btn__arrow { transition: transform 0.3s ease; }
.as-btn:hover .as-btn__arrow { transform: translateX(4px); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .as-section { padding: 70px 0; }
  .as-hero { padding: 100px 0 70px; }
  .as-cta { padding: 90px 0; }

  .as-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .as-hero-photo {
    max-width: 360px;
    order: -1;
  }

  .as-kpi-row { gap: 6px; }
  .as-kpi { padding: 12px 4px; }
  .as-kpi__num { font-size: 22px; }
  .as-kpi__label { font-size: 9px; }
  .as-brochure-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .as-fly { opacity: 0.22; font-size: 18px !important; }
}

@media (max-width: 540px) {
  .as-section { padding: 60px 0; }
  .as-hero { padding: 80px 0 60px; }
  .as-cta { padding: 70px 0; }

  .as-title { font-size: 32px; }
  .as-copy { font-size: 15px; }
  .as-copy--lead { font-size: 16px; }

  .as-kpi-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .as-kpi { padding: 14px 8px; }
  .as-brochure-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .as-pills { justify-content: flex-start; }
  .as-section-head { margin-bottom: 32px; }
  .as-btn { padding: 16px 28px; font-size: 14px; }

  .as-hero-photo { max-width: 280px; }
}


/* AS MOBILE LAYOUT — prima/dopo + reel carosello, modelli a coppie (<=768px) */
@media (max-width: 768px){

  /* 1 — PRIMA/DOPO: carosello orizzontale, slider interni invariati */
  .as-ba-grid{
    display:flex; grid-template-columns:none;
    overflow-x:auto; gap:14px;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    padding:4px 16px 14px; margin:0 -16px;
    max-width:none;
  }
  .as-ba-grid::-webkit-scrollbar{ height:4px; }
  .as-ba-grid::-webkit-scrollbar-thumb{ background:rgba(139,111,71,.55); border-radius:4px; }
  .as-beforeafter{ flex:0 0 74vw; max-width:300px; scroll-snap-align:center; }

  /* 2 — FOTO MODELLI: griglia 2 colonne (coppie) */
  .as-modelli-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:10px;
    max-width:none;
  }

  /* 3 — REEL: carosello orizzontale (pattern case study) */
  .as-reel-grid{
    display:flex; grid-template-columns:none;
    overflow-x:auto; gap:12px;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    padding:4px 16px 14px; margin:0 -16px;
    max-width:none;
  }
  .as-reel-grid::-webkit-scrollbar{ height:4px; }
  .as-reel-grid::-webkit-scrollbar-thumb{ background:rgba(139,111,71,.55); border-radius:4px; }
  .as-reel-card{ flex:0 0 60vw; max-width:225px; scroll-snap-align:start; }
}
/* ============================================================ */

/* AS BA TOUCH FIX — il gesto sullo slider muove la tendina, non scrolla la pagina */
.as-beforeafter{ touch-action:none; }
.as-beforeafter .as-ba-divider{ touch-action:none; }
/* ============================================================ */