/* ============================================================
   WHITE LEGACY — Classified / Mafia-Underground Stylesheet
   Dark · gritty · censored-dossier aesthetic · single gold accent
   ============================================================ */

:root {
  --black: #040404;       /* near-black, reads as black, keeps depth */
  --ink: #070707;
  --panel: #0b0b0a;
  --panel-2: #100f0d;
  --gold: #C9A84C;
  --gold-bright: #e3c46e;
  --gold-dark: #8a7026;
  --gold-deep: #5c4a18;
  --dirty-white: #cfcabd;
  --dim: #847f74;
  --border: #1b1916;
  --censor: #161412;
  --font-display: 'Bebas Neue', 'Oswald', sans-serif;
  --font-body: 'Oswald', sans-serif;
  --font-doc: 'Courier New', 'Courier', monospace; /* classified microtext */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--black);
  color: var(--dirty-white);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  letter-spacing: 0.4px;
}

/* ---------- Overlay 1: vignette + scanlines ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background:
    radial-gradient(ellipse at center, transparent 48%, rgba(0,0,0,0.92) 100%),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.22) 0px, rgba(0,0,0,0.22) 1px, transparent 1px, transparent 3px);
}

/* ---------- Overlay 2: animated film grain ---------- */
body::after {
  content: "";
  position: fixed;
  inset: -120%;
  pointer-events: none;
  z-index: 51;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.6s steps(3) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-4%, 3%); }
  66%  { transform: translate(3%, -2%); }
  100% { transform: translate(-2%, 1%); }
}

/* ---------- Animated background canvas ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: #060605; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--gold-deep), var(--gold-dark));
  border: 2px solid #060605;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
html { scrollbar-color: var(--gold-dark) #060605; scrollbar-width: thin; }
::selection { background: var(--gold); color: #0a0a0a; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 40px;
  height: 72px;
  background: rgba(4, 4, 4, 0.85);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  border-bottom: 1px solid var(--gold-deep);
  box-shadow: 0 2px 22px rgba(0,0,0,0.95);
}
.nav-logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }

.logo-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
  border: 1.5px solid var(--gold);
  background: linear-gradient(135deg, #1a1407, #060606);
  padding: 2px;
  box-shadow: inset 0 0 12px rgba(201,168,76,0.4), 0 0 10px rgba(201,168,76,0.15);
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 4px;
  color: var(--dirty-white);
}
.nav-brand span { color: var(--gold-bright); }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  position: relative;
  display: block;
  padding: 8px 18px;
  color: var(--dim);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.18rem;
  letter-spacing: 3px;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px; bottom: 4px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-bright); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--dirty-white); transition: 0.3s; }

/* ============================================================
   PAGE
   ============================================================ */
.page {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  width: 100%;
  animation: pageFade 0.7s ease both;
}
@keyframes pageFade {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 80px 28px; }

/* small classified label (rationed eyebrow) */
.doc-label {
  font-family: var(--font-doc);
  font-size: 0.74rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.doc-label::before {
  content: "";
  width: 22px; height: 1px; background: var(--gold-dark);
}

/* section heading */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5rem);
  letter-spacing: 6px;
  color: var(--dirty-white);
  line-height: 0.95;
}
.section-title .em { color: var(--gold); }
.page-title { margin-top: 14px; }

/* ============================================================
   HERO  (Accueil)
   ============================================================ */
.hero {
  position: relative;
  z-index: 2;
  min-height: calc(100dvh - 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px 90px;
}

/* rotated CONFIDENTIEL stamp */
.stamp {
  position: absolute;
  top: 8%;
  right: 6%;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.9rem);
  letter-spacing: 5px;
  color: var(--gold);
  border: 3px solid var(--gold);
  padding: 6px 18px;
  transform: rotate(-14deg);
  opacity: 0.42;
  box-shadow: 0 0 0 2px rgba(201,168,76,0.15) inset;
  animation: stampFlicker 6s infinite;
  pointer-events: none;
}
@keyframes stampFlicker {
  0%, 92%, 100% { opacity: 0.42; }
  93% { opacity: 0.15; }
  95% { opacity: 0.5; }
  97% { opacity: 0.2; }
}

.hero-dossier {
  margin-bottom: 30px;
  font-family: var(--font-doc);
  font-size: 0.8rem;
  letter-spacing: 4px;
  color: var(--dim);
}
.hero-dossier b { color: var(--gold); font-weight: 400; }

