*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
:root{
  --cream:#f7f5f0;
  --white:#ffffff;
  --ink:#1a1814;
  --ink2:#3a3835;
  --muted:#8a857c;
  --border:#e4e0d8;
  --red:#cc0000;
  --red2:#e60000;
  --redglow:rgba(204,0,0,0.25);
  --redborder:rgba(204,0,0,0.25);
  --gold:#c8a96e;
  --gold2:#9e7f46;
}
html{scroll-behavior:smooth}
body{font-family:'DM Sans',sans-serif;background:var(--cream);color:var(--ink);overflow-x:hidden}

/* ── NAV ── */
nav{
  position:fixed;top:0;left:0;right:0;z-index:500;height:68px;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 2.5rem;
  transition:background 0.4s,border-color 0.4s;
  border-bottom:1px solid transparent;
}
nav.scrolled{
  background:rgba(247,245,240,0.97);
  backdrop-filter:blur(20px);
  border-color:var(--border);
}
.nav-logo{height:36px;display:block;filter:brightness(0) invert(1)}
nav.scrolled .nav-logo{filter:none}
.nav-links{display:flex;gap:0;list-style:none;align-items:center}
.nav-links a{
  font-size:0.8rem;font-weight:500;letter-spacing:0.1em;text-transform:uppercase;
  color:rgba(255,255,255,0.75);text-decoration:none;padding:0 1.1rem;transition:color 0.25s;
}
nav.scrolled .nav-links a{color:var(--muted)}
.nav-links a:hover{color:#fff}
nav.scrolled .nav-links a:hover{color:var(--red)}
.btn-nav{
  font-size:0.78rem;font-weight:500;letter-spacing:0.1em;text-transform:uppercase;
  text-decoration:none;padding:0.55rem 1.4rem;
  border:1px solid rgba(255,255,255,0.4);color:var(--white);transition:all 0.3s;
}
.btn-nav:hover{background:rgba(255,255,255,0.1)}
nav.scrolled .btn-nav{border-color:var(--red);color:var(--red)}
nav.scrolled .btn-nav:hover{background:var(--red);color:var(--white)}

/* ── HERO ── */
.hero{
  position:relative;
  min-height:100vh;
  display:flex;align-items:center;justify-content:center;
  background:#080c12;
  overflow:hidden;
}

/* sfondo: particelle di testo codice fluttuanti — elegante */


/* gradiente overlay sopra le particelle */
.hero-overlay{
  position:absolute;inset:0;z-index:1;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(8,12,18,0.0) 0%, rgba(8,12,18,0.0) 25%, rgba(8,12,18,0.65) 70%, rgba(8,12,18,0.92) 100%),
    linear-gradient(to bottom, rgba(8,12,18,0.7) 0%, rgba(8,12,18,0.0) 20%, rgba(8,12,18,0.0) 70%, rgba(8,12,18,0.85) 100%);
}

/* contenuto hero */
.hero-content{
  position:relative;z-index:2;
  text-align:center;
  max-width:780px;
  padding:9rem 2rem 5rem;
  display:flex;flex-direction:column;align-items:center;
}

/* eyebrow */
.hero-eyebrow{
  font-family:'JetBrains Mono',monospace;
  font-size:0.72rem;letter-spacing:0.22em;text-transform:uppercase;
  color:rgba(204,0,0,0.9);
  margin-bottom:2.2rem;
  display:flex;align-items:center;justify-content:center;gap:1rem;
  opacity:0;transition:opacity 0.6s ease;
}
.hero-eyebrow.visible{opacity:1}
.hero-eyebrow::before,.hero-eyebrow::after{
  content:'';display:block;width:40px;height:1px;
  background:var(--red);opacity:0.65;
}

/* titolo H1 */
.hero-h1{
  font-family:'Cormorant Garamond',serif;
  font-size:clamp(3rem,6.5vw,5.5rem);
  font-weight:300;line-height:1.05;letter-spacing:-0.01em;
  color:#ffffff;
  margin-bottom:0;
  min-height:2.3em;
  width:100%;
}
.hero-h1 em{font-style:italic;color:var(--gold)}

