/* ============================================================
   TIRRENA HOSTING — design tokens
   Palette: navy #00007E (brand), navy-deep #050524 (dark bg),
   orange #FF5500 (accent), cloud #F6F7FB (light bg)
   Type: Space Grotesk (display) / Inter (body) / JetBrains Mono (data)
   ============================================================ */

:root{
  --navy: #00007E;
  --navy-deep: #050524;
  --navy-deep-2: #0A0A3A;
  --orange: #FF5500;
  --orange-light: #FF8A3D;
  --cloud: #F6F7FB;
  --white: #FFFFFF;
  --ink: #12132B;
  --slate: #5B5E76;
  --slate-light: #9A9CB5;
  --line: rgba(0,0,126,0.10);
  --line-dark: rgba(255,255,255,0.12);
  --success: #1FB57A;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-lg: 0 24px 60px -20px rgba(0,0,126,0.35);
  --shadow-sm: 0 8px 20px -8px rgba(0,0,126,0.18);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1, h2, h3, h4{
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 0.5em;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

p{ margin: 0 0 1em; color: var(--slate); }
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }
ul{ margin: 0; padding: 0; list-style: none; }
button{ font-family: inherit; cursor: pointer; }

.wrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

:focus-visible{
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.text-orange{ color: var(--orange); }
.text-white{ color: var(--white); }
.text-light{ color: rgba(255,255,255,0.72); }

/* ============ BUTTONS ============ */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn-primary{
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 10px 24px -8px rgba(255,85,0,0.55);
}
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(255,85,0,0.6); }
.btn-ghost{
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
.btn-ghost:hover{ border-color: var(--navy); }
.btn-outline-light{
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.btn-outline-light:hover{ border-color: var(--white); background: rgba(255,255,255,0.06); }
.btn-lg{ padding: 15px 32px; font-size: 1rem; }
.btn-sm{ padding: 10px 20px; font-size: 0.88rem; }
.btn-block{ width: 100%; }

/* ============ HEADER ============ */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.site-header.scrolled{
  border-bottom-color: var(--line);
  background: rgba(255,255,255,0.96);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 24px;
}
.brand-logo{ height: 46px; width: auto; }
.main-nav{
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--navy);
}
.main-nav a{ position: relative; padding: 4px 0; }
.main-nav a::after{
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width 0.2s ease;
}
.main-nav a:hover::after{ width: 100%; }
.header-actions{ display: flex; align-items: center; gap: 20px; }
.header-phone{
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--navy);
}
.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.nav-toggle span{ width: 24px; height: 2px; background: var(--navy); border-radius: 2px; }

/* ============ HERO ============ */
.hero{
  position: relative;
  background: var(--navy-deep);
  overflow: hidden;
  padding: 90px 0 70px;
}
.hero-bg{ position: absolute; inset: 0; z-index: 0; }
.hero-grid{
  position: absolute; inset: -1px;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 60% at 30% 30%, black 40%, transparent 90%);
}
.hero-glow{
  position: absolute;
  top: -10%; right: -10%;
  width: 60%; height: 80%;
  background: radial-gradient(circle, rgba(255,85,0,0.20) 0%, transparent 65%);
  filter: blur(20px);
}
.hero-inner{
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin: 0 0 20px;
}
.eyebrow-dot{
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(255,85,0,0.6);
  animation: dotpulse 2s infinite;
}
@keyframes dotpulse{
  0%{ box-shadow: 0 0 0 0 rgba(255,85,0,0.55); }
  70%{ box-shadow: 0 0 0 8px rgba(255,85,0,0); }
  100%{ box-shadow: 0 0 0 0 rgba(255,85,0,0); }
}
.hero h1{
  color: var(--white);
  font-size: clamp(2.1rem, 3.6vw, 3.1rem);
  margin-bottom: 22px;
}
.hero-lead{
  color: rgba(255,255,255,0.68);
  font-size: 1.05rem;
  max-width: 52ch;
  margin-bottom: 32px;
}
.hero-ctas{ display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 44px; }
.hero .btn-ghost{ color: var(--white); border-color: rgba(255,255,255,0.3); }
.hero .btn-ghost:hover{ border-color: var(--white); background: rgba(255,255,255,0.06); }

