/* ============================================================
   base.css — CSS Variables, Reset & Foundations
   The OT Land Web | NandoCraft
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Share+Tech+Mono&family=Exo+2:wght@300;400;600;700;900&display=swap');

/* ── Pixel Font ──────────────────────────────────────────── */
.font-pixel { font-family: 'Press Start 2P', monospace; }

/* ── CSS Custom Properties ───────────────────────────────── */
:root {
  /* Core Palette */
  --clr-void:        #050608;
  --clr-abyss:       #090c10;
  --clr-deep:        #0d1117;
  --clr-surface:     #111820;
  --clr-panel:       #151e28;
  --clr-border:      #1e2d3d;
  --clr-border-dim:  #162030;
  --clr-muted:       #243040;

  /* Accent — Royal Blue (PRIMARY) */
  --clr-phosphor:    #4169ff;
  --clr-phosphor-dim:#2a4fdd;
  --clr-phosphor-glow: rgba(65, 105, 255, 0.14);
  --clr-phosphor-halo: rgba(65, 105, 255, 0.05);

  /* Accent — Amber */
  --clr-amber:       #ffb300;
  --clr-amber-dim:   #cc8f00;
  --clr-amber-glow:  rgba(255, 179, 0, 0.10);

  /* Accent — Cyan / Electric */
  --clr-cyber:       #00d4ff;
  --clr-cyber-dim:   #00aad4;
  --clr-cyber-glow:  rgba(0, 212, 255, 0.10);

  /* Text Scale */
  --clr-text-primary:   #c8d8e8;
  --clr-text-secondary: #7a9ab8;
  --clr-text-muted:     #3d5870;
  --clr-text-accent:    var(--clr-phosphor);

  /* Typography */
  --font-mono:   'Share Tech Mono', 'Courier New', monospace;
  --font-body:   'Exo 2', 'Segoe UI', sans-serif;

  /* Type Scale */
  --fs-xs:   0.65rem;
  --fs-sm:   0.75rem;
  --fs-base: 0.9rem;
  --fs-md:   1rem;
  --fs-lg:   1.2rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  2rem;
  --fs-3xl:  3rem;
  --fs-4xl:  4.5rem;
  --fs-hero: clamp(3rem, 8vw, 6.5rem);

  /* Spacing */
  --sp-xs:  0.25rem;
  --sp-sm:  0.5rem;
  --sp-md:  1rem;
  --sp-lg:  2rem;
  --sp-xl:  3rem;
  --sp-2xl: 5rem;
  --sp-3xl: 8rem;

  /* Effects */
  --glow-phosphor: 0 0 20px rgba(65, 105, 255, 0.5), 0 0 40px rgba(65, 105, 255, 0.2);
  --glow-amber:    0 0 20px rgba(255, 179, 0, 0.35),  0 0 40px rgba(255, 179, 0, 0.15);
  --glow-cyber:    0 0 20px rgba(0, 212, 255, 0.35),  0 0 40px rgba(0, 212, 255, 0.15);
  --shadow-panel:  0 4px 24px rgba(0, 0, 0, 0.5), 0 1px 0 var(--clr-border);
  --shadow-card:   0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.03);

  /* Borders */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;

  /* Transitions */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.4, 0, 1, 1);
  --dur-fast:  150ms;
  --dur-mid:   300ms;
  --dur-slow:  600ms;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--clr-void);
  color: var(--clr-text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: default;
}

/* Custom Cursor */
body { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='4' fill='none' stroke='%234169ff' stroke-width='1.5'/%3E%3Cline x1='10' y1='0' x2='10' y2='6' stroke='%234169ff' stroke-width='1'/%3E%3Cline x1='10' y1='14' x2='10' y2='20' stroke='%234169ff' stroke-width='1'/%3E%3Cline x1='0' y1='10' x2='6' y2='10' stroke='%234169ff' stroke-width='1'/%3E%3Cline x1='14' y1='10' x2='20' y2='10' stroke='%234169ff' stroke-width='1'/%3E%3C/svg%3E") 10 10, crosshair; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--clr-abyss); }
::-webkit-scrollbar-thumb { background: var(--clr-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--clr-phosphor-dim); }

/* ── Selection ───────────────────────────────────────────── */
::selection { background: var(--clr-phosphor-glow); color: var(--clr-phosphor); }

/* ── Focus ───────────────────────────────────────────────── */
:focus-visible { outline: 1px solid var(--clr-phosphor); outline-offset: 3px; }

/* ── Utility Classes ─────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.mono { font-family: var(--font-mono); }
.accent-green { color: var(--clr-phosphor); }
.accent-amber { color: var(--clr-amber); }
.accent-cyber  { color: var(--clr-cyber); }

.text-muted    { color: var(--clr-text-muted); }
.text-secondary { color: var(--clr-text-secondary); }

/* ── Global Scanline Overlay ─────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
  animation: scanlineShift 8s linear infinite;
}

@keyframes scanlineShift {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100vh; }
}

/* ── Noise Texture ───────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.025;
  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)' opacity='1'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
}
