/* ===== VARIABILI ===== */
:root {
  --mac-red: #EE3225;
  --text: #1a1a1a;
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
}

/* ===== RESET / BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Fustat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.65;
  text-align: center;
  font-size: clamp(16px, 1.5vw, 18px);
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

/* ===== TITOLI ===== */
.kicker-header {
  margin-bottom: 18px;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  color: #111;
}

.section-title {
  margin-bottom: 36px;
  color: #222;
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 28px);
}

/* ===== HEADER ===== */
.header {
  background: var(--bg-soft);
  padding: 24px 0 10px;
}

.logo {
  max-width: 200px;
  margin: 0 auto;
}

/* ===== HERO ===== */
.hero {
  background: var(--bg-soft);
  padding: 40px 0;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.hero-text {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.lead {
  color: var(--text);
  font-weight: 400;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.7;
}

.hero-image-wrapper {
  display: flex;
  justify-content: center;
}

.hero-image {
  width: 80%;
  max-width: 460px;
  height: auto;
}

/* ===== COUNTRIES ===== */
.countries {
  background: var(--bg);
  padding: 60px 0;
}

.country-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 12px 24px;
  max-width: 900px;
  justify-content: center;
  text-align: center;
}

.country-list li {
  white-space: nowrap;
  line-height: 1.6;
  color: var(--text);
}

/* ===== FOOTER ===== */
.footer {
  width: 100%;
  background: var(--bg-soft);
  padding: 60px 0 36px;
  text-align: center;
}

.footer-logo {
  max-width: 160px;
  margin: 0 auto 12px;
}

.footer p {
  font-size: 1rem;
  font-weight: 400;
  color: #2b2b2b;
  margin: 6px 0;
}

.footer-link {
  color: #2b2b2b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--mac-red);
}

/* ===== MEDIA QUERIES ===== */
@media (min-width: 768px) {
  .country-list {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
}

@media (min-width: 1024px) {
  .hero-grid {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
  }

  .hero-text {
    flex: 1;
    text-align: left;
    padding-top: 60px;
  }

  .kicker-header {
    text-align: left;
  }

  .hero-image-wrapper {
    flex: 1;
    justify-content: flex-end;
  }

  .hero-image {
    max-width: 420px;
  }

  .country-list {
    grid-auto-flow: column;
    grid-template-rows: repeat(6, auto);
    grid-auto-columns: minmax(140px, 1fr);
    gap: 10px 40px;
    justify-content: center;
    text-align: center;
  }
}

@media (min-width: 1440px) {
  .hero-image {
    max-width: 500px;
  }
}

/* ===== ACCESSIBILITÀ ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.user-is-tabbing a:focus,
.user-is-tabbing button:focus {
  outline: 2px solid var(--mac-red);
  outline-offset: 2px;
}

/* migliora la distribuzione delle righe */
.kicker-header,
.section-title { text-wrap: balance; }    /* ottimo su Chrome/Edge/Safari moderni */
.lead { text-wrap: pretty; }              /* rende i ritorni a capo più “gradevoli” */

/* controlli di riga */
.nowrap { white-space: nowrap; }          /* evita che le due parole si separino */
.only-desktop { display: none; }          /* un <br> che compare solo su desktop */
@media (min-width: 768px) {
  .only-desktop { display: inline; }
}
