/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:    #e8232a;
  --blue:   #1e8fe0;
  --dark:   #1e2028;
  --darker: #181a21;
  --surface:#272b36;
  --border: #363b48;
  --text:   #e4e6ed;
  --muted:  #8a8f9e;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--dark);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
}

/* ── CARBON FIBRE TEXTURE (pure CSS) ──────────────────────── */
.carbon {
  background-color: var(--darker);
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,0.015) 0px,
      rgba(255,255,255,0.015) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(255,255,255,0.015) 0px,
      rgba(255,255,255,0.015) 1px,
      transparent 1px,
      transparent 4px
    );
}

/* ── NAVBAR ───────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 68px;
  background: rgba(45,48,58,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 38px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--red); }

.nav-socials {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-socials a {
  color: var(--muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.nav-socials a:hover { color: var(--blue); }

.nav-socials svg { width: 20px; height: 20px; fill: currentColor; }

/* ── HERO ─────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
  background:
    url('../images/background.jpeg')
    center center / cover no-repeat;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(12,14,18,0.72) 0%,
    rgba(12,14,18,0.55) 40%,
    rgba(12,14,18,0.80) 100%
  );
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,35,42,0.12) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-logo {
  position: relative;
  z-index: 1;
  width: min(600px, 90vw);
  height: auto;
  margin-bottom: 2rem;
  filter:
    drop-shadow(0 0 2px rgba(0,0,0,0.75))
    drop-shadow(0 0 6px rgba(0,0,0,0.65))
    drop-shadow(0 0 20px rgba(0,0,0,0.45))
    drop-shadow(0 0 40px rgba(30,143,224,0.35));
}

.hero-tagline {
  position: relative;
  z-index: 1;
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(0.8rem, 2vw, 1rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
}

.hero-headline {
  position: relative;
  z-index: 1;
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.hero-headline span { color: var(--red); }

.hero-sub {
  position: relative;
  z-index: 1;
  margin-top: 1.2rem;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
}

.hero-cta {
  position: relative;
  z-index: 1;
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover {
  background: #c41b21;
  box-shadow: 0 0 20px rgba(232,35,42,0.5);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}

.btn-outline:hover {
  background: rgba(30,143,224,0.1);
  box-shadow: 0 0 20px rgba(30,143,224,0.3);
}

/* ── SECTION SHARED ───────────────────────────────────────── */
section {
  padding: 6rem 2rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.accent-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--blue));
  margin-bottom: 2rem;
}

/* ── ABOUT ────────────────────────────────────────────────── */
#about {
  background: var(--surface);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  color: #aaa;
  margin-bottom: 1rem;
}

.about-text .btn {
  margin-top: 1rem;
  display: inline-block;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat-card {
  background: var(--darker);
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  padding: 1.5rem;
  text-align: center;
  border-radius: var(--radius);
}

.stat-card.blue {
  border-top-color: var(--blue);
}

.stat-number {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--red);
}

.stat-card.blue .stat-number {
  color: var(--blue);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.3rem;
}

/* ── SERVICES & PARTS GRID ────────────────────────────────── */
#servizi {
  background: var(--surface);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

#parts { background: var(--dark); }

.parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.part-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--blue);
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: transform 0.25s, box-shadow 0.25s;
}

.part-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(30,143,224,0.18);
}

.part-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #131620 0%, #1a1e30 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.part-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg,rgba(255,255,255,0.02) 0,rgba(255,255,255,0.02) 1px,transparent 1px,transparent 5px),
    repeating-linear-gradient(-45deg,rgba(255,255,255,0.02) 0,rgba(255,255,255,0.02) 1px,transparent 1px,transparent 5px);
}

.part-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.part-img-placeholder svg {
  width: 48px;
  height: 48px;
  fill: #333;
}

.part-body {
  padding: 1.25rem 1.5rem;
}

.part-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.part-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.part-tag {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid var(--blue);
  padding: 0.2rem 0.75rem;
  border-radius: 50px;
  background: rgba(30,143,224,0.06);
}

/* ── SPONSORS ─────────────────────────────────────────────── */
#sponsors {
  background: var(--surface);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sponsors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
}

.sponsors-intro {
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 2.5rem;
}

.sponsors-intro a { color: var(--blue); }

.sponsor-slot {
  width: 180px;
  height: 80px;
  background: var(--darker);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: border-color 0.2s;
  border-radius: var(--radius);
}

.sponsor-slot:hover { border-color: var(--muted); }

.sponsor-slot img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1) brightness(0.7);
  transition: filter 0.2s;
}

.sponsor-slot:hover img { filter: grayscale(0) brightness(1); }

/* ── CONTACT ──────────────────────────────────────────────── */
#contact { background: var(--dark); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.contact-social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.25s;
  border-radius: 50px;
}

.social-link svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

.social-link:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(30,143,224,0.06);
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

input, textarea, select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1.1rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,143,224,0.12);
}

input::placeholder, textarea::placeholder { color: #444; }

textarea { resize: vertical; min-height: 130px; }

.form-submit { align-self: flex-start; }

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  background: var(--darker);
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo img { height: 36px; }

.footer-copy {
  font-size: 0.8rem;
  color: #444;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  color: #444;
  transition: color 0.2s;
}

.footer-socials a:hover { color: var(--blue); }

.footer-socials svg { width: 18px; height: 18px; fill: currentColor; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  nav { padding: 0 1.2rem; }
  .nav-links { display: none; }

  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

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

  .footer-inner { flex-direction: column; text-align: center; }
}
