/* 8DIGRIZ — corporate site. No build step, no JS. */

/* Self-hosted webfonts (subset latin). No third-party request at runtime. */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-700-800.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/spectral-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/spectral-600.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  --bg: #0d0e0c;
  --bg-raised: #14150f;
  --line: #262820;
  --line-soft: #1b1d17;
  --ink: #ece8dc;
  --ink-dim: #9a9a8c;
  --ink-faint: #6a6b5f;
  --accent: #e2552d;
  --accent-soft: #f0a184;

  --font-display: "Bricolage Grotesque", ui-sans-serif, sans-serif;
  --font-body: "Spectral", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --gutter: clamp(1.5rem, 5vw, 5rem);
  --measure: 60rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.1875rem);
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- Atmosphere: engineering grid + grain, both inert to pointers --- */

body::before {
  content: "";
  position: fixed;
  inset: -1px;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 5.5rem 5.5rem;
  -webkit-mask-image: radial-gradient(115% 85% at 78% -10%, #000 0%, transparent 68%);
  mask-image: radial-gradient(115% 85% at 78% -10%, #000 0%, transparent 68%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Shell --- */

.shell {
  position: relative;
  z-index: 1;
  max-width: 78rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* main absorbs the slack, so the footer always sits on the viewport floor */
.shell > main { flex: 1 0 auto; }

/* Home and 404 hold a single hero: center it instead of leaving a void below.
   Browsers without :has() simply keep the hero at the top — no breakage. */
.shell > main:has(> .hero:only-child) {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

a { color: inherit; }

/* --- Masthead --- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2rem 0;
}

.mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.mark::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
  transform: rotate(45deg);
}

.masthead nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead nav a {
  color: var(--ink-dim);
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.masthead nav a:hover,
.masthead nav a:focus-visible,
.masthead nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* --- Shared type primitives --- */

.eyebrow {
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.eyebrow::before {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: var(--accent);
  flex: none;
}

/* --- Hero --- */

.hero {
  position: relative;
  padding-block: clamp(4rem, 12vh, 8rem) clamp(4rem, 10vh, 7rem);
}

.hero__ghost {
  position: absolute;
  top: -3vw;
  right: -2vw;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(18rem, 42vw, 36rem);
  line-height: 0.72;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  user-select: none;
  pointer-events: none;
  z-index: -1;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 15vw, 11rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
  margin: 0 0 1.5rem;
}

.hero h1 .dot { color: var(--accent); }

.hero__lede {
  font-size: clamp(1.375rem, 1.1rem + 1.3vw, 2.125rem);
  line-height: 1.28;
  letter-spacing: -0.015em;
  max-width: min(22ch, 100%);
  margin: 0 0 2.5rem;
  text-wrap: balance;
}

.hero__body {
  max-width: min(44ch, 100%);
  color: var(--ink-dim);
  margin: 0;
}

.hero__body a { color: var(--accent); }

/* --- Legal / prose pages --- */

.page-head {
  padding-block: clamp(3.5rem, 10vh, 6rem) 2.5rem;
}

.page-head h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 1.6rem + 4vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 16ch;
  text-wrap: balance;
}

.prose {
  max-width: var(--measure);
  padding-block: 1rem clamp(4rem, 9vh, 6rem);
}

.prose section + section { margin-top: 3.25rem; }

.prose h2 {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.prose h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.005em;
  margin: 2rem 0 0.5rem;
}

.prose p { margin: 0 0 1.1rem; max-width: min(68ch, 100%); }
.prose p:last-child { margin-bottom: 0; }

.prose ul {
  margin: 0 0 1.1rem;
  padding-left: 1.1rem;
  max-width: min(68ch, 100%);
}

.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--accent); }

strong { font-weight: 600; }

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

.prose a:hover { color: var(--accent-soft); }

/* Identity table: mono keys, generous rows */
.facts {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  text-align: left;
}

.facts th,
.facts td {
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.facts th {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  width: 15rem;
  padding-top: 1.05rem;
}

.facts td { color: var(--ink); }

@media (max-width: 40rem) {
  .facts, .facts tbody, .facts tr, .facts th, .facts td { display: block; width: auto; }
  .facts th { border-bottom: 0; padding: 1.1rem 0 0.25rem; }
  .facts td { padding-top: 0; }
}

/* --- Footer --- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: 2.25rem 3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* --- Petits ecrans : le mono interlettre est le premier a deborder --- */

@media (max-width: 30rem) {
  :root { --gutter: 1.25rem; }

  .eyebrow {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    gap: 0.6rem;
  }

  .eyebrow::before { width: 1.5rem; }

  .masthead nav {
    gap: 0.6rem 1rem;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
  }

  .footer { font-size: 0.65rem; }

}

/* --- Focus + motion --- */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  animation: reveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal:nth-child(1) { animation-delay: 0.05s; }
.reveal:nth-child(2) { animation-delay: 0.15s; }
.reveal:nth-child(3) { animation-delay: 0.25s; }
.reveal:nth-child(4) { animation-delay: 0.35s; }

@keyframes reveal {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* --- Print: legal pages must survive a paper trail --- */

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  body::before, body::after, .hero__ghost { display: none; }
  .shell { min-height: 0; }
  .masthead nav { display: none; }
  .prose a { color: #000; }
}
