/* ============================================
   Average Joe BBQ Team — Onepage
   ============================================ */

:root {
  --rosso: #c42e2e;
  --rosso-scuro: #9a1f1f;
  --blu-navy: #1b2d55;
  --beige: #d4a574;
  --crema: #f5e6d3;
  --nero-caldo: #0f0d0a;
  --scuro: #1a1411;
  --scuro-2: #221a15;
  --testo-chiaro: #f5e6d3;
  --testo-medio: #c9b89a;
  --testo-scuro: #1a1411;

  --font-display: 'Rye', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1100px;
  --section-padding-y: clamp(4rem, 8vw, 7rem);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--testo-chiaro);
  background-color: var(--nero-caldo);
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  position: relative;
  background: linear-gradient(180deg, #5a5854 0%, #6b6968 35%, #6b6968 65%, #2a1f18 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  animation: fadeInUp 1.2s ease both;
  max-width: 1000px;
  width: 100%;
}

.hero-image {
  max-width: min(900px, 94vw);
  width: 100%;
  margin: 0 auto;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.4));
}

.hero-tagline {
  margin-top: 2rem;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(245, 230, 211, 0.85);
  font-weight: 500;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--beige);
  text-decoration: none;
  font-size: 1.2rem;
  opacity: 0.6;
  animation: bounce 2s infinite;
  transition: opacity 0.2s;
}

.scroll-hint:hover {
  opacity: 1;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* ============================================
   SECTIONS GENERICHE
   ============================================ */
.section {
  padding: var(--section-padding-y) 1.5rem;
}

.section-dark {
  background-color: var(--scuro);
}

.section-darker {
  background-color: var(--nero-caldo);
}

.section-cream {
  background-color: var(--crema);
  color: var(--testo-scuro);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ============================================
   TIPOGRAFIA
   ============================================ */
h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin-bottom: 2.5rem;
  color: var(--testo-chiaro);
  letter-spacing: 0.01em;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--rosso);
  margin-top: 0.75rem;
  border-radius: 2px;
}

.section-cream h2 {
  color: var(--testo-scuro);
}

h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  margin: 2.5rem 0 1.25rem;
  color: var(--beige);
}

.section-cream h3 {
  color: var(--rosso-scuro);
}

p {
  margin-bottom: 1.25rem;
  max-width: 75ch;
}

strong {
  color: var(--beige);
  font-weight: 600;
}

.section-cream strong {
  color: var(--rosso-scuro);
}

/* ============================================
   CHI SIAMO — Pilastri
   ============================================ */
.pilastri {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.pilastri li {
  background-color: rgba(212, 165, 116, 0.06);
  border-left: 3px solid var(--rosso);
  padding: 1.5rem 1.5rem;
  border-radius: 0 8px 8px 0;
  line-height: 1.55;
}

.pilastri li strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

/* ============================================
   CHI SIAMO — Layout testo + foto
   ============================================ */
.chi-siamo-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 1rem;
}

.chi-siamo-text {
  min-width: 0;
}

.chi-siamo-text p:last-child {
  margin-bottom: 0;
}

.chi-siamo-photo {
  position: sticky;
  top: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 165, 116, 0.15);
}

.chi-siamo-photo img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.chi-siamo-photo:hover img {
  transform: scale(1.02);
}

/* legacy class for future use */
.section-photo {
  margin-top: 3.5rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 165, 116, 0.15);
}

.section-photo img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.section-photo:hover img {
  transform: scale(1.02);
}

/* ============================================
   PALMARES
   ============================================ */
.palmares-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}

.palmares-text {
  min-width: 0;
}

.palmares-photo {
  position: sticky;
  top: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 165, 116, 0.15);
}

.palmares-photo img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.palmares-photo:hover img {
  transform: scale(1.02);
}

.stagione {
  margin-bottom: 3rem;
}

.stagione:last-child {
  margin-bottom: 0;
}

.stagione h3 {
  margin-top: 0;
}

.in-corso {
  font-family: var(--font-body);
  font-size: 0.7em;
  color: var(--testo-medio);
  font-weight: 400;
  letter-spacing: 0;
}

.achievements {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.achievements li {
  padding: 1rem 1.25rem;
  background-color: rgba(245, 230, 211, 0.04);
  border-left: 3px solid var(--beige);
  border-radius: 0 6px 6px 0;
  line-height: 1.55;
}

.achievement-headline {
  color: var(--rosso);
  font-weight: 600;
}

/* ============================================
   COSA FACCIAMO
   ============================================ */
.cosa-block {
  margin-bottom: 3.5rem;
}

.cosa-block:last-child {
  margin-bottom: 0;
}

.cosa-block h3 {
  margin-top: 0;
}

.cosa-block a {
  color: var(--rosso);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.cosa-block a:hover {
  color: var(--beige);
}

.cosa-block.with-photo {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  align-items: center;
}

.cosa-block.with-photo.reversed {
  grid-template-columns: 1.3fr 1fr;
}

.cosa-photo {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 165, 116, 0.15);
  align-self: stretch;
}

.cosa-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.cosa-photo:hover img {
  transform: scale(1.03);
}

.cosa-text {
  min-width: 0;
}

/* ============================================
   SPONSOR
   ============================================ */
.manifesto {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 3rem;
  max-width: 75ch;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
}

.sponsor-card {
  background-color: #fff;
  border-radius: 10px;
  padding: 1.5rem 1rem;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(26, 20, 17, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sponsor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(26, 20, 17, 0.12);
}

.sponsor-card img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ============================================
   FOOTER / CONTATTI
   ============================================ */
.footer {
  background-color: #060503;
  padding: var(--section-padding-y) 1.5rem 3rem;
  text-align: center;
  border-top: 1px solid rgba(212, 165, 116, 0.15);
}

.footer h2 {
  display: block;
  margin-bottom: 1.5rem;
}

.footer-intro {
  color: var(--testo-medio);
  max-width: 60ch;
  margin: 0 auto 2.5rem;
}

.email-link {
  display: inline-block;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  color: var(--beige);
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border: 2px solid var(--beige);
  border-radius: 999px;
  transition: background-color 0.25s, color 0.25s;
  margin-bottom: 2.5rem;
}

.email-link:hover {
  background-color: var(--beige);
  color: var(--nero-caldo);
}

.socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.socials a {
  color: var(--testo-medio);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.9rem;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.socials a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--rosso);
  transition: width 0.25s;
}

.socials a:hover {
  color: var(--testo-chiaro);
}

.socials a:hover::after {
  width: 100%;
}

.copyright {
  font-size: 0.85rem;
  color: rgba(245, 230, 211, 0.4);
  letter-spacing: 0.03em;
  margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .chi-siamo-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .chi-siamo-photo {
    position: static;
    max-width: 500px;
    margin: 0 auto;
  }

  .palmares-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .palmares-photo {
    position: static;
    max-width: 500px;
    margin: 0 auto;
  }

  .cosa-block.with-photo,
  .cosa-block.with-photo.reversed {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cosa-block.with-photo.reversed .cosa-photo {
    order: -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .section {
    padding: 4rem 1.25rem;
  }

  .pilastri {
    grid-template-columns: 1fr;
  }

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

  .sponsor-card {
    height: 110px;
    padding: 1rem 0.75rem;
  }

  .socials {
    gap: 1.5rem;
  }

  .section-photo {
    margin-top: 2.5rem;
  }
}

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