:root {
  --color-primary: #0b2f4e;    /* blu principale */
  --color-primary-light: #12426e;
  --color-accent: #f7931d;     /* arancione */
  --color-bg: #f5f6fa;
  --color-text: #222222;
  --color-muted: #6b7280;
  --radius-lg: 14px;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.12);
  --max-width: 1120px;
}

/* RESET BASE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--color-text);
  background-color: #ffffff;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* LAYOUT GENERALE */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text span:first-child {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.logo-text span:last-child {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--color-muted);
  letter-spacing: 0.12em;
}

/* NAV */
nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  font-size: 0.9rem;
}

nav a {
  color: var(--color-muted);
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
}

nav a:hover,
nav a:focus {
  color: var(--color-primary);
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width 0.2s ease-out;
}

nav a:hover::after,
nav a:focus::after {
  width: 100%;
}

/* LINK ATTIVO */
nav a.active {
  color: var(--color-primary) !important;
  font-weight: 600;
}

nav a.active::after {
  width: 100%;
}

/* BOTTONI HEADER */
.btn-header {
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: none;
  background-color: var(--color-accent);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(247, 147, 29, 0.35);
}

.btn-header:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* HERO */
.hero {
  background: radial-gradient(circle at top left, #173b63 0, #071829 55%);
  color: #ffffff;
  padding: 3.5rem 0 3rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: #9fb4d8;
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.hero h1 {
  font-size: 2.3rem;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 0.98rem;
  color: #c7d5eb;
  max-width: 32rem;
  margin-bottom: 1.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn-primary {
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: none;
  background-color: var(--color-accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(247, 147, 29, 0.4);
}

.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-secondary {
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid #375b83;
  background: transparent;
  color: #e0e8f5;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
}

.hero-note {
  margin-top: 1.2rem;
  font-size: 0.8rem;
  color: #9fb4d8;
}

/* HERO CARD */
.hero-card {
  background-color: #0e365c;
  border-radius: 18px;
  padding: 1.6rem 1.4rem;
  box-shadow: 0 18px 45px rgba(3, 7, 18, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.hero-card-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9fb4d8;
  margin-bottom: 0.75rem;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  margin-bottom: 1.2rem;
}

.metric h3 {
  font-size: 1.6rem;
  margin-bottom: 0.15rem;
}

.metric span {
  font-size: 0.8rem;
  color: #c7d5eb;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.hero-tag {
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e0e8f5;
}

/* SEZIONI GENERALI */
section {
  padding: 3.2rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.section-header h2 {
  font-size: 1.5rem;
}

.section-header p {
  font-size: 0.9rem;
  color: var(--color-muted);
  max-width: 28rem;
}

/* SERVIZI */
.services {
  background-color: var(--color-bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.service-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 180px;
}

.service-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(11, 47, 78, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 0.3rem;
}

.service-card h3 {
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.service-card p {
  font-size: 0.86rem;
  color: var(--color-muted);
  flex: 1;
}

.service-link {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-primary);
}

/* TECNOLOGIE */
.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tech-badge {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  font-size: 0.86rem;
  background-color: #ffffff;
}

/* PORTFOLIO PREVIEW */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
}

.project-card {
  border-radius: var(--radius-lg);
  border: 1px solid #e5e7eb;
  padding: 1.1rem 1.1rem 1.2rem;
  background-color: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.project-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-muted);
}

.project-card h3 {
  font-size: 0.98rem;
}

.project-card p {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* CHI SIAMO / ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.3rem;
  align-items: center;
}

.about-grid p {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 0.7rem;
}

.about-highlight {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.3rem;
  font-size: 0.86rem;
}

.about-pill {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background-color: var(--color-bg);
}

.about-panel {
  border-radius: var(--radius-lg);
  border: 1px solid #e5e7eb;
  padding: 1.2rem 1.3rem;
  background-color: #ffffff;
  box-shadow: var(--shadow-soft);
  font-size: 0.86rem;
  color: var(--color-muted);
}

/* CTA CONTATTI / COLLABORAZIONI */
.cta {
  background: linear-gradient(135deg, #0b2f4e, #12426e);
  color: #ffffff;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.cta-inner h2 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.cta-inner p {
  font-size: 0.9rem;
  color: #e0e8f5;
  max-width: 26rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn-ghost-light {
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.65);
  background: transparent;
  color: #e0e8f5;
  font-size: 0.9rem;
  cursor: pointer;
}

/* FOOTER */
footer {
  background-color: #020617;
  color: #cbd5f5;
  padding: 2.5rem 0 1.6rem;
  font-size: 0.8rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr;
  gap: 2rem;
  margin-bottom: 1.6rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.footer-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background-color: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.footer-logo-text {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.footer-col h4 {
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-col a {
  color: #e5e7eb;
}

.footer-col a:hover {
  color: #fbbf24;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  color: #9ca3af;
}

.footer-bottom span {
  display: block;
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    margin-top: 1.8rem;
  }

  .services-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  nav ul {
    display: none; /* nav semplificata su mobile (da migliorare con burger se vuoi) */
  }
}

@media (max-width: 720px) {
  .services-grid,
  .portfolio-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-top: 2.4rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }
}
