:root {
  --blue: #003b82;
  --blue-dark: #002c63;
  --blue-soft: #eaf2ff;
  --red: #e51f2f;
  --red-dark: #bf1422;
  --text: #172033;
  --muted: #5f6b7a;
  --border: #dde5f0;
  --bg: #f6f9fd;
  --white: #ffffff;
  --shadow: 0 16px 40px rgba(0, 43, 99, 0.12);
  --radius: 20px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 190px;
  max-height: 64px;
  object-fit: contain;
}

.logo-fallback {
  display: grid;
  color: var(--blue);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 0.95;
}

.logo-fallback strong {
  color: var(--red);
  font-size: 1.25rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--blue-dark);
  text-transform: uppercase;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
  white-space: nowrap;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--red);
  transition: width 0.2s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.main-nav a.active {
  color: var(--red);
}

/* Home */

.hero {
  min-height: calc(100vh - 86px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 70% 30%, rgba(0, 59, 130, 0.13), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f4f8ff 55%, #ffffff 100%);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
  padding: 72px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.eyebrow.light {
  color: #ffffff;
  opacity: 0.88;
}

.hero h1 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.hero h1 span {
  display: block;
  color: var(--red);
}

.hero-text {
  max-width: 590px;
  margin: 28px 0 0;
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 900;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: var(--red);
  box-shadow: 0 14px 28px rgba(229, 31, 47, 0.24);
}

.btn-primary:hover {
  background: var(--red-dark);
}

.btn-secondary {
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 14px 28px rgba(0, 59, 130, 0.2);
}

.btn-secondary:hover {
  background: var(--blue-dark);
}

.btn-light {
  color: var(--blue);
  background: var(--white);
}

.btn-outline-light {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.75);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero-card {
  position: relative;
  min-height: 430px;
  padding: 24px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72)), url("/images/hero-tech.jpg");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(0, 59, 130, 0.12);
  box-shadow: var(--shadow);
}

.hero-card-top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  background: var(--white);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 43, 99, 0.08);
}

.status-dot {
  width: 10px;
  height: 10px;
  background: var(--red);
  border-radius: 999px;
}

.device-box {
  position: absolute;
  inset: auto 28px 34px 28px;
  min-height: 300px;
}

.screen {
  position: absolute;
  border: 12px solid #172033;
  background: linear-gradient(135deg, #0f7cff, #003b82 55%, #62c8ff);
  box-shadow: 0 24px 40px rgba(0, 30, 70, 0.2);
}

.screen.large {
  width: 62%;
  height: 220px;
  right: 8%;
  bottom: 40px;
  border-radius: 18px;
}

.screen.large::after {
  content: "";
  position: absolute;
  left: 35%;
  bottom: -42px;
  width: 30%;
  height: 30px;
  background: #172033;
  border-radius: 0 0 12px 12px;
}

.screen.small {
  width: 38%;
  height: 150px;
  left: 0;
  bottom: 8px;
  border-radius: 16px;
}

.printer {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34%;
  height: 110px;
  background: linear-gradient(180deg, #f5f7fb, #cfd7e4);
  border: 6px solid #26364f;
  border-radius: 16px;
  box-shadow: 0 20px 32px rgba(0, 30, 70, 0.18);
}

/* Info rapide */

.quick-info {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
}

.quick-item {
  display: flex;
  gap: 14px;
  min-height: 130px;
  padding: 26px 22px;
  background: var(--white);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.quick-item:hover {
  background: var(--blue-soft);
}

.quick-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--blue);
  border-radius: 999px;
}

.quick-item strong {
  color: var(--blue);
}

.quick-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Sezioni comuni */

.section {
  padding: 82px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading h2,
.managers-inner h2,
.cta-inner h2 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.section-heading p,
.managers-inner p,
.cta-inner p {
  color: var(--muted);
  font-size: 1.05rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.service-card {
  min-height: 280px;
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 43, 99, 0.06);
}

.card-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--white);
  border-radius: 50%;
  font-size: 1.35rem;
  margin-bottom: 22px;
}

.card-icon.blue {
  background: var(--blue);
}

.card-icon.red {
  background: var(--red);
}

.service-card h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 1.25rem;
}

.service-card p {
  margin: 0 0 20px;
  color: var(--muted);
}

.service-card a {
  color: var(--red);
  font-weight: 900;
}

/* Gestori in Home */

.managers-section {
  background: var(--bg);
}

.managers-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 48px;
}

