/* =========================================================
   HERO.CSS v4.0 – Armony Media – Ken Burns
   ========================================================= */

/* ── HERO WRAPPER ── */
.hero {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #06060e;
}

/* ── CANVAS FLUID ── */
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  display: block;
  will-change: contents;
}

/* ── OVERLAY — il canvas gestisce già tutto ── */
.hero__overlay     { display: none; }
.hero__paint-overlay { display: none; }
.hero__bg            { display: none; }

/* ── CONTENUTO — testo ben leggibile sul fluid ── */
.hero__content {
  position: relative;
  z-index: 10;
  text-align: center;
  width: min(820px, 86vw);
  margin: 0 auto;
  padding: 80px 0 0;
  box-sizing: border-box;
  overflow: visible;
  /* Backdrop blur leggero sotto il testo */
  isolation: isolate;
}

/* Testo del titolo: ombra forte per contrasto */
.hero__title {
  text-shadow:
    0 2px 30px rgba(6,6,14,0.9),
    0 0   60px rgba(6,6,14,0.7);
}

.hero__subtitle {
  text-shadow: 0 1px 20px rgba(6,6,14,0.95);
}

/* ── CONTENUTO ── */
.hero__content {
  position: relative;
  z-index: 10;
  text-align: center;
  width: min(820px, 86vw);
  /* margin auto garantisce centramento anche fuori da flex */
  margin: 0 auto;
  padding: 80px 0 0;
  box-sizing: border-box;
  overflow: visible;
}

/* ── LABEL ── */
.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245,245,247,.55);
  margin-bottom: 1.8rem;
  opacity: 0;
  transform: translateY(20px);
  /* evita il wrap a capo su mobile */
  white-space: nowrap;
  /* su schermi piccoli si riduce automaticamente */
  max-width: 100%;
  overflow: hidden;
}

.hero__label-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #39FF14;
  box-shadow: 0 0 8px #39FF14, 0 0 18px #39FF14;
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* ── TITOLO H1 ──
   overflow: visible garantisce che discendenti ("g","p","q","y")
   non vengano tagliati. padding-bottom extra per sicurezza.
   ─────────────────────────────────────────────────────────── */
.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05em;
  /* IBM Plex Mono — leggermente più piccolo perché mono occupa più spazio */
  font-size: clamp(2rem, 5.2vw, 5rem);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 200;
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin-bottom: 1.8rem;
  overflow: visible;
  padding: 0.05em 0 0.15em;
  width: 100%;
}

/* Ogni riga del titolo */
.hero__title-line {
  display: block;
  overflow: visible;
  /* padding bottom protegge i discendenti come "g" */
  padding-bottom: 0.12em;
  opacity: 0;
  transform: translateY(110%);
  will-change: transform, opacity;
}

/* Fallback se GSAP non carica */
@keyframes fallback-appear {
  to { opacity: 1; transform: translateY(0); }
}
.hero__title-line {
  animation: fallback-appear 0.001s 3s forwards;
}

/* ── SOTTOTITOLO ── */
.hero__subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: rgba(245,245,247,.62);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fallback-appear 0.001s 3.2s forwards;
}

/* ── CTA GROUP ── */
.hero__cta-group {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  /* no wrap: i due bottoni restano affiancati */
  flex-wrap: nowrap;
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fallback-appear 0.001s 3.4s forwards;
}

/* ── SCROLL INDICATOR ── */
.hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fallback-appear 0.001s 3.6s forwards;
}

.hero__scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, transparent, #00C3FF);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50%       { opacity: 0.3; transform: scaleY(0.6); }
}

.hero__scroll-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245,245,247,.4);
}

/* =========================================================
   BOTTONI
   ========================================================= */
.armony-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.23,1,0.32,1),
              box-shadow 0.2s cubic-bezier(0.23,1,0.32,1);
  white-space: nowrap;
  border: none;
  /* NESSUN cursor:pointer – gestito da style.css con cursor:none */
}

.armony-btn:hover { transform: translateY(-2px); }

.armony-btn--primary {
  background: linear-gradient(135deg, #00C3FF, #FF2D78);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,195,255,.3);
}
.armony-btn--primary:hover { box-shadow: 0 8px 40px rgba(0,195,255,.5); }

.armony-btn--ghost {
  background: rgba(255,255,255,.04);
  color: #F5F5F7;
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
}
.armony-btn--ghost:hover {
  border-color: #00C3FF;
  background: rgba(0,195,255,.08);
}

.armony-btn--outline {
  background: transparent;
  color: #F5F5F7;
  border: 1px solid rgba(255,255,255,.12);
}
.armony-btn--outline:hover { border-color: #FF2D78; color: #FF2D78; }

.armony-btn--large { padding: 1.1rem 2.5rem; font-size: 1rem; }

.armony-btn__icon {
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.23,1,0.32,1);
}
.armony-btn:hover .armony-btn__icon { transform: translate(3px, 0); }

/* =========================================================
   LABEL E TITOLI SEZIONE
   overflow:visible su tutto per non tagliare mai i discendenti
   ========================================================= */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #00C3FF;
  margin-bottom: 1rem;
  display: block;
  opacity: 1 !important;
  transform: none !important;
}

