/* ============================================================
   FLAIERUP — Landing page
   Tema: marketing 5.0, fiaba/magia · verde lime brand
   ============================================================ */

:root {
  /* Brand */
  --green: #92c01f;
  --green-dark: #6f9417;
  --green-soft: #c5dd87;
  --green-tint: #eef6dc;
  --ink: #14180c;
  --ink-soft: #2a2f1f;
  --white: #ffffff;
  --paper: #fbfdf6;
  --muted: #5b6150;

  /* Type */
  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 18px 50px -20px rgba(20, 24, 12, .35);
  --shadow-soft: 0 10px 30px -16px rgba(20, 24, 12, .25);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 800; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography helpers ---------- */
.section { padding: clamp(64px, 9vw, 130px) 0; }
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.2vw, 4rem);
  line-height: .98;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin: 0 0 .5em;
}
.accent { color: var(--green); }
.section-dark .accent { color: var(--green); }
.eyebrow, .section-kicker {
  display: inline-block;
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 16px;
}
.section-dark .section-kicker { color: var(--green-soft); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 60ch; margin: 0; }
.lead.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head { text-align: center; max-width: 820px; margin: 0 auto clamp(40px, 6vw, 70px); }
.section-tint { background: var(--green-tint); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 800; font-size: .98rem;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--green); color: var(--ink); box-shadow: 0 10px 24px -10px rgba(146, 192, 31, .8); }
.btn-primary:hover { background: var(--green-dark); color: var(--white); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-soft); }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(20,24,12,.25); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { padding: 18px 38px; font-size: 1.1rem; }

/* ---------- Logo ---------- */
.logo {
  font-family: var(--font-display); font-size: 1.7rem; letter-spacing: 1px;
  text-transform: uppercase; color: var(--ink); line-height: 1;
}
.logo-ai { position: relative; }
.logo-ai::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px;
  height: 3px; background: var(--green); border-radius: 2px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(251, 253, 246, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s, background .3s;
}
.site-header.scrolled { box-shadow: var(--shadow-soft); border-color: rgba(20,24,12,.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }
.main-nav { display: flex; gap: 28px; margin-left: auto; }
.main-nav a { font-weight: 700; font-size: .96rem; color: var(--ink-soft); position: relative; padding: 4px 0; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--green); transition: width .25s var(--ease);
}
.main-nav a:hover::after { width: 100%; }
.header-cta { padding: 10px 22px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--ink); border-radius: 2px; transition: .3s; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; background: var(--green); color: var(--ink);
  padding: clamp(120px, 16vw, 180px) 0 clamp(80px, 10vw, 130px);
  overflow: hidden;
}
.hero-sparkles { position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 22%, rgba(255,255,255,.9) 50%, transparent 51%),
    radial-gradient(2px 2px at 82% 16%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(3px 3px at 68% 64%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(2px 2px at 24% 78%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(2px 2px at 92% 52%, rgba(255,255,255,.7) 50%, transparent 51%);
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: .9; } }
.hero .container { position: relative; }
.hero-copy-center { text-align: center; max-width: 820px; margin: 0 auto clamp(36px, 5vw, 54px); }
.hero-copy-center .hero-sub { margin-left: auto; margin-right: auto; }
.hero-copy-center .hero-actions { justify-content: center; margin-bottom: 0; }
.hero-videos { max-width: 1000px; margin: 0 auto; }
.hero-videos-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 3vw, 28px); margin-top: clamp(18px, 3vw, 28px); }
.hero-badge-wrap { display: flex; justify-content: center; margin-top: clamp(34px, 5vw, 48px); }
.hero-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.8rem, 8vw, 6rem); line-height: .92; text-transform: uppercase;
  margin: 6px 0 22px; letter-spacing: 1px;
}
.hero-title .accent { color: var(--white); }
.hero-sub { font-size: clamp(1.05rem, 1.7vw, 1.3rem); max-width: 50ch; color: var(--ink-soft); margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }
.hero-badge { display: inline-flex; align-items: center; gap: 16px; background: var(--ink); color: var(--white); padding: 14px 24px; border-radius: var(--radius-sm); max-width: 460px; }
.badge-num { font-family: var(--font-display); font-size: 2.8rem; line-height: 1; color: var(--green); }
.badge-text { font-size: .92rem; line-height: 1.4; }
.badge-text strong { color: var(--green); }

