/* ============================================================
   THUNDERRIFT STUDIO — All rights reserved.
   ============================================================ */

@font-face {
  font-family: 'TR-Title';
  src: url('../fonts/title.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TR-Brand';
  src: url('../fonts/thr.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TR-Text';
  src: url('../fonts/text.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TR-Mono';
  src: url('../fonts/mono.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-void: #0A0D14;
  --bg-panel: #11151F;
  --bg-panel-2: #171C29;
  --line: #262C3B;
  --storm-gray: #4A5468;
  --rift-blue: #5B8CFF;
  --rift-glow: #A9C4FF;
  --text-primary: #F4F6FB;
  --text-muted: #8890A6;

  --font-display: 'TR-Title', 'Arial Narrow', sans-serif;
  --font-body: 'TR-Text', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'TR-Mono', 'Courier New', monospace;
  --font-brand: 'TR-Brand', 'Arial Narrow', sans-serif;

  --section-pad: clamp(4rem, 8vw, 8rem);
  --container-w: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--bg-void);
  background-image: url('../img/bg-texture.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.1; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--rift-blue);
  color: var(--bg-void);
  padding: .75rem 1.25rem;
  z-index: 200;
  font-family: var(--font-mono);
  font-size: .85rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--rift-blue);
  margin: 0 0 .75rem;
}

.accent { color: var(--rift-blue); }

.section-head {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  max-width: 30ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.6rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  letter-spacing: .04em;
  border-radius: 2px;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn-primary {
  background: var(--rift-blue);
  color: var(--bg-void);
  font-weight: 500;
}
.btn-primary:hover { transform: translateY(-2px); background: var(--rift-glow); }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text-primary);
}
.btn-ghost:hover { border-color: var(--rift-blue); transform: translateY(-2px); }

.link-arrow {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--rift-blue);
  display: inline-block;
  margin-top: 1.25rem;
  transition: gap .2s ease;
}
.link-arrow:hover { text-decoration: underline; }

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.site-header.scrolled {
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: .9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-lockup {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .25rem .25rem .25rem 0;
}
.logo-mark { flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; }
.logo-word {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .03em;
}
.logo-word .accent { color: inherit; }

.main-nav { display: flex; gap: 2rem; }
.main-nav a {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--text-muted);
  transition: color .2s ease;
  margin-right: 0;
}
.main-nav a:not(:last-child) { margin-right: 2rem; }
.main-nav { gap: 0; }
.main-nav a:hover { color: var(--text-primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0 1.5rem 1.5rem;
  gap: 1rem;
}
.mobile-nav a {
  font-family: var(--font-mono);
  font-size: .95rem;
  color: var(--text-muted);
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
}
.mobile-nav.open { display: flex; }

/* ─── Hero ──────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;       /* plein écran exact — scroll révèle la suite */
  min-height: 560px;   /* plancher pour les très petits écrans */
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 70% 20%, var(--bg-panel-2) 0%, var(--bg-void) 60%);
}
.hero-bg { position: absolute; inset: 0; z-index: 1; }

/* ─── Hero video background ─────────────────── */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 70% 20%, rgba(23, 28, 41, 0.55) 0%, rgba(10, 13, 20, 0.88) 60%);
}

/* ─── Hero bolt ─────────────────────────────── */
.rift-svg { width: 100%; height: 100%; }

.bolt-halo {
  opacity: 0;
  animation:
    halo-in    0.35s ease 1.9s forwards,
    glow-pulse 3.2s ease-in-out 2.25s infinite;
}

.bolt-core {
  stroke-dasharray: 1520;
  stroke-dashoffset: 1520;
  animation: draw-bolt 1.55s cubic-bezier(.42,0,.12,1) 0.25s forwards;
}

.bolt-shine {
  stroke-dasharray: 1520;
  stroke-dashoffset: 1520;
  opacity: 0;
  animation:
    draw-bolt  1.55s cubic-bezier(.42,0,.12,1) 0.35s forwards,
    shine-fade 0.55s ease 2.1s forwards;
}

@keyframes draw-bolt {
  0%   { stroke-dashoffset: 1520; opacity: 0; }
  4%   { opacity: 1; }
  /* rush du haut vers le shoulder */
  52%  { stroke-dashoffset: 360; }
  /* micro-stutter électrique #1 */
  58%  { stroke-dashoffset: 400; }
  /* reprise rapide vers le bas */
  78%  { stroke-dashoffset: 85;  }
  /* micro-stutter électrique #2 */
  85%  { stroke-dashoffset: 115; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes halo-in {
  to { opacity: 0.11; }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.11; }
  50%       { opacity: 0.22; }
}

@keyframes shine-fade {
  to { opacity: 0; }
}

/* ─── Hero content ──────────────────────────── */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 7rem 1.5rem 4rem;
  width: 100%;
}
.hero-title {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: .01em;
  margin-bottom: 1.5rem;
}
.hero-sub {
  max-width: 46ch;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.games {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--line);
}
.games .section-head { margin-bottom: 3rem; }