.glitch {
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 16vw, 11.5rem);
  line-height: 0.88;
  letter-spacing: 8px;
  color: var(--dirty-white);
  position: relative;
  text-shadow: 0 0 30px rgba(0,0,0,0.9);
  animation: flicker 5s infinite;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0; width: 100%; overflow: hidden;
}
.glitch::before { color: var(--gold-bright); z-index: -1; animation: glitchTop 3s infinite linear alternate-reverse; }
.glitch::after  { color: #1f1c16; z-index: -2; animation: glitchBot 2.4s infinite linear alternate-reverse; }

@keyframes glitchTop {
  0%{clip-path:inset(0 0 80% 0);transform:translate(-3px,-2px)}
  20%{clip-path:inset(20% 0 50% 0);transform:translate(3px,1px)}
  40%{clip-path:inset(45% 0 35% 0);transform:translate(-2px,2px)}
  60%{clip-path:inset(10% 0 70% 0);transform:translate(2px,-1px)}
  80%{clip-path:inset(60% 0 10% 0);transform:translate(-3px,1px)}
  100%{clip-path:inset(30% 0 45% 0);transform:translate(2px,2px)}
}
@keyframes glitchBot {
  0%{clip-path:inset(70% 0 5% 0);transform:translate(3px,2px)}
  25%{clip-path:inset(40% 0 40% 0);transform:translate(-3px,-2px)}
  50%{clip-path:inset(85% 0 2% 0);transform:translate(2px,1px)}
  75%{clip-path:inset(25% 0 55% 0);transform:translate(-2px,2px)}
  100%{clip-path:inset(55% 0 30% 0);transform:translate(3px,-1px)}
}
@keyframes flicker {
  0%,19%,21%,23%,25%,54%,56%,100%{opacity:1}
  20%,24%,55%{opacity:0.82}
}

/* tagline with drawn diamond separators (no middle-dot spam) */
.hero-tag {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  font-family: var(--font-display);
  letter-spacing: 6px;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.hero-tag span { padding: 0 22px; position: relative; }
.hero-tag span + span::before {
  content: "";
  position: absolute; left: -4px; top: 50%;
  width: 7px; height: 7px;
  background: var(--gold);
  transform: translateY(-50%) rotate(45deg);
}

.hero-sub {
  margin-top: 30px;
  max-width: 580px;
  color: var(--dim);
  font-size: 1.12rem;
  letter-spacing: 1.5px;
  line-height: 1.85;
}
.hero-sub strong { color: var(--dirty-white); font-weight: 400; }

/* redacted / censored word (hover to uncover) */
.redact {
  background: var(--censor);
  color: transparent;
  padding: 1px 8px;
  border-radius: 1px;
  cursor: help;
  -webkit-user-select: none;
  user-select: none;
  box-shadow: inset 0 0 0 1px #000;
  transition: background 0.3s ease, color 0.3s ease;
}
.redact:hover,
.redact.revealed { background: transparent; color: var(--gold-bright); }

/* ============================================================
   MARQUEE BAND
   ============================================================ */
.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-top: 1px solid var(--gold-deep);
  border-bottom: 1px solid var(--gold-deep);
  background: linear-gradient(180deg, #0a0907, #050504);
  padding: 18px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: scrollX 26s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 5px;
  color: var(--dim);
  white-space: nowrap;
  padding: 0 34px;
  display: inline-flex;
  align-items: center;
  gap: 34px;
}
.marquee-track span::after {
  content: "";
  width: 8px; height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}
@keyframes scrollX { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   OMERTÀ / CODE  (stacked creed)
   ============================================================ */
.creed { max-width: 900px; margin: 0 auto; padding: 90px 28px; position: relative; z-index: 2; }
.creed-head { margin-bottom: 56px; }
.creed-head .section-title { margin-top: 14px; }
.creed-head p {
  margin-top: 20px;
  max-width: 560px;
  color: var(--dim);
  line-height: 1.8;
  letter-spacing: 0.6px;
}

.creed-item {
  display: flex;
  align-items: baseline;
  gap: 30px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.creed-item:last-child { border-bottom: 1px solid var(--border); }
.creed-item.in-view { opacity: 1; transform: translateX(0); }
.creed-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--gold);
  flex: 0 0 70px;
  line-height: 1;
}
.creed-text {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.4vw, 2.3rem);
  letter-spacing: 2px;
  color: var(--dirty-white);
  line-height: 1.15;
}

/* ============================================================
   THREAT BAND (full-width closing statement)
   ============================================================ */
.threat {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 110px 24px;
  border-top: 1px solid var(--gold-deep);
  background:
    radial-gradient(ellipse at center, rgba(201,168,76,0.06), transparent 70%),
    #050504;
}
.threat h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6.5vw, 4.4rem);
  letter-spacing: 4px;
  line-height: 1.02;
  color: var(--dirty-white);
  max-width: 980px;
  margin: 0 auto;
}
.threat h2 .em { color: var(--gold); display: block; }

