/* Red Pixel Agency — design system
   Palette ereditata da igorpapo.it */
:root {
  --rp-red: #E50914;
  --rp-red-dark: #B00710;
  --rp-ink: #221F1F;
  --rp-black: #141212;
  --rp-grey: #7A7A7A;
  --rp-grey-light: #EEEEEE;
  --rp-grey-lighter: #FAFAFA;
  --rp-white: #FFFFFF;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --container: 1100px;
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--rp-ink);
  background: var(--rp-white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rp-red); text-decoration: none; }
a:hover { color: var(--rp-red-dark); }
::selection { background: var(--rp-red-dark); color: #fff; }

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
.accent { color: var(--rp-red); }

.kicker {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rp-red);
  margin-bottom: 14px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  transition: background .15s, color .15s, transform .15s;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary { background: var(--rp-red); color: #fff; }
.btn-primary:hover { background: var(--rp-red-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { border-color: var(--rp-red); color: var(--rp-red); background: transparent; }
.btn-outline:hover { background: var(--rp-red); color: #fff; }
.btn-outline-light { border-color: #fff; color: #fff; background: transparent; }
.btn-outline-light:hover { background: #fff; color: var(--rp-black); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--rp-black);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: #fff; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--rp-red); }
.nav .btn { padding: 10px 22px; font-size: .9rem; }
.has-sub { position: relative; }
.has-sub > a::after { content: " ▾"; font-size: .7em; }
.submenu {
  display: none; position: absolute; top: 100%; left: -12px;
  background: var(--rp-black); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 10px 0; min-width: 260px;
}
.submenu a { display: block; padding: 9px 18px; }
.has-sub:hover .submenu, .has-sub:focus-within .submenu { display: block; }
.menu-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; position: relative;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  content: ""; display: block; width: 24px; height: 2px; background: #fff;
  position: absolute; left: 8px; transition: transform .2s;
}
.menu-toggle span { top: 19px; }
.menu-toggle span::before { top: -7px; left: 0; }
.menu-toggle span::after { top: 7px; left: 0; }

/* Hero */
.hero {
  background: var(--rp-black);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse 60% 50% at 85% 15%, rgba(229,9,20,.18), transparent 65%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 100% 100%, 44px 44px, 44px 44px;
  pointer-events: none;
}
.hero .container { position: relative; padding-top: 96px; padding-bottom: 96px; }
.hero p.lead { font-size: 1.25rem; color: rgba(255,255,255,.82); max-width: 620px; margin: 22px 0 34px; }
.hero .btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-page .container { padding-top: 72px; padding-bottom: 72px; }

/* Sections */
section { padding: 80px 0; }
.section-dark { background: var(--rp-black); color: #fff; }
.section-grey { background: var(--rp-grey-lighter); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head p { color: var(--rp-grey); margin-top: 12px; font-size: 1.05rem; }
.section-dark .section-head p { color: rgba(255,255,255,.7); }

/* Logo bar */
.logo-bar { padding: 44px 0; background: var(--rp-grey-lighter); border-bottom: 1px solid var(--rp-grey-light); }
.logo-bar .label {
  text-align: center; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--rp-grey); margin-bottom: 26px;
}
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 34px 46px; }
.logos img { height: 34px; width: auto; opacity: .55; transition: opacity .15s; }
.logos img:hover { opacity: .9; }
.google-badge { text-align: center; margin-top: 30px; font-weight: 700; color: var(--rp-ink); }
.google-badge .stars { color: #FBBC04; letter-spacing: 2px; }

/* Cards */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--rp-grey-light);
  border-radius: var(--radius); padding: 30px;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(20,18,18,.08); }
.card .pixel { width: 12px; height: 12px; background: var(--rp-red); margin-bottom: 18px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--rp-grey); font-size: .97rem; }
.card .more { display: inline-block; margin-top: 16px; font-weight: 700; font-size: .92rem; }
.section-dark .card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); }
.section-dark .card p { color: rgba(255,255,255,.65); }

/* Metodo steps */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 0; }
.step .num {
  font-size: 2.6rem; font-weight: 800; color: var(--rp-red);
  line-height: 1; margin-bottom: 14px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--rp-grey); font-size: .97rem; }
.section-dark .step p { color: rgba(255,255,255,.65); }

/* Reviews */
.review {
  background: #fff; border: 1px solid var(--rp-grey-light);
  border-radius: var(--radius); padding: 30px;
  display: flex; flex-direction: column; gap: 18px;
}
.review blockquote { font-size: .98rem; color: var(--rp-ink); }
.review blockquote::before { content: "\201C"; color: var(--rp-red); font-size: 2.4rem; line-height: 0; display: block; margin: 14px 0 2px; font-weight: 800; }
.review .who { margin-top: auto; font-weight: 700; font-size: .92rem; }
.review .who span { display: block; font-weight: 400; color: var(--rp-grey); }

/* Founder */
.founder-grid { display: grid; grid-template-columns: 380px 1fr; gap: 56px; align-items: center; }
.founder-photo { border-radius: var(--radius); overflow: hidden; box-shadow: 18px 18px 0 var(--rp-red); }
.founder-grid .btns { margin-top: 24px; display: flex; gap: 14px; flex-wrap: wrap; }

