/* ============================================
   THE REBORN SIGNAL — MAIN STYLESHEET
   Variables / Reset / Typography / Layout
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;700;800;900&family=IBM+Plex+Mono:ital,wght@0,400;0,700;1,400&family=Lora:ital,wght@0,400;1,400&display=swap');

:root {
  /* CANON */
  --canon-amber: #C8873A;
  --canon-burn: #8B3A1E;
  --canon-warm-white: #F0E6D0;
  --canon-concrete: #2A2218;

  /* CIPHER */
  --cipher-cyan: #00FFE1;
  --cipher-night: #060B14;
  --cipher-cold-white: #E0F4FF;
  --cipher-electric: #0099FF;

  /* FRACTURE */
  --fracture-width: 1px;
  --fracture-color: rgba(200, 135, 58, 0.6);
  --fracture-glow: 0 0 12px rgba(0, 255, 225, 0.3), 0 0 2px rgba(200, 135, 58, 0.8);
  --fracture-offset: 0px;

  /* LAYOUT */
  --split: 50%;
  --max-content: 1440px;
  --text-width: 68ch;

  /* Z-INDEX SCALE */
  --z-base: 1;
  --z-fracture: 10;
  --z-nav: 100;
  --z-modal: 200;
}

/* ── RESET ── */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: #000;
  color: #ccc;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

/* ── TYPOGRAPHY ── */

.font-canon {
  font-family: 'Barlow Condensed', sans-serif;
}

.font-cipher {
  font-family: 'IBM Plex Mono', monospace;
}

.font-manifeste {
  font-family: 'Lora', serif;
}

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ── LAYOUT UTILITIES ── */

.container {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  min-height: 100vh;
}

.split-block {
  position: relative;
  overflow: hidden;
}

/* ── SELECTION ── */

::selection {
  background: var(--canon-amber);
  color: #000;
}

.page-cipher ::selection {
  background: var(--cipher-cyan);
  color: #000;
}

/* ── SCROLLBAR ── */

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: var(--canon-amber);
}

.page-cipher ::-webkit-scrollbar-thumb {
  background: var(--cipher-cyan);
}

/* ── NOISE TEXTURE OVERLAY ── */

.noise-overlay::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ── REVEAL ANIMATIONS ── */

[data-signal="reveal"] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-signal="reveal"].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE BREAKPOINTS ── */

@media (max-width: 1024px) {
  .split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --split: 100%;
  }

  body {
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .container {
    padding: 0 1rem;
  }
}