.section-title {
  font-size: clamp(2rem, 4.8vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 2.5rem;
  color: #F5F5F7;
  /* CRITICO: mai nascondere i discendenti */
  overflow: visible !important;
  opacity: 1 !important;
  transform: none !important;
}

.section-title em {
  font-style: italic;
  /* inline non crea un formatting context, ma aggiungiamo
     overflow visible per sicurezza su tutti i browser */
  overflow: visible;
  display: inline;
}

/* Animazione reveal sezioni via GSAP */
[data-gsap-reveal] {
  opacity: 1;
  transform: none;
}
[data-gsap-reveal].gsap-hidden {
  opacity: 0;
  transform: translateY(40px);
}

/* =========================================================
   SEZIONE SERVIZI
   ========================================================= */
.section--services { background: #080810; overflow: visible; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  margin-top: 3rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  overflow: hidden;
}

.service-card {
  padding: 2.5rem;
  background: #080810;
  border: 1px solid rgba(255,255,255,.06);
  position: relative;
  transition: background 0.5s cubic-bezier(0.23,1,0.32,1),
              transform 0.5s cubic-bezier(0.23,1,0.32,1);
  overflow: hidden;
  /* Quando è un <a> invece di <article> */
  display: block;
  text-decoration: none;
  color: inherit;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.23,1,0.32,1);
}

.service-card[data-color="electric"]::before { background: radial-gradient(ellipse at top left, rgba(0,195,255,.12),  transparent 70%); }
.service-card[data-color="magenta"]::before  { background: radial-gradient(ellipse at top left, rgba(255,45,120,.12), transparent 70%); }
.service-card[data-color="coral"]::before    { background: radial-gradient(ellipse at top left, rgba(255,107,74,.12), transparent 70%); }
.service-card[data-color="yellow"]::before   { background: radial-gradient(ellipse at top left, rgba(255,228,77,.12), transparent 70%); }
.service-card[data-color="neon"]::before     { background: radial-gradient(ellipse at top left, rgba(57,255,20,.12),  transparent 70%); }

.service-card:hover::before { opacity: 1; }
.service-card:hover { transform: translateY(-4px); }