/* commenti codice — righe verdi che appaiono */
.hero-comment{
  font-family:'JetBrains Mono',monospace;
  font-size:0.7rem;letter-spacing:0.06em;
  color:rgba(100,190,100,0.55);
  align-self:flex-start;
  margin:0.9rem 0 0.2rem;
  white-space:nowrap;overflow:hidden;
  width:0;
  transition:none;
}

/* sottotitolo */
.hero-sub{
  font-family:'DM Sans',sans-serif;
  font-size:clamp(0.95rem,1.5vw,1.05rem);font-weight:300;
  color:rgba(255,255,255,0.58);
  line-height:1.75;text-align:center;
  margin-top:1.8rem;
  min-height:5em;
  width:100%;
  opacity:0;transition:opacity 0.5s ease;
}
.hero-sub.visible{opacity:1}

/* bottoni */
.hero-btns{
  display:flex;gap:1rem;justify-content:center;flex-wrap:wrap;
  margin-top:2.6rem;
  opacity:0;transform:translateY(10px);
  transition:opacity 0.5s ease, transform 0.5s ease;
}
.hero-btns.visible{opacity:1;transform:translateY(0)}

.btn-red{
  padding:0.9rem 2.4rem;background:var(--red);color:#fff;border:none;
  font-size:0.8rem;font-weight:600;letter-spacing:0.12em;text-transform:uppercase;
  cursor:pointer;text-decoration:none;font-family:'DM Sans',sans-serif;
  box-shadow:0 0 28px rgba(204,0,0,0.35);
  transition:background 0.2s,box-shadow 0.2s;
}
.btn-red:hover{background:var(--red2);box-shadow:0 0 40px rgba(204,0,0,0.5)}
.btn-ghost{
  padding:0.9rem 2.4rem;background:transparent;color:#fff;
  border:1px solid rgba(255,255,255,0.35);
  font-size:0.8rem;font-weight:400;letter-spacing:0.12em;text-transform:uppercase;
  cursor:pointer;text-decoration:none;font-family:'DM Sans',sans-serif;
  transition:border-color 0.2s;
}
.btn-ghost:hover{border-color:rgba(255,255,255,0.7)}

/* cursore lampeggiante */
.hero-tags{
  display:flex;gap:0.6rem;justify-content:center;flex-wrap:wrap;
  margin-top:2rem;
  opacity:0;transform:translateY(6px);
  transition:opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}
.hero-tags.visible{opacity:1;transform:translateY(0)}
.htag{
  font-family:'JetBrains Mono',monospace;
  font-size:0.65rem;letter-spacing:0.1em;text-transform:uppercase;
  padding:0.3rem 0.8rem;
  border:1px solid rgba(255,255,255,0.18);
  color:rgba(255,255,255,0.38);
  transition:border-color 0.4s, color 0.4s, box-shadow 0.4s, background 0.4s;
  cursor:default;
}
.htag:hover{border-color:rgba(255,255,255,0.5);color:rgba(255,255,255,0.85)}
/* glow state — bianco */
.htag.glow{
  border-color:rgba(255,255,255,0.75);
  color:#ffffff;
  background:rgba(255,255,255,0.06);
  box-shadow:0 0 12px rgba(255,255,255,0.2), 0 0 28px rgba(255,255,255,0.08);
}
/* glow state — rosso per Google Ads */
.htag-red{border-color:rgba(204,0,0,0.4);color:rgba(204,0,0,0.7)}
.htag-red:hover{border-color:rgba(204,0,0,0.8);color:rgba(204,0,0,1)}
.htag-red.glow{
  border-color:rgba(230,0,0,0.9);
  color:#ff2222;
  background:rgba(204,0,0,0.08);
  box-shadow:0 0 14px rgba(204,0,0,0.45), 0 0 32px rgba(204,0,0,0.18);
}
.cur{
  display:inline-block;width:2.5px;height:0.82em;
  background:#cc0000;vertical-align:middle;margin-left:2px;
  animation:blink-c 0.85s step-end infinite;
}
@keyframes blink-c{0%,100%{opacity:1}50%{opacity:0}}