.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 60px;
  background: var(--paper);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
}

/* ============================================================
   VIDEO FRAME (riutilizzabile)
   ============================================================ */
.video-frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--ink); box-shadow: var(--shadow);
  cursor: pointer; isolation: isolate;
}
.video-frame .video-poster { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .3s; }
.video-frame:hover .video-poster { transform: scale(1.04); filter: brightness(.9); }
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
.play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--green); color: var(--ink); display: grid; place-items: center;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,.5); transition: transform .25s var(--ease), background .25s;
  z-index: 2;
}
.play-btn::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--green); opacity: .6; animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.5); opacity: 0; } }
.play-btn svg { width: 38px; height: 38px; fill: currentColor; margin-left: 4px; }
.video-frame:hover .play-btn { transform: translate(-50%, -50%) scale(1.08); background: var(--white); }
.video-tag {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  background: rgba(20,24,12,.78); color: var(--green-soft); font-weight: 700; font-size: .78rem;
  letter-spacing: .04em; padding: 7px 14px; border-radius: 999px;
}
.video-frame.playing .video-poster, .video-frame.playing .play-btn, .video-frame.playing .video-tag { display: none; }

/* ============================================================
   PROBLEMA
   ============================================================ */
.problem-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.service-list { background: var(--ink); color: var(--white); border-radius: var(--radius); padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow); }
.service-title { font-family: var(--font-display); text-transform: uppercase; color: var(--green); font-size: 1.3rem; margin: 0 0 22px; letter-spacing: .5px; }
.numbered li { display: flex; gap: 18px; align-items: center; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.12); font-weight: 600; }
.numbered li:first-child { border-top: 0; }
.numbered .num { font-family: var(--font-display); color: var(--green); font-size: 1.6rem; min-width: 44px; }

/* ============================================================
   METODO
   ============================================================ */
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.method-card { background: var(--white); border-radius: var(--radius); padding: 40px 34px; text-align: center; box-shadow: var(--shadow-soft); border: 1px solid rgba(20,24,12,.05); transition: transform .35s var(--ease), box-shadow .35s; }
.method-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.method-icon { width: 92px; height: 92px; margin: 0 auto 22px; background: var(--green-tint); border-radius: 50%; display: grid; place-items: center; }
.method-icon img { width: 52px; height: 52px; }
.method-card h3 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.7rem; margin: 0 0 4px; letter-spacing: .5px; }
.method-lead { color: var(--green-dark); font-weight: 800; margin: 0 0 14px; }
.method-card p { color: var(--muted); margin: 0; }

/* ============================================================
   VANTAGGI
   ============================================================ */
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: start; }
.benefit-card { background: var(--white); border: 1px solid rgba(20,24,12,.07); border-radius: var(--radius); padding: 38px 32px; box-shadow: var(--shadow-soft); transition: transform .35s var(--ease), box-shadow .35s; }
.benefit-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.benefit-icon { width: 78px; height: 78px; margin-bottom: 22px; background: var(--green-tint); border-radius: 18px; display: grid; place-items: center; }
.benefit-icon img { width: 46px; height: 46px; }
.benefit-card h3 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.45rem; margin: 0 0 18px; letter-spacing: .4px; }
.check-list li { position: relative; padding: 9px 0 9px 30px; border-top: 1px solid rgba(20,24,12,.08); font-weight: 600; }
.check-list li:first-child { border-top: 0; }
.check-list li::before { content: "✦"; position: absolute; left: 0; top: 9px; color: var(--green); font-size: .95rem; }