.hero-trust{ display: flex; gap: 36px; flex-wrap: wrap; }
.trust-item{ display: flex; flex-direction: column; }
.trust-item strong{
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--white);
}
.trust-item span{
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  font-family: var(--font-mono);
}

/* ---- rack visual ---- */
.hero-rack{ position: relative; z-index: 1; }
.rack-frame{
  background: linear-gradient(180deg, #0C0C3D, #070722);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.05);
}
.rack-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px 16px;
  border-bottom: 1px dashed rgba(255,255,255,0.12);
  margin-bottom: 14px;
}
.rack-label{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.03em;
}
.rack-status{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pulse{
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  animation: dotpulse2 1.8s infinite;
}
@keyframes dotpulse2{
  0%{ box-shadow: 0 0 0 0 rgba(31,181,122,0.55); }
  70%{ box-shadow: 0 0 0 7px rgba(31,181,122,0); }
  100%{ box-shadow: 0 0 0 0 rgba(31,181,122,0); }
}
.rack-units{ display: flex; flex-direction: column; gap: 10px; }
.rack-unit{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 13px 16px;
  transition: background 0.4s ease, border-color 0.4s ease;
}
.rack-unit.is-active{
  background: rgba(255,85,0,0.08);
  border-color: rgba(255,85,0,0.35);
}
.ru-led{
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.rack-unit.is-active .ru-led{
  background: var(--orange);
  box-shadow: 0 0 10px 2px rgba(255,85,0,0.7);
}
.ru-label{
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.01em;
  grid-row: 1;
}
.ru-meter{
  grid-column: 2;
  grid-row: 2;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}
.ru-meter span{
  display: block;
  height: 100%;
  width: 18%;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  transition: width 0.6s ease, background 0.4s ease;
}
.rack-unit.is-active .ru-meter span{
  width: 92%;
  background: var(--orange);
}
.ru-read{
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  text-align: right;
  transition: color 0.4s ease;
  white-space: nowrap;
}
.rack-unit.is-active .ru-read{ color: var(--orange-light); }
.rack-footer{
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px dashed rgba(255,255,255,0.12);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
}

/* ============ TICKER ============ */
.ticker{
  background: var(--orange);
  overflow: hidden;
  padding: 12px 0;
  white-space: nowrap;
}
.ticker-track{
  display: inline-flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(5,5,36,0.85);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  animation: ticker-scroll 32s linear infinite;
}
@keyframes ticker-scroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

/* ============ SECTIONS ============ */
.section{ padding: 96px 0; }
.section-dark{
  background: var(--navy-deep);
  position: relative;
  overflow: hidden;
}
.dark-grid{
  position: absolute; inset: -1px;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 70% 70% at 70% 20%, black 30%, transparent 85%);
}
.section-eyebrow{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
  font-weight: 600;
}
.eyebrow-light{ color: var(--orange-light); }
.section-title{
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  max-width: 20ch;
}
.section-lead{
  font-size: 1.05rem;
  max-width: 62ch;
  margin-bottom: 52px;
}

/* ============ SERVICES ============ */
.services-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.service-card{
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  scroll-margin-top: 100px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(0,0,126,0.2);
}
.sc-head{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.sc-tag{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--white);
  background: var(--navy);
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}
.sc-head h3{ margin: 0; font-size: 1.3rem; }
.service-card p{ margin-bottom: 18px; }
.sc-features{ margin-bottom: 22px; }
.sc-features li{
  position: relative;
  padding-left: 22px;
  margin-bottom: 9px;
  font-size: 0.92rem;
  color: var(--ink);
}
.sc-features li::before{
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--orange);
}
.sc-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
  transition: gap 0.2s ease, color 0.2s ease;
}
.sc-link:hover{ gap: 12px; color: var(--orange); }

