/* =====================================================
   PORTFOLIO ENZO FERRARI — style.css
   Palette : rouge #CC0000 · blanc #FFFFFF · noir #0A0A0A
   Fonts   : Bebas Neue (titres) · IM Fell English (citations) · Inter (corps)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=IM+Fell+English:ital@0;1&family=Inter:wght@300;400;500;600&display=swap');

/* ── Variables ───────────────────────────────────────── */
:root {
  --noir:       #0A0A0A;
  --noir-2:     #111111;
  --anthracite: #1A1A1A;
  --rouge:      #CC0000;
  --blanc:      #FFFFFF;
  --texte:      #F0EEE8;
  --texte-dim:  #777777;
  --border:     rgba(255,255,255,0.07);
  --font-title:  'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-body:   'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-quote:  'IM Fell English', Georgia, serif;
  --transition:  0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --jaune:      #FFC107;

  --tl-date-w: 90px;
  --tl-gap:    28px;
  --tl-dot-x:  calc(var(--tl-date-w) + var(--tl-gap));
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--noir);
  color: var(--texte);
  font-family: var(--font-body);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: var(--rouge); }

/* ── Carbon texture ──────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.012) 2px, rgba(255,255,255,0.012) 4px),
    repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(255,255,255,0.012) 2px, rgba(255,255,255,0.012) 4px);
  pointer-events: none; z-index: 0;
}

/* ── Photo placeholders ──────────────────────────────── */
.photo-placeholder {
  display: block; width: 100%;
  background: var(--anthracite);
  border: 1px solid rgba(204,0,0,0.15);
  position: relative; object-fit: cover; font-size: 0;
}
.photo-placeholder::before {
  content: attr(data-description);
  display: flex; align-items: center; justify-content: center;
  text-align: center; position: absolute; inset: 0;
  font-family: var(--font-body); font-size: 0.72rem;
  color: rgba(255,255,255,0.22); padding: 1rem;
  background: linear-gradient(135deg, var(--anthracite), #0d0d0d);
}
.ratio-4-3  { aspect-ratio: 4/3; }
.ratio-3-4  { aspect-ratio: 3/4; }
.ratio-16-9 { aspect-ratio: 16/9; }
.ratio-1-1  { aspect-ratio: 1; }

/* ── Navigation ──────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 4rem;
  transition: background var(--transition), padding var(--transition);
}
.nav.scrolled {
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(16px);
  padding: 1rem 4rem;
  border-bottom: 1px solid rgba(204,0,0,0.15);
}
.nav-logo {
  font-family: var(--font-title);
  font-size: 1.3rem; letter-spacing: .25em;
  color: var(--blanc); text-transform: uppercase;
  display: flex; align-items: center; gap: 0.65rem;
}
.nav-logo span { color: var(--rouge); }
.nav-shield { height: 34px; width: auto; flex-shrink: 0; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-family: var(--font-body); font-weight: 500;
  font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--texte-dim);
  transition: color .3s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--rouge); transition: width .3s;
}
.nav-links a:hover { color: var(--blanc); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--blanc); }
.nav-cta {
  color: var(--rouge) !important; border: 1px solid rgba(204,0,0,0.5);
  padding: .45rem 1.1rem; transition: background .3s, color .3s !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--rouge) !important; color: #fff !important; }

/* ── Reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(36px);
  transition: opacity .75s ease, transform .75s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }
.reveal-d5 { transition-delay: .5s; }

/* ── Layout ──────────────────────────────────────────── */
.section { position: relative; z-index: 1; padding: 8rem 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 4rem; }
.section-label {
  font-family: var(--font-body); font-weight: 500;
  font-size: .68rem; letter-spacing: .5em; text-transform: uppercase;
  color: var(--rouge); margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 1rem;
}
.section-label::before { content: ''; width: 28px; height: 1px; background: var(--jaune); }
.section-title {
  font-family: var(--font-title);
  font-size: clamp(3.5rem,7vw,7rem); line-height: .88;
  color: var(--texte); text-transform: uppercase; margin-bottom: 3rem;
}
.section-title .accent { color: var(--rouge); }

/* ── Citation IM Fell English ────────────────────────── */
.enzo-says {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  line-height: 1.65;
  color: var(--texte);
  border-left: 2px solid var(--rouge);
  padding: 1.2rem 2rem;
  margin: 2.5rem 0;
  background: rgba(204,0,0,0.04);
  position: relative;
}
.enzo-says em { color: rgba(255,255,255,0.5); font-style: normal; font-family: var(--font-body); font-size: 0.65em; letter-spacing: .2em; text-transform: uppercase; display: block; margin-top: .6rem; }

/* ── HERO ────────────────────────────────────────────── */
#hero {
  position: relative; height: 100vh; min-height: 680px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 55% at 50% 100%, rgba(204,0,0,0.18) 0%, transparent 65%),
              linear-gradient(180deg,#000 0%,var(--noir) 100%);
  z-index: 0;
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  transform-origin: bottom center;
  transform: perspective(900px) rotateX(48deg) translateY(32%);
  mask-image: linear-gradient(to top,rgba(0,0,0,0.7) 0%,transparent 65%);
  -webkit-mask-image: linear-gradient(to top,rgba(0,0,0,0.7) 0%,transparent 65%);
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  font-family: var(--font-body); font-weight: 300;
  font-size: .72rem; letter-spacing: .65em; text-transform: uppercase;
  color: rgba(255,255,255,.45); margin-bottom: 1.5rem;
  opacity: 0; animation: fadeUp .8s .5s forwards;
}
.hero-name {
  font-family: var(--font-title);
  font-size: clamp(6rem,17vw,19rem); line-height: .84;
  color: var(--blanc); text-transform: uppercase;
  clip-path: inset(0 0 100% 0);
  animation: revealClip 1.2s .8s cubic-bezier(.16,1,.3,1) forwards;
}
.hero-name .rouge { color: var(--rouge); }
.hero-rule {
  width: 0; height: 1px; background: var(--jaune);
  margin: 2rem auto; animation: expandW .8s 2.1s ease forwards;
}
.hero-tagline {
  font-family: var(--font-quote); font-style: italic; font-weight: 400;
  font-size: clamp(1rem,2vw,1.35rem);
  color: rgba(255,255,255,.55); letter-spacing: .02em;
  opacity: 0; animation: fadeUp .8s 2.4s forwards;
  max-width: 700px; margin: 0 auto;
}
.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  z-index: 1; opacity: 0; animation: fadeUp .8s 3s forwards;
}
.hero-scroll span { font-size: .6rem; letter-spacing: .4em; text-transform: uppercase; color: var(--texte-dim); }
.scroll-line { width: 1px; height: 44px; background: linear-gradient(to bottom,var(--jaune),transparent); animation: scrollPulse 2s infinite; }

