/* ================================================================================
   HORATEL TECHNOLOGY — STYLE.CSS
   Ricostruzione fedele al mockup ufficiale: navy scuro, accento blu, bianco,
   grigio chiaro. Navbar non centrata, hero split testo/foto, servizi in riga
   con lista puntata, fascia scura con icone cerchiate.
   ================================================================================ */

/* --------------------------------------------------------------------------------
   1. RESET
   -------------------------------------------------------------------------------- */
*, *::before, *::after{ box-sizing: border-box; margin: 0; padding: 0; }
html{ scroll-behavior: smooth; scroll-padding-top: 90px; }
body{
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, picture, video{ display: block; max-width: 100%; }
input, button, textarea, select{ font: inherit; color: inherit; }
button{ cursor: pointer; background: none; border: none; }
a{ text-decoration: none; color: inherit; }
ul{ list-style: none; }
::selection{ background: var(--blue); color: var(--white); }
:focus-visible{ outline: 2px solid var(--blue); outline-offset: 2px; }

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

/* --------------------------------------------------------------------------------
   2. VARIABILI
   -------------------------------------------------------------------------------- */
:root{
  --navy: #0a0e18;
  --navy-800: #0f1524;
  --ink: #12151c;
  --white: #ffffff;
  --gray-050: #f4f5f7;
  --gray-200: #e3e5ea;
  --gray-500: #6b7280;
  --gray-600: #545a66;

  --blue: #2f6fed;
  --blue-deep: #1c4fc4;
  --blue-light: #5b8dff;

  --container: 1360px;
  --nav-h: 140px;
  --ease: cubic-bezier(.4,0,.2,1);
}

/* --------------------------------------------------------------------------------
   3. TIPOGRAFIA
   -------------------------------------------------------------------------------- */
h1,h2,h3,h4{ font-weight: 800; letter-spacing: -.02em; line-height: 1.08; color: var(--ink); }
p{ color: var(--gray-600); }
.container{ max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container-full{ max-width: 100%; padding: 0 clamp(24px, 4vw, 64px); }

.eyebrow{
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--blue);
}
.eyebrow::before{ content:''; width: 20px; height: 2px; background: var(--blue); }
.eyebrow.on-dark{ color: var(--blue-light); }
.eyebrow.on-dark::before{ background: var(--blue-light); }

/* --------------------------------------------------------------------------------
   4. BOTTONI
   -------------------------------------------------------------------------------- */
.btn{
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px; font-size: .92rem; font-weight: 700;
  border-radius: 4px; border: 1.5px solid transparent;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover{ transform: translateY(-2px); }
.btn-primary{ background: var(--blue); color: var(--white); }
.btn-primary:hover{ background: var(--blue-deep); }
.btn-outline-light{ background: transparent; border-color: rgba(255,255,255,.4); color: var(--white); }
.btn-outline-light:hover{ background: rgba(255,255,255,.08); border-color: var(--white); }

/* --------------------------------------------------------------------------------
   5. NAVBAR — logo sinistra, menu a sinistra-centro, CTA a destra (fedele al mockup)
      Header con blur in cima, diventa solido con ombra durante lo scroll.
   -------------------------------------------------------------------------------- */
header{ position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; }
.navbar{
  height: var(--nav-h); display: flex; align-items: center; justify-content: flex-start;
  padding: 0 clamp(24px, 4vw, 56px);
  background: rgba(10,14,24,.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: height .35s var(--ease), background-color .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
header.is-scrolled .navbar{
  height: calc(var(--nav-h) - 30px);
  background: rgba(8,11,19,.94);
  box-shadow: 0 12px 32px -12px rgba(0,0,0,.45);
  border-bottom-color: rgba(255,255,255,.1);
}
.logo-block{ display: flex; align-items: center; }
.nav-logo-img{ height: 100px; width: auto; display: block; transition: height .35s var(--ease); }
header.is-scrolled .nav-logo-img{ height: 78px; }
.logo-word{ font-size: 2rem; font-weight: 800; letter-spacing: -.01em; color: var(--white); display: flex; align-items: center; gap: 8px; }
.logo-word .tri{ color: var(--blue); font-size: 1.1rem; transform: translateY(-8px); }
.logo-sub{ font-size: .85rem; font-weight: 700; letter-spacing: .35em; color: var(--blue); margin-top: 2px; }

.nav-links{ display: flex; align-items: center; gap: 36px; margin-left: auto; margin-right: 8px; }
.nav-links a{ position: relative; font-size: .9rem; font-weight: 600; color: rgba(255,255,255,.8); padding: 6px 0; transition: color .25s var(--ease); }
.nav-links a::after{ content:''; position: absolute; left:0; bottom:-2px; width:0; height:2px; background: var(--blue); transition: width .25s var(--ease); }
.nav-links a:hover, .nav-links a.active{ color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after{ width: 100%; }

.menu-btn{ display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: auto; color: var(--white); font-size: 1.3rem; transition: color .2s var(--ease); }
.menu-btn:hover{ color: var(--blue-light); }

/* --------------------------------------------------------------------------------
   6. HERO — split testo / fotografia, fedele al mockup, con overlay e gerarchia
      tipografica rinforzata.
   -------------------------------------------------------------------------------- */
.hero{ background: var(--navy); padding-top: var(--nav-h); overflow: hidden; }
.hero-grid{ display: grid; grid-template-columns: 38% 62%; align-items: stretch; min-height: 320px; }

.hero-text{ padding: 18px clamp(24px,4vw,64px) 26px; display: flex; flex-direction: column; justify-content: center; }
.hero-kicker{ margin-bottom: 10px; font-size: .88rem; letter-spacing: .12em; }
.hero-kicker::before{ width: 28px; }
.hero-title{ font-size: clamp(1.7rem, 2.6vw, 2.3rem); color: var(--white); line-height: 1.18; letter-spacing: -.01em; }
.hero-rule{ display:block; width: 52px; height: 3px; background: var(--blue); margin: 12px 0; box-shadow: 0 0 16px rgba(47,111,237,.6); }
.hero-lead{ color: rgba(255,255,255,.7); font-size: 1.06rem; line-height: 1.65; max-width: 400px; }
.hero-actions{ display: flex; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.hero-actions .btn-primary{ box-shadow: 0 14px 32px -10px rgba(47,111,237,.65); }

.hero-media{ position: relative; overflow: hidden; }
.hero-media img{ width: 100%; height: 100%; object-fit: cover; transform: scale(1.01); transition: transform 8s var(--ease); }
.hero-media::after{
  content:''; position:absolute; inset:0;
  background: linear-gradient(115deg, rgba(10,14,24,.55) 0%, rgba(10,14,24,.1) 38%, rgba(10,14,24,0) 60%),
              linear-gradient(0deg, rgba(10,14,24,.3) 0%, rgba(10,14,24,0) 30%);
  pointer-events: none;
}
.hero:hover .hero-media img{ transform: scale(1.05); }

/* --------------------------------------------------------------------------------
   7. SERVIZI — intestazione + 5 servizi in riga, ora vere card premium
   -------------------------------------------------------------------------------- */
.services{ background: var(--gray-050); padding: 24px 0 96px; }
.services .section-head{ margin-bottom: 24px; }
.services-grid{ display: grid; grid-template-columns: repeat(6,1fr); gap: 20px; align-items: stretch; }
.services-heading{ grid-column: 1/-1; margin-bottom: 8px; }
.services-heading h2{ font-size: 1.55rem; line-height: 1.28; margin-top: 14px; }
.service-item{
  position: relative; background: var(--white); border: 1px solid var(--gray-200); border-radius: 12px;
  padding: 26px 20px 24px; box-shadow: 0 1px 2px rgba(16,24,40,.04);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.service-item:hover{
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -18px rgba(16,24,40,.22);
  border-color: rgba(47,111,237,.35);
}
.service-item .s-icon{
  color: var(--blue); font-size: 1.6rem; margin-bottom: 16px; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 10px; background: rgba(47,111,237,.08);
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.service-item:hover .s-icon{ background: var(--blue); color: var(--white); transform: rotate(-6deg) scale(1.06); }
.service-item h3{ font-size: .95rem; line-height: 1.32; margin-bottom: 12px; min-height: 2.5em; color: var(--ink); }
.service-item ul li{ font-size: .82rem; color: var(--gray-600); line-height: 1.85; }
.service-rule{ display: block; width: 24px; height: 3px; background: var(--gray-200); margin-top: 16px; border-radius: 2px; transition: width .35s var(--ease), background .35s var(--ease); }
.service-item:hover .service-rule{ width: 40px; background: var(--blue); }

/* --------------------------------------------------------------------------------
   8. PERCHÉ SCEGLIERE HORATEL — 4 card su fascia scura
   -------------------------------------------------------------------------------- */
.trust{ background: var(--navy); padding: 88px 0; }
.trust-grid{ display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.trust-item{
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  padding: 30px 26px; border-radius: 12px; background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease);
}
.trust-item:hover{ transform: translateY(-6px); background: rgba(255,255,255,.055); border-color: rgba(47,111,237,.4); }
.trust-item .t-ico{
  width: 50px; height: 50px; border-radius: 50%; border: 1.5px solid var(--blue);
  display: flex; align-items: center; justify-content: center; color: var(--blue-light); font-size: 1.1rem; flex-shrink: 0;
  transition: background .35s var(--ease), color .35s var(--ease);
}
.trust-item:hover .t-ico{ background: var(--blue); color: var(--white); }
.trust-item h3{ color: var(--white); font-size: .98rem; margin-bottom: 2px; }
.trust-item p{ color: rgba(255,255,255,.55); font-size: .86rem; line-height: 1.6; margin: 0; }

/* --------------------------------------------------------------------------------
   9. SEZIONI GENERICHE CONDIVISE (altre pagine / homepage sotto la fold)
   -------------------------------------------------------------------------------- */
.section{ padding: 110px 0; }
.bg-light{ background: var(--gray-050); }
.section-head{ max-width: 640px; margin-bottom: 56px; }
.section-head h2{ font-size: clamp(1.9rem,2.8vw,2.6rem); margin-top: 16px; }
.section-head p{ margin-top: 16px; font-size: 1.02rem; line-height: 1.7; }

/* Le Nostre Competenze — 6 card premium (sostituiscono il vecchio Portfolio) */
.competence-grid{ display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; }
.competence-card{
  background: var(--white); border: 1px solid var(--gray-200); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.competence-card:hover{ transform: translateY(-8px); box-shadow: 0 30px 60px -22px rgba(16,24,40,.24); border-color: rgba(47,111,237,.35); }
.competence-media{ position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--navy); }
.competence-media img{ width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.competence-card:hover .competence-media img{ transform: scale(1.06); }
.competence-icon{
  position: absolute; left: 20px; bottom: -22px; width: 52px; height: 52px; border-radius: 12px;
  background: var(--blue); color: var(--white); display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; box-shadow: 0 12px 26px -8px rgba(47,111,237,.55);
  transition: transform .4s var(--ease), background .4s var(--ease);
}
.competence-card:hover .competence-icon{ transform: translateY(-4px) rotate(-6deg); background: var(--blue-deep); }
.competence-body{ padding: 36px 24px 26px; }
.competence-body h3{ font-size: 1.08rem; margin-bottom: 10px; }
.competence-body p{ font-size: .88rem; line-height: 1.65; }
.competence-link{ display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--blue); font-size: .84rem; font-weight: 700; }
.competence-link i{ transition: transform .3s var(--ease); font-size: .78rem; }
.competence-card:hover .competence-link i{ transform: translateX(4px); }
/* Come Lavoriamo — timeline orizzontale con connettori (homepage) */
.howwork-line{ position: relative; display: grid; grid-template-columns: repeat(6,1fr); gap: 18px; counter-reset: step; }
.howwork-line::before{
  content:''; position: absolute; top: 27px; left: 6%; right: 6%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--gray-200) 0 10px, transparent 10px 18px);
}
.howwork-step{ position: relative; text-align: center; padding-top: 4px; }
.howwork-num{
  position: relative; z-index: 2; width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--blue); color: var(--blue); font-weight: 800; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
.howwork-step:hover .howwork-num{ background: var(--blue); color: var(--white); transform: scale(1.08); box-shadow: 0 12px 28px -10px rgba(47,111,237,.55); }
.howwork-step h3{ font-size: .95rem; margin-bottom: 6px; }
.howwork-step p{ font-size: .82rem; line-height: 1.55; }

/* CTA band */
.cta-band{ position: relative; background: var(--navy); padding: 96px 0; overflow: hidden; }
.cta-band::before{
  content:''; position: absolute; top: -40%; right: -10%; width: 55%; padding-bottom: 55%; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,111,237,.28) 0%, rgba(47,111,237,0) 70%); pointer-events: none;
}
.cta-band .container{ position: relative; z-index: 1; }
.cta-band h2{ color: var(--white); font-size: clamp(1.8rem,2.8vw,2.5rem); max-width: 620px; }
.cta-band p{ color: rgba(255,255,255,.62); max-width: 500px; margin-top: 16px; }
.cta-actions{ margin-top: 30px; }
.cta-actions .btn-primary{ padding: 18px 36px; font-size: 1rem; box-shadow: 0 18px 40px -12px rgba(47,111,237,.6); }

/* Footer */
footer{ background: var(--navy); color: rgba(255,255,255,.6); padding: 80px 0 0; border-top: 1px solid rgba(255,255,255,.06); }
.footer-grid{ display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 56px; }
.footer-grid .logo-word{ font-size: 1.4rem; }
.footer-grid p{ font-size: .9rem; margin-top: 14px; max-width: 300px; line-height: 1.7; }
.footer-col h4{ color: var(--white); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 20px; }
.footer-col ul li{ margin-bottom: 12px; }
.footer-col ul li a{ position: relative; transition: color .2s var(--ease); }
.footer-col ul li a:hover{ color: var(--white); }
.footer-col address{ font-style: normal; font-size: .9rem; line-height: 2; }
.footer-col address a{ transition: color .2s var(--ease); }
.footer-col address a:hover{ color: var(--white); }
.footer-bottom{ border-top: 1px solid rgba(255,255,255,.08); padding: 22px 0; display: flex; justify-content: space-between; font-size: .8rem; flex-wrap: wrap; gap: 10px; }
.footer-bottom a{ transition: color .2s var(--ease); }
.footer-bottom a:hover{ color: var(--white); }

/* Page header (pagine interne) */
.page-header{ background: var(--navy); padding: calc(var(--nav-h) + 70px) 0 70px; }
.page-header .breadcrumb{ color: rgba(255,255,255,.5); font-size: .84rem; margin-top: 14px; }
.page-header h1{ color: var(--white); font-size: clamp(2rem,3.2vw,2.8rem); margin-top: 16px; }
.page-header p{ color: rgba(255,255,255,.6); margin-top: 14px; max-width: 580px; }

/* Service detail blocks (servizi.html) */
.service-detail{ padding: 90px 0; border-bottom: 1px solid var(--gray-200); }
.service-detail:last-child{ border-bottom: none; }
.service-detail-row{ display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.service-detail-row.reverse .sd-media{ order: 2; }
.sd-media{ position: relative; aspect-ratio: 4/3.2; border-radius: 10px; overflow: hidden; background: var(--navy); box-shadow: 0 24px 48px -24px rgba(16,24,40,.3); }
.sd-media img{ width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.sd-media:hover img{ transform: scale(1.04); }
.sd-content h2{ font-size: 1.75rem; margin: 14px 0 16px; }
.sd-list{ display: grid; gap: 12px; margin-top: 20px; }
.sd-list li{ display: flex; gap: 10px; font-size: .94rem; color: var(--gray-600); }
.sd-list li i{ color: var(--blue); margin-top: 4px; }

/* Valori (chi-siamo) */
.values-grid{ display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.value-card{
  padding: 34px 26px; background: var(--white); border: 1px solid var(--gray-200); border-radius: 12px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.value-card:hover{ transform: translateY(-6px); box-shadow: 0 24px 48px -20px rgba(16,24,40,.2); border-color: rgba(47,111,237,.35); }
.value-card i{ color: var(--blue); font-size: 1.4rem; margin-bottom: 16px; display: block; }
.value-card h3{ font-size: 1rem; margin-bottom: 10px; }
.value-card p{ font-size: .88rem; }

/* Contatti */
.contact-grid{ display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; }
.contact-info-card{ background: var(--navy); color: var(--white); padding: 44px 38px; border-radius: 10px; }
.contact-item{ display: flex; gap: 16px; margin-bottom: 26px; }
.contact-item .c-ico{ width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; color: var(--blue-light); flex-shrink: 0; }
.contact-item h4{ color: var(--white); font-size: .92rem; margin-bottom: 6px; }
.contact-item p, .contact-item a{ color: rgba(255,255,255,.62); font-size: .9rem; }
.form-card{ background: var(--gray-050); padding: 44px; border-radius: 10px; }
.form-label{ font-size: .8rem; font-weight: 700; color: var(--gray-600); margin-bottom: 8px; display: block; }
.form-row-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-control{ width: 100%; border: 1px solid var(--gray-200); background: var(--white); padding: 14px 16px; border-radius: 6px; font-size: .95rem; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.form-control:focus{ outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47,111,237,.12); }
textarea.form-control{ resize: vertical; min-height: 140px; }
.map-frame{ width: 100%; height: 320px; border: 0; border-radius: 10px; filter: grayscale(.3); }
.form-feedback{ font-size: .9rem; font-weight: 600; }

/* Back to top */
.back-to-top{
  position: fixed; bottom: 30px; right: 30px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--navy); color: var(--white); display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .3s var(--ease), visibility .3s var(--ease), background .2s var(--ease), transform .3s var(--ease);
  z-index: 900; border: 1px solid rgba(255,255,255,.12);
}
.back-to-top.is-visible{ opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover{ background: var(--blue); transform: translateY(-3px); }

/* Reveal on scroll (semplice, via JS toggling .is-visible), con ritardo a cascata opzionale */
.reveal{ opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }
.reveal.d1.is-visible{ transition-delay: .08s; }
.reveal.d2.is-visible{ transition-delay: .16s; }
.reveal.d3.is-visible{ transition-delay: .24s; }
.reveal.d4.is-visible{ transition-delay: .32s; }
.reveal.d5.is-visible{ transition-delay: .4s; }

/* Skip link (accessibilità tastiera) */
.skip-link{
  position: absolute; left: 12px; top: -60px; z-index: 2000; background: var(--blue); color: var(--white);
  padding: 12px 18px; border-radius: 6px; font-size: .85rem; font-weight: 700; transition: top .2s var(--ease);
}
.skip-link:focus{ top: 12px; }

/* Banner consenso cookie */
.cookie-banner{ position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; background: var(--navy); border-top: 1px solid rgba(255,255,255,.12); padding: 20px clamp(20px,4vw,40px); box-shadow: 0 -12px 32px -12px rgba(0,0,0,.4); }
.cookie-banner[hidden]{ display: none; }
.cookie-banner-inner{ max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cookie-banner-inner p{ color: rgba(255,255,255,.75); font-size: .85rem; line-height: 1.6; margin: 0; max-width: 700px; }
.cookie-banner-inner a{ color: var(--blue-light); text-decoration: underline; }
.cookie-banner-actions{ display: flex; gap: 12px; flex-shrink: 0; }
.cookie-banner-actions .btn{ padding: 10px 20px; font-size: .85rem; }