.service-card__icon { display: block; font-size: 2rem; margin-bottom: 1.2rem; line-height: 1; }
.service-card[data-color="electric"] .service-card__icon { color: #00C3FF; }
.service-card[data-color="magenta"]  .service-card__icon { color: #FF2D78; }
.service-card[data-color="coral"]    .service-card__icon { color: #FF6B4A; }
.service-card[data-color="yellow"]   .service-card__icon { color: #FFE44D; }
.service-card[data-color="neon"]     .service-card__icon { color: #39FF14; }

.service-card__title { font-family: var(--font-body); font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; color: #F5F5F7; }
.service-card__desc  { font-size: 0.9rem; color: rgba(245,245,247,.6); line-height: 1.7; margin-bottom: 1.5rem; }

.service-card__link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(245,245,247,.45);
  transition: color 0.2s, gap 0.2s;
}
.service-card__link:hover { color: #00C3FF; gap: 0.75rem; }

@media (max-width: 1024px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .services-grid { grid-template-columns: 1fr; } .service-card { padding: 1.75rem; } }

/* =========================================================
   SEZIONE ABOUT
   overflow: visible – CRITICO per non tagliare i discendenti
   ========================================================= */
.section--about { overflow: visible; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8rem;
  align-items: center;
}

.about-text { overflow: visible; }

.about-body { font-size: 1.05rem; color: rgba(245,245,247,.6); line-height: 1.8; margin-bottom: 2rem; }

.about-visual { display: flex; align-items: center; justify-content: center; }

.about-visual__card {
  position: relative;
  width: 360px; height: 360px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
}

.about-visual__orb { position: absolute; border-radius: 50%; filter: blur(40px); animation: float-orb 6s ease-in-out infinite; }
.about-visual__orb--1 { width:200px; height:200px; background:#00C3FF; opacity:.3;  top:-20%;   left:-10%;  animation-delay:0s;  }
.about-visual__orb--2 { width:160px; height:160px; background:#FF2D78; opacity:.25; bottom:-10%;right:-10%; animation-delay:-2s; }
.about-visual__orb--3 { width:120px; height:120px; background:#39FF14; opacity:.15; top:40%;    left:40%;   animation-delay:-4s; }

@keyframes float-orb {
  0%,100% { transform: translate(0,0)       scale(1);   }
  33%     { transform: translate(20px,-30px) scale(1.1); }
  66%     { transform: translate(-20px,20px) scale(0.9); }
}

.about-visual__text {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  text-align: center; line-height: 1.2; color: rgba(255,255,255,.85);
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 0; }
  .about-visual { display: none; }
}

/* =========================================================
   SEZIONE CONTATTI
   ========================================================= */
.section--contact {
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(0,195,255,.05), transparent 70%);
  overflow: visible;
  /* riduce spazio eccessivo su mobile */
  padding-bottom: 3rem;
}

.contact-inner { max-width: 700px; margin: 0 auto; overflow: visible; }
.contact-subtitle { font-size: 1.1rem; color: rgba(245,245,247,.6); margin-bottom: 2.5rem; line-height: 1.7; }
.contact-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.contact-or { font-size: 0.8rem; color: rgba(245,245,247,.4); letter-spacing: .1em; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer-brand    { display: flex; flex-direction: column; gap: .5rem; }
.footer-tagline  { font-size: .85rem; color: rgba(245,245,247,.5); }
.footer-nav__list { display: flex; gap: 2rem; list-style: none; flex-wrap: wrap; }
.footer-nav__list a { font-size: .85rem; color: rgba(245,245,247,.5); transition: color .2s; }
.footer-nav__list a:hover { color: #F5F5F7; }
.footer-social   { display: flex; gap: 1rem; }
.footer-social a { color: rgba(245,245,247,.5); transition: color .2s; }
.footer-social a:hover { color: #00C3FF; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  padding-top: 2rem; margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.07);
}
.footer-bottom a { color: rgba(245,245,247,.4); font-size: .75rem; transition: color .2s; }
.footer-bottom a:hover { color: #F5F5F7; }

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }
  .footer-brand { align-items: center; text-align: center; }
  .footer-nav__list {
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
  }
  .footer-social { justify-content: center; }
  .footer-piva { text-align: center; }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }
}

/* =========================================================
   RESPONSIVE HERO – font sicuro per ogni schermo
   ========================================================= */
@media (max-width: 1024px) {
  .hero__content { width: min(720px, 88vw); }
}

@media (max-width: 768px) {
  .hero__title      { font-size: clamp(2rem, 6.5vw, 3.8rem); padding-bottom: 0.25em; }
  .hero__content    { width: 92vw; padding-top: 80px; margin: 0 auto; }
  /* bottoni hero: padding ridotto per stare affiancati */
  .hero__cta-group .armony-btn { padding: 0.8rem 1.1rem; font-size: 0.82rem; }
  /* contact CTA su mobile: colonna */
  .contact-cta-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .contact-cta-group .armony-btn { justify-content: center; }
  .contact-or { text-align: center; }
}

@media (max-width: 480px) {
  .hero__title   { font-size: clamp(1.7rem, 6.8vw, 2.8rem); }
  .hero__content { width: 95vw; margin: 0 auto; }
  /* Riduce padding sezioni su schermi piccoli */
  .section       { padding: 4rem 0; }
}

@media (max-width: 360px) {
  /* Schermo minuscolo: font fisso piccolo */
  .hero__title   { font-size: 1.55rem; }
}

/* ── NASCONDE STATS (rete sicurezza se server ha file vecchio) ── */
.hero__stats,
[class*="hero__stat"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ── FOOTER P.IVA ── */
.footer-piva {
  padding: 1.2rem 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
  border-bottom: 1px solid rgba(255,255,255,.05);
  margin: 1.5rem 0 1rem;
  text-align: center;
  /* visibile su mobile */
  display: block !important;
  visibility: visible !important;
}
.footer-piva .footer-copy,
.footer-piva p {
  font-size: .82rem;
  /* colore pieno: 75% opacità, leggibile anche su mobile */
  color: rgba(245,245,247,.75) !important;
  line-height: 1.8;
  margin: 0;
}
.footer-piva strong {
  color: #F5F5F7 !important;
  font-weight: 600;
}
.footer-piva a {
  color: #00C3FF !important;
  text-decoration: none;
  transition: opacity .2s;
}
.footer-piva a:hover { opacity: .8; }

/* anche .armony-piva-bar (iniettato da functions.php) */
.armony-piva-bar {
  padding: 1.2rem 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
  margin: 1.5rem 0 1rem;
  text-align: center;
  display: block !important;
  visibility: visible !important;
}
.armony-piva-bar p {
  font-size: .82rem;
  color: rgba(245,245,247,.75) !important;
  line-height: 1.8;
  margin: 0;
}
.armony-piva-bar strong { color: #F5F5F7 !important; font-weight: 600; }
.armony-piva-bar a { color: #00C3FF !important; text-decoration: none; }