/* ── Sections intérieures ────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1.5fr; gap: 5rem; align-items: start; }
.two-col-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.two-col-rev { display: grid; grid-template-columns: 1.5fr 1fr; gap: 5rem; align-items: start; }

.prose p {
  font-size: 1rem; line-height: 1.85;
  color: var(--texte-dim); margin-bottom: 1.4rem; font-weight: 300;
}
.prose p strong { color: var(--texte); font-weight: 500; }

/* ── Photo frame ─────────────────────────────────────── */
.photo-frame { position: relative; }
.photo-frame::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid rgba(204,0,0,0.25);
  transform: translate(10px,10px); z-index: -1; transition: transform .4s;
}
.photo-frame:hover::after { transform: translate(4px,4px); }

/* ── Dates list (scuderia) ───────────────────────────── */
.date-list { display: flex; flex-direction: column; gap: 1px; margin-top: 2.5rem; }
.date-item {
  display: flex; align-items: baseline; gap: 1.5rem;
  padding: 1.2rem 1.5rem; background: var(--anthracite);
  border-left: 2px solid transparent; transition: border-color .3s, background .3s;
}
.date-item:hover { border-left-color: var(--jaune); background: #141414; }
.date-item .year { font-family: var(--font-title); font-size: 2rem; color: var(--rouge); min-width: 70px; line-height: 1; }
.date-item .fact { font-size: .88rem; line-height: 1.5; color: var(--texte-dim); font-weight: 300; }
.date-item .fact strong { color: var(--texte); font-weight: 500; }

/* ── GT Grid (voitures de route) ─────────────────────── */
.gt-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 2px; margin-top: 4rem; }
.gt-card { position: relative; overflow: hidden; background: var(--anthracite); }
.gt-card:hover .gt-img { transform: scale(1.04); }
.gt-img { width: 100%; display: block; transition: transform .6s var(--transition); }
.gt-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top,rgba(0,0,0,.92) 0%,rgba(0,0,0,.25) 55%,transparent 100%);
  opacity: .75; transition: opacity .4s;
}
.gt-card:hover .gt-overlay { opacity: 1; }
.gt-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.8rem; z-index: 2; }
.gt-year { font-size: .65rem; font-weight: 500; letter-spacing: .45em; text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: .35rem; }
.gt-name { font-family: var(--font-title); font-size: clamp(1.8rem,3.5vw,3rem); color: #fff; text-transform: uppercase; line-height: .92; }
.gt-desc { font-size: .85rem; line-height: 1.6; color: rgba(255,255,255,.5); margin-top: .6rem; max-width: 360px; font-weight: 300; opacity: 0; transform: translateY(8px); transition: opacity .35s .05s, transform .35s .05s; font-family: var(--font-quote); font-style: italic; }
.gt-card:hover .gt-desc { opacity: 1; transform: translateY(0); }

/* ── F1 teaser ───────────────────────────────────────── */
.f1-teaser {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  margin-top: 4rem;
}
.f1-teaser-main {
  position: relative; overflow: hidden; background: var(--anthracite);
  grid-column: 1 / -1;
}
.f1-teaser-main:hover .gt-img { transform: scale(1.03); }
.f1-teaser-main .gt-overlay { opacity: 1; background: linear-gradient(to top,rgba(0,0,0,.95) 0%,rgba(204,0,0,.07) 55%,transparent 100%); }

/* ── Section RÊVES — blueprint SVG ──────────────────── */
#reves { background: #050505; border-top: 1px solid rgba(204,0,0,.2); }
.blueprint-container {
  position: relative;
  background: #060810;
  border: 1px solid rgba(255,255,255,.06);
  padding: 3rem;
  margin: 3rem 0;
  overflow: hidden;
}
.blueprint-container::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(100,150,255,.04) 1px, transparent 1px),
    linear-gradient(90deg,rgba(100,150,255,.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.blueprint-label {
  font-family: var(--font-body); font-size: .6rem; font-weight: 500;
  letter-spacing: .4em; text-transform: uppercase;
  color: rgba(150,180,255,.4); margin-bottom: 1rem;
}
.reves-text p {
  font-size: 1.05rem; line-height: 1.9;
  color: rgba(240,238,232,.65); margin-bottom: 1.4rem; font-weight: 300;
}
.reves-text p strong { color: var(--texte); font-weight: 500; }
.reves-text .enzo-says { background: rgba(100,150,255,.04); border-left-color: rgba(150,200,255,.4); color: rgba(240,238,232,.8); }

/* ── Section PHILOSOPHIE ─────────────────────────────── */
#philosophie { background: #000; border-top: 1px solid rgba(204,0,0,.2); }
.phil-inner { max-width: 800px; }
.phil-big {
  font-family: var(--font-quote); font-style: italic;
  font-size: clamp(1.6rem,3.5vw,2.8rem); line-height: 1.5;
  color: var(--texte); margin-bottom: 4rem;
  position: relative; padding-top: .5rem;
}
.phil-big::before {
  content: '"';
  font-family: var(--font-title); font-size: 9rem;
  color: rgba(204,0,0,.1); position: absolute;
  top: -2rem; left: -1.5rem; line-height: 1;
}
.phil-text p { font-size: 1rem; line-height: 1.85; color: var(--texte-dim); margin-bottom: 1.4rem; font-weight: 300; }
.phil-text p strong { color: var(--texte); font-weight: 500; }

/* ── Timeline ────────────────────────────────────────── */
#timeline-section { background: var(--anthracite); border-top: 1px solid var(--border); }
.timeline { position: relative; max-width: 860px; }
.timeline::before {
  content: ''; position: absolute;
  left: var(--tl-dot-x); top: 8px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom,var(--rouge),rgba(204,0,0,.15) 85%,transparent 100%);
  transform: translateX(-50%);
}
.tl-item {
  position: relative;
  padding-left: calc(var(--tl-dot-x) + 22px);
  padding-bottom: 3.5rem;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute;
  left: var(--tl-dot-x); top: 6px;
  width: 10px; height: 10px;
  background: var(--jaune); border-radius: 50%;
  border: 2px solid var(--anthracite);
  box-shadow: 0 0 0 1.5px var(--jaune);
  transform: translateX(-50%); z-index: 2;
  transition: box-shadow .3s;
}
.tl-item:hover::before { box-shadow: 0 0 0 5px rgba(255,193,7,.2); }
/* Point final ouvert — 1962 */
.tl-item--open::before {
  background: transparent;
  border: 2px solid var(--rouge);
  box-shadow: 0 0 0 1.5px rgba(204,0,0,.5), 0 0 12px rgba(204,0,0,.3);
  animation: openPulse 2.5s infinite;
}
@keyframes openPulse {
  0%,100% { box-shadow: 0 0 0 1.5px rgba(204,0,0,.5), 0 0 12px rgba(204,0,0,.2); }
  50%      { box-shadow: 0 0 0 6px rgba(204,0,0,.15), 0 0 20px rgba(204,0,0,.4); }
}
.tl-year {
  position: absolute; left: 0; top: 0;
  width: var(--tl-date-w); text-align: right;
  font-family: var(--font-title); font-size: 1.5rem; color: var(--jaune); line-height: 1;
}
.tl-item--open .tl-year { color: rgba(255,193,7,.5); }
.tl-event { font-family: var(--font-body); font-weight: 600; font-size: .88rem; letter-spacing: .08em; text-transform: uppercase; color: var(--blanc); margin-bottom: .4rem; }
.tl-detail { font-size: .88rem; line-height: 1.65; color: var(--texte-dim); font-weight: 300; max-width: 520px; }
.tl-quote { font-family: var(--font-quote); font-style: italic; font-size: .95rem; color: rgba(240,238,232,.7); margin-top: .6rem; max-width: 480px; }
.tl-photo { margin-top: 1rem; max-width: 300px; }
.tl-open-marker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-body); font-size: .65rem; font-weight: 500;
  letter-spacing: .35em; text-transform: uppercase; color: rgba(255,193,7,.55);
  margin-top: .6rem;
}
.tl-open-marker::after { content: ''; display: inline-block; width: 40px; height: 1px; background: linear-gradient(90deg,rgba(255,193,7,.4),transparent); }