/* ============ WHY GRID ============ */
.why-grid{
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 56px;
}
.why-card{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.why-icon{
  color: var(--orange);
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.why-card h3{
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.why-card p{
  color: rgba(255,255,255,0.6);
  font-size: 0.92rem;
  margin: 0;
}

.dashboard-teaser{
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  background: rgba(255,85,0,0.08);
  border: 1px solid rgba(255,85,0,0.25);
  border-radius: var(--radius);
  padding: 32px 36px;
}
.dt-copy h3{ color: var(--white); font-size: 1.15rem; margin-bottom: 8px; }
.dt-copy p{ color: rgba(255,255,255,0.6); margin: 0; max-width: 46ch; }

/* ============ CONTATTI ============ */
.contatti-wrap{
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: start;
}
.contact-details{ margin-top: 36px; display: flex; flex-direction: column; gap: 20px; }
.contact-line{ display: flex; flex-direction: column; gap: 2px; }
.cl-label{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-light);
}
.cl-value{ font-weight: 600; color: var(--navy); font-size: 1.02rem; }
a.contact-line:hover .cl-value{ color: var(--orange); }

.contact-form{
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
}
.form-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-group{ margin-bottom: 18px; }
.form-group label{
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
}
.form-group input,
.form-group select,
.form-group textarea{
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255,85,0,0.12);
  outline: none;
}
.form-group textarea{ resize: vertical; min-height: 100px; }
.captcha-group input{ max-width: 140px; }
.form-note{
  margin: 14px 0 0;
  font-size: 0.88rem;
  min-height: 1.2em;
}
.form-note.success{ color: var(--success); }
.form-note.error{ color: var(--orange); }

/* honeypot: visually hidden but not display:none */
.hp-field{
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ============ FOOTER ============ */
.site-footer{
  background: var(--navy-deep);
  padding-top: 72px;
}
.footer-grid{
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}
.footer-icon{ height: 52px; width: auto; margin-bottom: 18px; }
.footer-tagline{
  color: rgba(255,255,255,0.55);
  font-size: 0.92rem;
  max-width: 32ch;
  margin-bottom: 24px;
}
.footer-family span{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 10px;
}
.family-links{ display: flex; flex-direction: column; gap: 7px; }
.family-links a{
  font-size: 0.86rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.18s ease;
}
.family-links a:hover{ color: var(--orange-light); }

.footer-legal h4, .footer-nav h4{
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}
.footer-legal p{
  color: rgba(255,255,255,0.55);
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.footer-legal strong{ color: rgba(255,255,255,0.85); font-weight: 600; }
.footer-nav{ display: flex; flex-direction: column; }
.footer-nav a{
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-bottom: 12px;
  transition: color 0.18s ease;
}
.footer-nav a:hover{ color: var(--orange-light); }

.footer-bottom{ border-top: 1px solid rgba(255,255,255,0.08); }
.footer-bottom-inner{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 28px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  font-family: var(--font-mono);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px){
  .hero-inner{ grid-template-columns: 1fr; }
  .hero-rack{ order: -1; }
  .services-grid{ grid-template-columns: 1fr; }
  .why-grid{ grid-template-columns: 1fr 1fr; }
  .contatti-wrap{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .footer-brand{ grid-column: 1 / -1; }
}
@media (max-width: 720px){
  .main-nav, .header-actions{ display: none; }
  .nav-toggle{ display: flex; }
  .site-header.nav-open .main-nav{
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    padding: 20px 28px;
    border-bottom: 1px solid var(--line);
    gap: 16px;
  }
  .site-header.nav-open .header-actions{
    display: flex;
    position: absolute;
    top: calc(100% + 220px);
    left: 0; right: 0;
    background: var(--white);
    padding: 0 28px 20px;
    flex-direction: column;
    align-items: stretch;
  }
  .hero{ padding: 60px 0 40px; }
  .why-grid{ grid-template-columns: 1fr; }
  .form-row{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; gap: 36px; }
  .dashboard-teaser{ flex-direction: column; align-items: flex-start; }
}
