/* ============================================
   FERPOINT CASE STUDY · prefix: fp-
   palette rosso acceso industriale su dark soul
   emoji ferramenta volanti + scintille (signature)
   ============================================ */

:root {
  --fp-bg: #0a0a0a;
  --fp-text: #f5f5f5;
  --fp-text-muted: #c4c4c4;
  --fp-text-soft: rgba(245, 245, 245, 0.65);
  --fp-red: #E30613;
  --fp-red-dark: #A30B0F;
  --fp-red-light: #FF3B47;
  --fp-steel: #D4D4D4;
  --fp-glow-warm: rgba(227, 6, 19, 0.55);
  --fp-glow-soft: rgba(255, 59, 71, 0.25);
  --fp-glow-hot: rgba(227, 6, 19, 0.5);
  --fp-bg-soft: rgba(227, 6, 19, 0.12);
  --fp-bg-red: rgba(227, 6, 19, 0.1);
  --fp-border: rgba(227, 6, 19, 0.4);
  --fp-divider: rgba(227, 6, 19, 0.25);
}

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

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

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

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

@keyframes fp-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 fp-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 fp-fly-c {
  0%, 100% { transform: translate(0, 0) rotate(-5deg); }
  50% { transform: translate(25px, 25px) rotate(15deg); }
}
@keyframes fp-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); }
}

/* SCINTILLE - signature di Ferpoint */
.fp-spark {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  font-size: 16px;
  color: #FF3B47;
  text-shadow: 0 0 8px #E30613, 0 0 16px #E30613;
  will-change: transform, opacity;
}
.fp-spark--1 { animation: fp-spark-fly 2.5s ease-out infinite; left: 12%; top: 55%; }
.fp-spark--2 { animation: fp-spark-fly 3s ease-out infinite 0.6s; left: 70%; top: 30%; }
.fp-spark--3 { animation: fp-spark-fly 2.8s ease-out infinite 1.2s; left: 40%; top: 70%; }
.fp-spark--4 { animation: fp-spark-fly 3.2s ease-out infinite 0.3s; left: 85%; top: 65%; }

@keyframes fp-spark-fly {
  0% { transform: translate(0, 0) scale(0); opacity: 0; }
  20% { opacity: 1; transform: translate(15px, -10px) scale(1.2); }
  60% { opacity: 0.8; transform: translate(40px, -25px) scale(0.8); }
  100% { transform: translate(70px, -50px) scale(0); opacity: 0; }
}

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

/* KICKER */
.fp-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(--fp-red-light);
  margin-bottom: 20px;
}
.fp-kicker::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fp-red);
  box-shadow: 0 0 14px var(--fp-red);
}

/* TITLE */
.fp-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--fp-text);
  margin: 0 0 20px;
}
.fp-title__red {
  background: linear-gradient(135deg, var(--fp-red-dark), var(--fp-red), var(--fp-red-light), var(--fp-text));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.fp-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 */
.fp-copy {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--fp-text-muted);
  max-width: 640px;
  margin: 0;
}
.fp-copy--lead {
  font-size: 19px;
  margin-bottom: 32px;
}

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

/* HERO */
.fp-hero {
  text-align: center;
  padding: 140px 0 100px;
}
.fp-hero .fp-title { max-width: 900px; margin: 0 auto 24px; }
.fp-hero .fp-copy { margin: 0 auto 32px; }
.fp-hero .fp-pills { justify-content: center; display: flex; }

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

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

/* MEDIA + HOVER GLOW */
.fp-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, #2a0808, #1a0404);
}
.fp-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;
}
.fp-media:hover {
  transform: translateY(-6px) scale(1.03);
}
.fp-media:hover::after {
  box-shadow:
    0 0 60px 8px var(--fp-glow-warm),
    0 0 140px 24px var(--fp-glow-soft);
}
.fp-media img,
.fp-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* AZIENDA PHOTO (chi-è) */
.fp-azienda-photo {
  max-width: 880px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--fp-border);
  box-shadow:
    0 0 0 1px rgba(227, 6, 19, 0.15),
    0 0 100px var(--fp-glow-warm),
    0 30px 60px rgba(0, 0, 0, 0.6);
}
.fp-azienda-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fp-caption {
  text-align: center;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fp-text-soft);
  margin: 16px 0 0;
}

/* FOTO GRID 4x2 (8 foto) */
.fp-foto-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.fp-foto-card { aspect-ratio: 1/1; }

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

/* GRAFICHE GRID 4 colonne (7 grafiche: 4 in prima riga, 3 in seconda) */
.fp-grafiche-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 920px;
  margin: 0 auto;
}
.fp-grafica-card { aspect-ratio: 1/1; }

/* Mockup sito */
.fp-sito-mockup {
  max-width: 880px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--fp-border);
  background: linear-gradient(160deg, #2a0808, #1a0404);
  box-shadow:
    0 0 0 1px rgba(227, 6, 19, 0.15),
    0 0 100px var(--fp-glow-warm),
    0 30px 60px rgba(0, 0, 0, 0.6);
}
.fp-sito-mockup img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

/* CTA */
.fp-cta {
  text-align: center;
  padding: 120px 0;
}
.fp-cta .fp-title { max-width: 720px; margin: 0 auto 32px; }
.fp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 36px;
  background: linear-gradient(135deg, var(--fp-red-dark), var(--fp-red));
  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(--fp-glow-warm),
    0 0 0 1px rgba(255, 59, 71, 0.3);
  transition: all 0.3s ease;
}
.fp-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 0 80px var(--fp-glow-warm),
    0 0 0 1px var(--fp-red-light);
}
.fp-btn__arrow { transition: transform 0.3s ease; }
.fp-btn:hover .fp-btn__arrow { transform: translateX(4px); }

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

  .fp-kpi-row { gap: 6px; }
  .fp-kpi { padding: 12px 4px; }
  .fp-kpi__num { font-size: 22px; }
  .fp-kpi__label { font-size: 9px; }

  .fp-foto-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .fp-grafiche-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }

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

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

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

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

  .fp-foto-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .fp-grafiche-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

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


/* FP MOBILE REEL CAROUSEL — reel scroll orizzontale col dito (<=768px) */
@media (max-width: 768px){
  .fp-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;
  }
  .fp-reel-grid::-webkit-scrollbar{ height:4px; }
  .fp-reel-grid::-webkit-scrollbar-thumb{ background:rgba(227,6,19,.6); border-radius:4px; }
  .fp-reel-card{ flex:0 0 60vw; max-width:230px; scroll-snap-align:start; }
}
/* ============================================================ */