.managers-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.managers-list span {
  display: grid;
  place-items: center;
  min-height: 86px;
  padding: 18px;
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(0, 43, 99, 0.06);
}

.managers-list span:nth-child(2),
.managers-list span:nth-child(4) {
  color: var(--red);
}

/* CTA */

.cta-section {
  padding: 72px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(135deg, var(--blue-dark), var(--blue));
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.cta-inner h2,
.cta-inner p {
  color: var(--white);
}

.cta-inner p {
  max-width: 650px;
  opacity: 0.86;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

/* Pagine interne */

.page-hero {
  padding: 86px 0 72px;
  background:
    radial-gradient(circle at 80% 20%, rgba(229, 31, 47, 0.08), transparent 28%),
    linear-gradient(135deg, #ffffff, #f4f8ff);
  border-bottom: 1px solid var(--border);
}

.page-hero-inner {
  max-width: 850px;
}

.page-hero h1 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.page-hero p:last-child {
  margin-top: 24px;
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 720px;
}

/* Pagina servizi */

.services-list {
  display: grid;
  gap: 22px;
}

.detail-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 43, 99, 0.06);
}

.detail-card h2 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.035em;
}

.detail-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.02rem;
}

.inline-link {
  color: var(--red);
  font-weight: 900;
}

.soft-section {
  background: var(--bg);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.value-grid article {
  padding: 28px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border-radius: var(--radius);
}

.value-grid strong {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.value-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

/* Pagina gestori */

.operator-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.operator-card {
  min-height: 190px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 43, 99, 0.06);
}

.operator-card p {
  margin: 18px 0 0;
  color: var(--muted);
}

.operator-name {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 950;
  background: var(--blue-soft);
}

.operator-name.tim {
  color: #003b82;
}

.operator-name.vodafone {
  color: #e60000;
}

.operator-name.windtre {
  color: #f28c00;
}

.operator-name.mobile {
  color: #e65a00;
}

.operator-name.iliad {
  color: #d41414;
}

.operator-name.eolo {
  color: #21a7d8;
}

.two-column {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.two-column h2 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.two-column p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.08rem;
}

/* Pagina contatti */

.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  align-items: stretch;
}

.contact-panel,
.map-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 43, 99, 0.06);
  overflow: hidden;
}

.contact-panel {
  padding: 32px;
}

.contact-panel h2 {
  margin: 0 0 24px;
  color: var(--blue);
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.contact-list {
  display: grid;
  gap: 14px;
}

.contact-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.contact-row:hover {
  background: var(--blue-soft);
  transform: translateY(-2px);
}

.contact-row span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
}

.contact-row strong {
  color: var(--blue);
}

.contact-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.map-panel iframe {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
  display: block;
}

/* Footer */

.site-footer {
  padding: 34px 0;
  color: var(--white);
  background: #001f47;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.site-footer p {
  margin: 6px 0;
  color: rgba(255, 255, 255, 0.78);
}

.site-footer a {
  color: var(--white);
  font-weight: 700;
}

/* Responsive tablet */

@media (max-width: 980px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 0;
    gap: 18px;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
    gap: 22px;
    padding-bottom: 4px;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 56px 0;
  }

  .hero-card {
    min-height: 360px;
  }

  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .managers-inner {
    grid-template-columns: 1fr;
  }

  .operator-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-column,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .map-panel iframe {
    min-height: 380px;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-actions {
    justify-content: flex-start;
  }
}

/* Responsive mobile */

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, var(--container));
  }

  .main-nav {
    font-size: 0.82rem;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-text {
    font-size: 1rem;
  }

  .hero-actions,
  .cta-actions {
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .hero-card {
    min-height: 300px;
    border-radius: 24px;
  }

  .hero-card-top {
    font-size: 0.78rem;
  }

  .screen.large {
    width: 68%;
    height: 160px;
  }

  .screen.small {
    width: 44%;
    height: 115px;
  }

  .printer {
    width: 40%;
    height: 85px;
  }

  .quick-grid,
  .cards-grid,
  .managers-list,
  .value-grid,
  .operator-grid {
    grid-template-columns: 1fr;
  }

  .quick-item {
    min-height: auto;
  }

  .service-card {
    min-height: auto;
  }

  .page-hero {
    padding: 56px 0;
  }

  .page-hero h1 {
    font-size: 2.6rem;
  }

  .page-hero p:last-child {
    font-size: 1rem;
  }

  .detail-card {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .contact-panel {
    padding: 22px;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }

  .map-panel iframe {
    min-height: 320px;
  }

  .footer-inner {
    flex-direction: column;
  }
}