/* gold dossier button */
.btn-dossier {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 46px;
  padding: 15px 40px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(201,168,76,0.12), rgba(201,168,76,0.02));
  border: 1px solid var(--gold-dark);
  position: relative;
  overflow: hidden;
  transition: color 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease, transform 0.2s ease;
}
.btn-dossier .arrow { transition: transform 0.25s ease; }
.btn-dossier::before {
  content: "";
  position: absolute;
  inset: 0;
  left: -120%;
  background: linear-gradient(120deg, transparent, rgba(201,168,76,0.18), transparent);
  transition: left 0.6s ease;
}
.btn-dossier:hover {
  color: #0a0a0a;
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
  border-color: var(--gold-bright);
  box-shadow: 0 8px 30px rgba(201,168,76,0.35);
  transform: translateY(-2px);
}
.btn-dossier:hover::before { left: 130%; }
.btn-dossier:hover .arrow { transform: translateX(5px); }
.btn-dossier:active { transform: translateY(0); }

/* ============================================================
   RÈGLEMENT — classified locked dossier
   ============================================================ */
.dossier {
  margin-top: 36px;
  position: relative;
  border: 1px solid var(--border);
  background:
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(255,255,255,0.015) 26px 27px),
    linear-gradient(180deg, var(--panel), #050504);
  padding: 70px 30px;
  min-height: 340px;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
}
.dossier::before {
  content: "ACCÈS RESTREINT";
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-doc);
  font-size: 0.74rem;
  letter-spacing: 5px;
  color: var(--gold);
  opacity: 0.7;
}
.lock {
  width: 58px; height: 58px;
  margin: 0 auto 22px;
  display: block;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2;
  opacity: 0.85;
  filter: drop-shadow(0 0 10px rgba(201,168,76,0.3));
}
.dossier p {
  font-style: italic;
  color: var(--dim);
  font-size: 1.3rem;
  letter-spacing: 1.5px;
}
.dossier .doc-foot {
  margin-top: 26px;
  font-family: var(--font-doc);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 4px;
  color: var(--gold-deep);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  text-align: center;
  padding: 28px 20px;
  border-top: 1px solid var(--gold-deep);
  background: rgba(3,3,3,0.92);
  color: var(--dim);
  font-family: var(--font-display);
  letter-spacing: 3px;
  font-size: 0.95rem;
}
.footer span { color: var(--gold-bright); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* prevent iOS auto text-inflation, kill tap flashes */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, .redact { -webkit-tap-highlight-color: transparent; }

/* ---------- Tablet / large phone ---------- */
@media (max-width: 820px) {
  .navbar { padding: 10px 18px; height: 64px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(4,4,4,0.98);
    border-bottom: 1px solid var(--gold-deep);
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .nav-links.open { max-height: 260px; }
  .nav-links a { padding: 16px 22px; border-top: 1px solid #141210; font-size: 1.3rem; }
  .nav-links a::after { display: none; }

  .hero { min-height: calc(100dvh - 64px); padding: 40px 20px 70px; }
  .container { padding: 56px 20px; }

  .stamp { top: auto; bottom: 24px; right: 18px; font-size: 1rem; letter-spacing: 3px; padding: 5px 12px; }

  .marquee-track span { font-size: 1.25rem; padding: 0 22px; gap: 22px; }

  .creed { padding: 64px 22px; }
  .creed-head { margin-bottom: 40px; }
  .creed-item { gap: 18px; padding: 24px 0; }
  .creed-num { flex-basis: 46px; font-size: 1.9rem; }

  .threat { padding: 80px 22px; }
  .dossier { padding: 60px 22px; }
}

/* ---------- Phone ---------- */
@media (max-width: 480px) {
  .nav-brand { font-size: 1.15rem; letter-spacing: 2px; }
  .nav-logo { gap: 10px; }
  .logo-img { width: 40px; height: 40px; }

  .hero { padding: 30px 18px 60px; }
  .hero-dossier { font-size: 0.7rem; letter-spacing: 2px; margin-bottom: 22px; }
  .glitch { letter-spacing: 3px; }
  .hero-tag { letter-spacing: 3px; font-size: 0.9rem; }
  .hero-tag span { padding: 4px 14px; }
  .hero-sub { font-size: 1rem; margin-top: 24px; }

  /* keep the stamp from crowding small screens */
  .stamp { opacity: 0.3; bottom: 16px; right: 12px; }

  .marquee { padding: 14px 0; }
  .marquee-track span { font-size: 1.1rem; letter-spacing: 3px; padding: 0 16px; gap: 16px; }

  .doc-label { font-size: 0.68rem; letter-spacing: 3px; }
  .creed-text { letter-spacing: 1px; }
  .creed-num { flex-basis: 38px; font-size: 1.7rem; }

  .threat { padding: 64px 18px; }
  .btn-dossier { width: 100%; justify-content: center; font-size: 1.15rem; padding: 14px 24px; letter-spacing: 3px; }

  .dossier { padding: 52px 18px; min-height: 300px; }
  .dossier::before { letter-spacing: 3px; font-size: 0.68rem; }
  .dossier p { font-size: 1.12rem; }
  .lock { width: 50px; height: 50px; }

  .footer { letter-spacing: 2px; font-size: 0.88rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .creed-item { opacity: 1; transform: none; }
}
