/*
 * BRIX Defense — Landing Page Styles
 * ===================================
 * Purpose:  Full visual styling for the brixdefense.com hero landing page.
 * Provides: Design tokens, reset, layout, typography, preloader,
 *           background effects (hex grid canvas, noise, vignette),
 *           and GSAP-compatible initial hidden states.
 * Dependencies: IBM Plex Sans + Source Code Pro (Google Fonts).
 */


/* ═══════════════════════════════════════════════════════════════
   1. DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg:   #0a0c10;
  --font: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'Source Code Pro', ui-monospace, 'SFMono-Regular', monospace;
}


/* ═══════════════════════════════════════════════════════════════
   2. RESET & BASE
   ═══════════════════════════════════════════════════════════════ */

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow: hidden;
}

@media (max-width: 768px) {
  body {
    overflow: auto;
  }
}


/* ═══════════════════════════════════════════════════════════════
   3. PAGE LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
}

@media (max-width: 768px) {
  .page {
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }
}


/* ═══════════════════════════════════════════════════════════════
   4. BACKGROUND EFFECTS (hex canvas, noise, vignette)
   ═══════════════════════════════════════════════════════════════ */

.bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.noise-canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: screen;
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 0% 100%, var(--bg) 10%, transparent 70%);
}


/* ═══════════════════════════════════════════════════════════════
   5. NAVIGATION
   ═══════════════════════════════════════════════════════════════ */

.nav {
  padding: 32px clamp(24px, 5vw, 64px);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.nav svg {
  height: 24px;
}


/* ═══════════════════════════════════════════════════════════════
   6. HERO CONTENT
   ═══════════════════════════════════════════════════════════════ */

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 clamp(24px, 5vw, 64px) clamp(40px, 5vw, 64px);
  max-width: 100%;
  position: relative;
  z-index: 2;
}

@media (min-width: 769px) {
  .content {
    max-width: 54%;
  }
}

.kicker {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 24px;
}

.tagline {
  font-size: clamp(32px, 7vw, 56px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 24px;
  max-width: 590px;
}

.sub {
  font-size: clamp(14px, 2.5vw, 16px);
  font-weight: 400;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  max-width: 500px;
  margin-bottom: 44px;
  text-wrap: pretty;
}

.cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg);
  background: #fff;
  border: none;
  border-radius: 8px;
  padding: 15px 34px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 48px;
}

.cta:hover {
  background: rgba(255, 255, 255, 0.85);
}


/* ═══════════════════════════════════════════════════════════════
   7. GSAP WORD SPLIT HELPER
   ═══════════════════════════════════════════════════════════════ */

.word {
  display: inline-block;
  white-space: pre-wrap;
}


/* ═══════════════════════════════════════════════════════════════
   8. PRELOADER OVERLAY
   ═══════════════════════════════════════════════════════════════ */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  /* Circle-wipe reveal controlled by GSAP via --reveal-radius */
  --reveal-radius: 0px;
  --mask-edge: calc(var(--reveal-radius) + 1px);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent var(--reveal-radius), #000 var(--mask-edge));
  mask-image:         radial-gradient(circle at 50% 50%, transparent var(--reveal-radius), #000 var(--mask-edge));
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  will-change: opacity, -webkit-mask-image, mask-image;
}

.preloader svg {
  height: 48px;
}


/* ═══════════════════════════════════════════════════════════════
   9. INITIAL HIDDEN STATES (prevents flash before GSAP runs)
   ═══════════════════════════════════════════════════════════════ */

#hex-canvas,
#noise-canvas,
.vignette,
#logo svg,
#kicker,
#tagline,
#sub,
#cta {
  opacity: 0;
}
