/* =========================================================
   PredestinatoNew — Brand Stylesheet (CONDIVISO)
   Contiene SOLO i componenti usati da più pagine:
   reset, variabili, navbar, footer, tipografia, bottoni,
   .section / .page-header, scroll reveal.
   Per gli stili specifici di una singola pagina vedi
   css/<nome-pagina>.css (es. css/index.css, css/progetti.css...)

   Palette:  --race-red #E10600 | --black #0A0A0A | --white #FFFFFF
             --carbon #161616 | --carbon-2 #1F1F1F | --steel #8A8A8A
   Type:     Display -> 'Oswald' (condensed, racing-plate feel)
             Body    -> 'Inter'
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=Roboto+Mono:wght@500&display=swap');

:root {
  --race-red: #E10600;
  --race-red-dark: #A30400;
  --black: #0A0A0A;
  --carbon: #161616;
  --carbon-2: #1F1F1F;
  --carbon-3: #2A2A2A;
  --white: #FFFFFF;
  --steel: #9A9A9A;
  --steel-dim: #6B6B6B;

  --font-display: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Roboto Mono', monospace;

  --container: 1180px;
  --nav-h: 76px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--race-red);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =========================================================
   NAVBAR (condivisa — usata in tutte le pagine)
========================================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--carbon-2);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

* .nav-brand-name {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.05rem;
  color: var(--steel);
}

.nav-brand img {
  height: 38px;
  width: 38px;
  object-fit: contain;
}

.nav-brand .new {
  color: var(--race-red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  position: relative;
  display: inline-block;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  transition: color .2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  background: var(--race-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

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

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a.active {
  color: var(--white);
}

.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  display: block;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--black);
    border-bottom: 1px solid var(--carbon-2);
    padding: 8px 20px 20px;
    gap: 0;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--carbon-2);
  }

  .nav-links a::after {
    display: none;
  }
}

/* =========================================================
   TYPOGRAPHY HELPERS (condivisi)
========================================================= */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--race-red);
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--race-red);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin-bottom: 14px;
}

.section-head {
  margin-bottom: 48px;
}

.section {
  padding: 96px 0;
  border-bottom: 1px solid var(--carbon-2);
}

.text-red {
  color: var(--race-red);
}

.text-steel {
  color: var(--steel);
}

/* =========================================================
   BUTTONS (condivisi)
========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.btn-primary {
  background: var(--race-red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--white);
  color: var(--black);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--carbon-3);
  color: var(--white);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--race-red);
  color: var(--race-red);
  transform: translateY(-2px);
}

/* =========================================================
   PAGE HEADER — usata da progetti, chi-sono, contatti
========================================================= */
.page-header {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--carbon-2);
  background:
    radial-gradient(ellipse at top left, rgba(225, 6, 0, 0.12), transparent 60%),
    var(--black);
}

.page-header h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin-bottom: 12px;
}

.page-header p {
  color: var(--steel);
  max-width: 600px;
}

/* =========================================================
   FOOTER (condiviso — usato in tutte le pagine)
========================================================= */
footer {
  padding: 36px 0;
  background: var(--black);
}

footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--steel);
}

.footer-brand .new {
  color: var(--race-red);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--steel-dim);
  font-size: 0.85rem;
  transition: color .2s ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-social {
  display: flex;
  gap: 14px;
}

.footer-social a {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--carbon-2);
  color: var(--steel);
  transition: border-color .2s ease, color .2s ease;
}

.footer-social a:hover {
  border-color: var(--race-red);
  color: var(--race-red);
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

/* =========================================================
   SCROLL REVEAL (condiviso)
========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}