/* scroll indicator */
.hero-scroll{
  position:absolute;bottom:2.2rem;left:50%;transform:translateX(-50%);
  z-index:3;display:flex;flex-direction:column;align-items:center;gap:0.5rem;
  opacity:0;transition:opacity 0.6s;
}
.hero-scroll.visible{opacity:1}
.hero-scroll span{
  font-family:'JetBrains Mono',monospace;font-size:0.65rem;
  letter-spacing:0.15em;text-transform:uppercase;color:rgba(255,255,255,0.28);
}
.scroll-line{width:1px;height:38px;background:rgba(255,255,255,0.1);position:relative;overflow:hidden}
.scroll-line::after{
  content:'';position:absolute;top:-100%;left:0;width:100%;height:100%;
  background:var(--red);animation:sdrop 2s ease-in-out infinite;
}
@keyframes sdrop{0%{top:-100%}100%{top:100%}}

/* ── DIVIDER ── */
.section-divider{display:flex;align-items:center;justify-content:center;padding:3rem 3rem 0;gap:1.5rem}
.section-divider::before,.section-divider::after{content:'';flex:1;height:1px;background:var(--border)}
.divider-mark{font-family:'JetBrains Mono',monospace;font-size:0.68rem;letter-spacing:0.2em;color:var(--muted)}

/* ── INTRO (chi siamo) ── */
.intro{display:grid;grid-template-columns:1fr 1fr;gap:4rem;padding:6rem 3rem;max-width:1240px;margin:0 auto;align-items:center}
.intro-text h2{font-family:'Cormorant Garamond',serif;font-size:2.8rem;font-weight:300;line-height:1.2;margin-bottom:1.5rem}
.intro-text h2 em{font-style:italic;color:var(--red)}
.intro-text p{color:var(--ink2);line-height:1.8;font-size:1rem;margin-bottom:1.2rem;font-weight:300}
.intro-text a{display:inline-flex;align-items:center;gap:0.5rem;font-size:0.78rem;letter-spacing:0.12em;text-transform:uppercase;color:var(--red);text-decoration:none;font-weight:500;margin-top:0.5rem;transition:gap 0.3s}
.intro-text a:hover{gap:0.9rem}
.intro-stats{display:grid;grid-template-columns:1fr 1fr;gap:1.5px;background:var(--border);border:1px solid var(--border)}
.intro-stat{background:var(--white);padding:2.5rem 2rem;text-align:center;transition:background 0.2s}
.intro-stat:hover{background:var(--cream)}
.intro-stat .num{font-family:'Cormorant Garamond',serif;font-size:3.2rem;font-weight:300;color:var(--ink);line-height:1}
.intro-stat .num span{font-style:italic;color:var(--red)}
.intro-stat .lbl{font-size:0.72rem;letter-spacing:0.12em;text-transform:uppercase;color:var(--muted);margin-top:0.5rem}

/* ── SERVICES ── */
.services{padding:0 3rem 7rem;max-width:1240px;margin:0 auto}
.section-header{text-align:center;margin-bottom:4rem}
.section-tag{font-family:'JetBrains Mono',monospace;font-size:0.7rem;letter-spacing:0.18em;text-transform:uppercase;color:var(--red);margin-bottom:1rem}
.section-header h2{font-family:'Cormorant Garamond',serif;font-size:2.8rem;font-weight:300}
.section-header h2 em{font-style:italic}
.services-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5px;background:var(--border)}
.service-item{background:var(--white);padding:2.8rem 2.2rem;position:relative;overflow:hidden;transition:background 0.3s}
.service-item::after{content:'';position:absolute;bottom:0;left:0;width:0;height:2px;background:var(--red);transition:width 0.4s ease}
.service-item:hover{background:var(--cream)}
.service-item:hover::after{width:100%}
.service-num{font-family:'Cormorant Garamond',serif;font-size:3.5rem;font-weight:300;color:var(--border);line-height:1;margin-bottom:1rem;user-select:none}
.service-item h3{font-size:1rem;font-weight:600;margin-bottom:0.7rem;color:var(--ink)}
.service-item p{font-size:0.88rem;color:var(--ink2);line-height:1.7;font-weight:300}
.service-tags{margin-top:1.2rem;display:flex;flex-wrap:wrap;gap:0.4rem}
.tag{font-family:'JetBrains Mono',monospace;font-size:0.62rem;letter-spacing:0.1em;padding:0.2rem 0.55rem;border:1px solid var(--border);color:var(--muted)}