.game-card {
  max-width: var(--container-w);
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.game-card:last-child { margin-bottom: 0; }
.game-card.reverse { direction: rtl; }
.game-card.reverse > * { direction: ltr; }

.game-media {
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-panel);
}
.game-media img { width: 100%; height: auto; }

.game-tag {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rift-blue);
  margin-bottom: .75rem;
}
.game-info h3 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 1rem;
}
.game-info p:not(.game-tag) { color: var(--text-muted); }

.about {
  position: relative;
  overflow: hidden;
  padding: var(--section-pad) 0;
  background: var(--bg-panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-watermark {
  position: absolute;
  right: -4%;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  height: 130%;
  width: auto;
  max-width: none;
  opacity: .06;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.about-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.about h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  max-width: 22ch;
  margin-bottom: 1.5rem;
}
.about-lead {
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 3.5rem;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.about-item {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
.about-num {
  font-family: var(--font-mono);
  color: var(--rift-blue);
  font-size: .9rem;
}
.about-item h3 {
  font-size: 1.1rem;
  margin: .5rem 0 .5rem;
  font-weight: 600;
}
.about-item p { color: var(--text-muted); font-size: .95rem; }

.team {
  padding: var(--section-pad) 0;
}
.team .section-head { margin-bottom: 3rem; }
.team-grid {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.team-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
}
.team-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: .25rem; }
.team-role { font-family: var(--font-mono); font-size: .8rem; color: var(--text-muted); }

.contact {
  padding: var(--section-pad) 0;
  background: var(--bg-panel);
  border-top: 1px solid var(--line);
  text-align: center;
}
.contact-inner {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.contact h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 1rem;
}
.contact-lead { color: var(--text-muted); margin-bottom: 2rem; }
.contact-email {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--rift-blue);
  border-bottom: 1px solid var(--rift-blue);
  padding-bottom: 2px;
}
.contact-email:hover { color: var(--rift-glow); border-color: var(--rift-glow); }

.socials {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 3rem;
}
.social-link {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  color: var(--text-muted);
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.social-link:hover { color: var(--rift-blue); border-color: var(--rift-blue); transform: translateY(-2px); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
}
.footer-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  text-align: center;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-muted);
}
.studio-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.studio-logos img {
  width: auto;
  height: auto;
  opacity: .6;
  filter: grayscale(1);
  transition: opacity .2s ease, filter .2s ease;
}
.studio-logos img:hover {
  opacity: 1;
  filter: grayscale(0);
}
.footer-socials { display: flex; gap: 1rem; }
.footer-socials a { color: var(--text-muted); }
.footer-socials a:hover { color: var(--rift-blue); }

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel-2);
  border: 1px solid var(--line);
  color: var(--rift-blue);
  font-size: 1.1rem;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { border-color: var(--rift-blue); }

/* ─── Responsive ────────────────────────────── */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .game-card { grid-template-columns: 1fr; }
  .game-card.reverse { direction: ltr; }
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ─── Reduced motion ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bolt-core  { animation: none; stroke-dashoffset: 0; }
  .bolt-shine { animation: none; opacity: 0; }
  .bolt-halo  { animation: none; opacity: 0.11; }
  .btn, .social-link, .back-to-top { transition: none; }
}

/* ============================================================
   PAGE TEMPLATE — styles réutilisables pour toutes les pages
   ============================================================ */
.page-hero {
  padding: calc(var(--section-pad) + 4rem) 0 var(--section-pad);
  max-width: var(--container-w);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ─── Bloc titre + texte (copiable-collable) ─ */
.page-block {
  margin-bottom: 4rem;
  max-width: 860px;
}
.page-block:last-child { margin-bottom: 0; }

.page-block-title {
  font-family: var(--font-display); /* title.ttf */
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin: 0 0 1rem 0;
  text-align: left;
}

.page-block-title .accent { color: var(--rift-blue); }

.page-block-text {
  font-family: var(--font-body); /* text.ttf */
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
  text-align: left;
  max-width: 72ch;
}

.page-block-text + .page-block-text {
  margin-top: .85rem; /* plusieurs paragraphes empilés */
}

/* ─── Font Abriph (dédiée à la page anti-cheat) ─ */
@font-face {
  font-family: 'TR-Abriph';
  src: url('../fonts/abriph.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ─── Page Abriph ────────────────────────────── */
.abriph-banner {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-bottom: 1px solid var(--line);
}

.abriph-title {
  font-family: 'TR-Abriph', 'Arial Narrow', sans-serif;
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.05;
  margin: 0 0 1.25rem 0;
  text-align: left;
  letter-spacing: .02em;
}

.abriph-title .accent { color: var(--rift-blue); }