/* CTA band */
.cta-band { background: var(--rp-red); color: #fff; text-align: center; }
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { max-width: 560px; margin: 0 auto 30px; opacity: .92; }
.cta-band .btn { background: #fff; color: var(--rp-red); }
.cta-band .btn:hover { background: var(--rp-black); color: #fff; }

/* Service page blocks */
.checklist { list-style: none; margin-top: 18px; }
.checklist li { padding-left: 32px; position: relative; margin-bottom: 12px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 12px; height: 12px; background: var(--rp-red);
}
.prose { max-width: 720px; }
.prose h2 { margin: 44px 0 16px; }
.prose p + p { margin-top: 14px; }
.prose strong { color: var(--rp-ink); }

/* FAQ */
.faq details {
  border: 1px solid var(--rp-grey-light); border-radius: 8px;
  padding: 18px 22px; margin-bottom: 12px; background: #fff;
}
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin-top: 12px; color: var(--rp-grey); }

/* Form */
.form-grid { display: grid; gap: 18px; max-width: 640px; }
.form-grid label { font-weight: 700; font-size: .9rem; display: block; margin-bottom: 6px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; padding: 13px 15px; font-family: inherit; font-size: 1rem;
  border: 1px solid #d9d9d9; border-radius: 6px; background: #fff; color: var(--rp-ink);
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: none; border-color: var(--rp-red);
}
.form-grid .privacy { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--rp-grey); }
.form-grid .privacy input { width: auto; margin-top: 4px; }

/* Footer */
.site-footer { background: var(--rp-black); color: rgba(255,255,255,.65); padding: 64px 0 32px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.site-footer img { height: 44px; width: auto; margin-bottom: 18px; }
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: rgba(255,255,255,.65); }
.site-footer a:hover { color: var(--rp-red); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; font-size: .82rem; color: rgba(255,255,255,.4); }

/* ===== Animazioni ===== */

/* Scroll reveal (classi applicate da main.js) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* Entrata hero al caricamento */
@keyframes hero-up {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
.hero .kicker   { animation: hero-up .6s cubic-bezier(.16,1,.3,1) both; }
.hero h1        { animation: hero-up .7s .1s cubic-bezier(.16,1,.3,1) both; }
.hero p.lead    { animation: hero-up .7s .22s cubic-bezier(.16,1,.3,1) both; }
.hero .btns     { animation: hero-up .7s .34s cubic-bezier(.16,1,.3,1) both; }

/* Griglia pixel del hero in lento movimento + glow pulsante */
@keyframes grid-drift {
  from { background-position: 0 0, 0 0, 0 0; }
  to   { background-position: 0 0, 44px 44px, 44px 44px; }
}
@keyframes glow-pulse {
  0%, 100% { opacity: .55; }
  50%      { opacity: 1; }
}
.hero::before { animation: grid-drift 16s linear infinite; }
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 55% 45% at 82% 20%, rgba(229,9,20,.14), transparent 65%);
  animation: glow-pulse 6s ease-in-out infinite;
  pointer-events: none;
}
.hero .container { z-index: 1; }

/* Nav: underline che scorre */
.nav > a:not(.btn), .has-sub > a {
  background: linear-gradient(var(--rp-red), var(--rp-red)) left bottom / 0 2px no-repeat;
  padding-bottom: 4px;
  transition: background-size .25s ease, color .15s;
}
.nav > a:not(.btn):hover, .has-sub > a:hover,
.nav > a[aria-current="page"] { background-size: 100% 2px; }
.submenu { animation: hero-up .22s ease both; }

/* Card: pixel che ruota, bordo che si accende, freccia che scorre */
.card { position: relative; overflow: hidden; }
.card .pixel { transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s; }
.card:hover .pixel { transform: rotate(90deg) scale(1.25); box-shadow: 4px 4px 0 rgba(229,9,20,.3); }
.card:hover { border-color: var(--rp-red); }
.card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--rp-red); transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.card:hover::after { transform: scaleX(1); }
.card .more { transition: letter-spacing .25s ease; }
.card:hover .more { letter-spacing: .03em; }

/* Bottoni: lift + ombra */
.btn { transition: background .15s, color .15s, transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(229,9,20,.28); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-outline-light:hover { box-shadow: 0 10px 24px rgba(255,255,255,.15); }

/* Recensioni: lift + virgolette che si accendono */
.review { transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s, border-color .25s; }
.review:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(20,18,18,.1); border-color: var(--rp-red); }

/* Step del metodo: numero che si colora al passaggio */
.step .num { transition: transform .3s cubic-bezier(.16,1,.3,1), text-shadow .3s; }
.step:hover .num { transform: translateX(6px); text-shadow: 6px 6px 0 rgba(229,9,20,.25); }

/* Loghi: scala leggera */
.logos img { transition: opacity .2s, transform .25s cubic-bezier(.16,1,.3,1); }
.logos img:hover { transform: scale(1.12); }

/* Foto founder: l'ombra rossa si sposta */
.founder-photo { transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s cubic-bezier(.16,1,.3,1); }
.founder-photo:hover { transform: translate(6px, 6px); box-shadow: 10px 10px 0 var(--rp-red); }

/* FAQ: bordo attivo */
.faq details { transition: border-color .2s; }
.faq details:hover, .faq details[open] { border-color: var(--rp-red); }
.faq summary::marker { color: var(--rp-red); }

/* Footer link: slide */
.site-footer li a { display: inline-block; transition: transform .2s, color .15s; }
.site-footer li a:hover { transform: translateX(4px); }

/* Accessibilità: niente animazioni se l'utente le disattiva */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .founder-grid { grid-template-columns: 1fr; gap: 40px; }
  .founder-photo { max-width: 380px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  section { padding: 56px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--rp-black); flex-direction: column; align-items: flex-start;
    padding: 20px 24px 28px; gap: 18px; border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .nav.open { display: flex; }
  .submenu { display: block; position: static; border: 0; padding: 6px 0 0 14px; min-width: 0; }
  .hero .container { padding-top: 64px; padding-bottom: 64px; }
}