/* ── Footer ──────────────────────────────────────────── */
.footer {
  background: #000; padding: 3.5rem 4rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.footer-brand { font-family: var(--font-title); font-size: 1.6rem; letter-spacing: .25em; color: var(--blanc); }
.footer-brand span { color: var(--rouge); }
.footer-copy { font-size: .72rem; letter-spacing: .12em; color: var(--texte-dim); line-height: 1.7; font-weight: 300; }
.footer-copy a { color: rgba(255,255,255,.4); transition: color .3s; }
.footer-copy a:hover { color: var(--rouge); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .7rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--texte-dim); border: 1px solid rgba(255,255,255,.1); padding: .5rem 1rem; transition: color .3s, border-color .3s; }
.footer-links a:hover { color: var(--rouge); border-color: var(--rouge); }

/* ── Keyframes ───────────────────────────────────────── */
@keyframes revealClip { to { clip-path: inset(0 0 0% 0); } }
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes expandW { to { width: 220px; } }
@keyframes scrollPulse { 0%,100%{opacity:1;} 50%{opacity:.2;} }

/* ── GT card hover — bordure jaune ──────────────────── */
.gt-card:hover { outline: 1px solid var(--jaune); outline-offset: -1px; }

/* ── Hero watermark shield ───────────────────────────── */
.hero-shield-watermark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%);
  z-index: 0;
  opacity: 0.075;
  pointer-events: none;
  width: 340px;
  max-width: 55vw;
}
.hero-shield-watermark svg { width: 100%; height: auto; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width:1024px) {
  .container { padding: 0 2rem; }
  .nav,.nav.scrolled { padding: 1.2rem 2rem; }
  .nav-links { gap: 1.5rem; }
  .two-col,.two-col-eq,.two-col-rev { grid-template-columns: 1fr; gap: 3rem; }
  .gt-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 2rem; text-align: center; }
  .footer-links { justify-content: center; }
}
@media (max-width:768px) {
  .section { padding: 5rem 0; }
  .nav-links { display: none; }
  :root { --tl-date-w:60px; --tl-gap:20px; }
}
@media (max-width:480px) {
  .container { padding: 0 1.25rem; }
}