/* ============================================================
   PER IL CLIENTE (dark)
   ============================================================ */
.section-dark { background: var(--ink); color: var(--white); }
.section-dark .section-title { color: var(--white); }
.section-dark .lead { color: rgba(255,255,255,.72); }
.customer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.customer-card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm); padding: 28px 24px; transition: transform .35s var(--ease), background .35s, border-color .35s; }
.customer-card:hover { transform: translateY(-5px); background: rgba(146,192,31,.12); border-color: var(--green); }
.cc-num { font-family: var(--font-display); font-size: 2.4rem; color: var(--green); line-height: 1; }
.customer-card h3 { font-size: 1.1rem; margin: 12px 0 8px; font-weight: 800; }
.customer-card p { color: rgba(255,255,255,.66); font-size: .94rem; margin: 0; }
.customer-grid .customer-card:nth-child(5),
.customer-grid .customer-card:nth-child(6),
.customer-grid .customer-card:nth-child(7) { grid-column: span 1; }

/* ============================================================
   STATISTICHE
   ============================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 56px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 40px 32px; text-align: center; box-shadow: var(--shadow-soft); border: 1px solid rgba(20,24,12,.05); }
.stat-num { font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 3.6rem); color: var(--green-dark); line-height: 1; display: inline-block; margin-bottom: 14px; }
.stat-num .unit { font-size: .55em; }
.stat-label { margin: 0 0 16px; color: var(--ink-soft); }
.stat-src { font-size: .8rem; color: var(--muted); font-style: italic; }
.stats-cta { text-align: center; font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1; margin: 0; }

/* ============================================================
   VIDEO FEATURE
   ============================================================ */
.video-frame-wide { aspect-ratio: 16 / 8.2; margin: 0 auto; }
.team-video { margin: 0; }
.team-video figcaption { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 16px; font-weight: 800; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .5px; font-size: 1.05rem; }
.caption-icon { width: 28px; height: 28px; }

/* ============================================================
   ESG
   ============================================================ */
.esg-inner { display: flex; align-items: center; gap: clamp(28px, 5vw, 60px); }
.esg-mark { flex: 0 0 auto; width: clamp(110px, 16vw, 180px); height: clamp(110px, 16vw, 180px); background: var(--green); border-radius: 30px; display: grid; place-items: center; box-shadow: 0 14px 34px -14px rgba(146,192,31,.7); }
.esg-mark img { width: 58%; }

/* ============================================================
   CONTATTI
   ============================================================ */
.contact { background: linear-gradient(160deg, var(--green) 0%, var(--green-dark) 100%); color: var(--ink); text-align: center; }
.contact .section-kicker { color: var(--ink-soft); }
.contact .section-title { color: var(--ink); }
.contact .section-title .accent { color: var(--white); }
.contact .lead { color: var(--ink-soft); }
.contact-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.contact-info { margin-top: 14px; line-height: 1.7; }
.contact-info p { margin: 0; }
.contact-info a { font-weight: 800; border-bottom: 2px solid rgba(20,24,12,.4); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--ink); color: rgba(255,255,255,.6); padding: 56px 0 40px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.logo-footer { color: var(--white); font-size: 2rem; }
.footer-tag { max-width: 40ch; margin: 0; }
.footer-copy { font-size: .85rem; margin: 8px 0 0; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .problem-grid { grid-template-columns: 1fr; }
  .method-grid, .benefits-grid, .stats-grid { grid-template-columns: 1fr; }
  .customer-grid { grid-template-columns: repeat(2, 1fr); }
  .esg-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 640px) {
  .hero-videos-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .main-nav.open {
    display: flex; flex-direction: column; position: absolute; top: 74px; left: 0; right: 0;
    background: var(--paper); padding: 20px 24px; gap: 18px; box-shadow: var(--shadow-soft);
  }
  .customer-grid { grid-template-columns: 1fr; }
  .hero-badge { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