/* ── ADS ── */
.ads-section{background:var(--ink);padding:7rem 3rem;position:relative;overflow:hidden}
.ads-section::before{content:'';position:absolute;top:0;left:0;right:0;height:2px;background:linear-gradient(90deg,transparent,var(--red),transparent);opacity:0.7}
.ads-inner{max-width:1240px;margin:0 auto;display:grid;grid-template-columns:1fr 1fr;gap:6rem;align-items:center}
.ads-left .section-tag{color:var(--red);margin-bottom:0.8rem}
.ads-left h2{font-family:'Cormorant Garamond',serif;font-size:2.8rem;font-weight:300;color:var(--white);margin-bottom:1.5rem;line-height:1.2}
.ads-left h2 em{font-style:italic;color:var(--gold)}
.ads-left p{font-size:0.92rem;color:rgba(255,255,255,0.5);line-height:1.78;margin-bottom:0.9rem;font-weight:300}
.ads-left p strong{color:rgba(255,255,255,0.8);font-weight:500}
.ads-pills{display:flex;flex-wrap:wrap;gap:0.5rem;margin-top:2rem}
.pill{font-family:'JetBrains Mono',monospace;font-size:0.62rem;letter-spacing:0.08em;text-transform:uppercase;padding:0.28rem 0.7rem;border:1px solid var(--redborder);color:rgba(204,0,0,0.8);background:rgba(204,0,0,0.06);transition:background 0.2s}
.pill:hover{background:rgba(204,0,0,0.14)}
.ads-right{display:grid;grid-template-columns:1fr 1fr;gap:1.5px;background:rgba(255,255,255,0.06)}
.ads-metric{background:#1a2030;padding:2.2rem 1.8rem;position:relative;transition:background 0.2s}
.ads-metric:hover{background:#1e2638}
.ads-metric::before{content:'';position:absolute;top:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,var(--red),transparent);opacity:0.3}
.am-lbl{font-family:'JetBrains Mono',monospace;font-size:0.6rem;letter-spacing:0.14em;text-transform:uppercase;color:rgba(255,255,255,0.25);margin-bottom:0.6rem}
.am-val{font-family:'Cormorant Garamond',serif;font-size:2.8rem;font-weight:300;line-height:1;color:var(--red2)}
.am-val em{font-style:normal;font-size:0.55em;color:rgba(255,255,255,0.2)}
.am-sub{margin-top:0.4rem;font-size:0.78rem;color:rgba(255,255,255,0.25);font-weight:300}

/* ── TECH ── */
.tech-section{background:var(--ink);padding:0 3rem 7rem}
.tech-inner{max-width:1240px;margin:0 auto}
.tech-section .section-tag{color:var(--gold)}
.tech-section h2{font-family:'Cormorant Garamond',serif;font-size:2.8rem;font-weight:300;color:var(--white);margin-bottom:4rem}
.tech-section h2 em{font-style:italic;color:var(--gold)}
.tech-row{display:flex;align-items:center;justify-content:space-between;border-top:1px solid rgba(255,255,255,0.06);padding:1.8rem 0;transition:all 0.3s;cursor:default}
.tech-row:hover .tech-name{color:var(--red)}
.tech-row:hover .tech-fill{background:var(--red)}
.tech-name{font-family:'JetBrains Mono',monospace;font-size:0.78rem;letter-spacing:0.12em;text-transform:uppercase;color:rgba(255,255,255,0.38);transition:color 0.3s;min-width:200px}
.tech-bar-wrap{flex:1;margin:0 2rem;height:1px;background:rgba(255,255,255,0.06)}
.tech-fill{height:1px;background:rgba(255,255,255,0.16);transition:all 0.3s}
.tech-desc{font-size:0.82rem;color:rgba(255,255,255,0.25);text-align:right;min-width:220px;font-weight:300}

/* ── CTA ── */
.cta-section{padding:8rem 3rem;text-align:center;background:var(--cream)}
.cta-inner{max-width:680px;margin:0 auto}
.cta-section h2{font-family:'Cormorant Garamond',serif;font-size:3.2rem;font-weight:300;line-height:1.2;margin-bottom:1.5rem}
.cta-section h2 em{font-style:italic;color:var(--red)}
.cta-section p{font-size:0.95rem;color:var(--ink2);line-height:1.8;font-weight:300;margin-bottom:2.5rem}
.cta-contacts{display:flex;justify-content:center;gap:3rem;margin-top:3rem;padding-top:2.5rem;border-top:1px solid var(--border);flex-wrap:wrap}
.cta-contact{display:flex;flex-direction:column;align-items:center;gap:0.3rem}
.cta-contact .lbl{font-family:'JetBrains Mono',monospace;font-size:0.62rem;letter-spacing:0.15em;text-transform:uppercase;color:var(--muted)}
.cta-contact .val{font-size:0.92rem;color:var(--ink);font-weight:500}

/* ── FOOTER ── */
footer{background:var(--ink);padding:2.5rem 3rem;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1.5rem;border-top:2px solid var(--red)}
.footer-logo-img{height:28px;filter:brightness(0) invert(1);opacity:0.6;transition:opacity 0.3s}
.footer-logo-img:hover{opacity:1}
.footer-copy{font-size:0.65rem;color:rgba(255,255,255,0.2);font-family:'JetBrains Mono',monospace;letter-spacing:0.06em}
.footer-links{display:flex;gap:1.5rem}
.footer-links a{font-size:0.7rem;letter-spacing:0.1em;text-transform:uppercase;color:rgba(255,255,255,0.25);text-decoration:none;transition:color 0.2s}
.footer-links a:hover{color:var(--red)}

/* ── RESPONSIVE ── */
@media(max-width:960px){
  .intro{grid-template-columns:1fr;gap:3rem;padding:5rem 1.5rem}
  .services{padding:0 1.5rem 5rem}
  .services-grid{grid-template-columns:1fr 1fr}
  .ads-inner{grid-template-columns:1fr;gap:3rem}
  .ads-section,.tech-section{padding:5rem 1.5rem}
  nav{padding:0 1.5rem}
}
@media(max-width:640px){
  .nav-links{display:none}
  .services-grid{grid-template-columns:1fr}
  .ads-right{grid-template-columns:1fr 1fr}
  .intro-stats{grid-template-columns:1fr 1fr}
  .tech-desc{display:none}
  .cta-contacts{gap:1.5rem}
  footer{padding:2rem 1.5rem;flex-direction:column;align-items:flex-start}
}


#hero {
  position: relative;
  overflow: hidden;
}

#matrixBg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
}
.ticker{
  background:var(--red);
  color:var(--white);
  font-family:'Share Tech Mono',monospace;
  font-size:0.78rem;
  letter-spacing:0.08em;
  padding:6px 0;
  overflow:hidden;
  white-space:nowrap;
  border-bottom:2px solid var(--ink);
}
.ticker-inner{
  display:inline-block;
  animation:ticker 60s linear infinite;
}
@keyframes ticker{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.ticker-sep{color:var(--magenta);margin:0 1.5rem}

.cur {
  display: inline-block;
  width: 8px;
  height: 18px;
  background: #ff003c;
  margin-left: 3px;
  animation: br-cursor 0.45s steps(1) infinite;
  box-shadow: 0 0 6px #ff003c;
}

@keyframes br-cursor {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}
