/* Core tokens */
:root {
  --bg: #0a1020;
  --bg-2: #0b1a2b;
  --text: #eaf6ff;
  --muted: #a6b6d9;
  --accent: #b9ff00;
  --accent-2: #6aff2e;
  --card: rgba(255,255,255,.08);
  --card-soft: rgba(255,255,255,.14);
  --border: rgba(255,255,255,.28);
  --shadow: 0 6px 18px rgba(0,0,0,.28);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 2px solid #fff;
  --focus-offset: 2px;
}

/* Layout primitives */
html, body { height: 100%; }
html { color-scheme: dark; }
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  line-height: 1.5;
  background:
    linear-gradient(135deg, rgba(9,14,30,.95) 0%, rgba(5,8,20,.95) 60%, rgba(9,14,30,.95) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.15)),
    repeating-linear-gradient(to bottom, rgba(184,255,0,.05) 0 4px, transparent 4px 8px),
    repeating-linear-gradient(to right, rgba(184,255,0,.05) 0 4px, transparent 4px 8px);
  background-blend-mode: overlay, overlay, normal, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  overflow-x: hidden;
}

/* Chartreuse pixel mosaic overlay (subtle) via layered gradients on body::before */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(45deg, rgba(0,0,0,.0) 0 50%, rgba(184,255,0,.12) 50% 51%, rgba(0,0,0,.0) 51% 100%),
    linear-gradient(-45deg, rgba(0,0,0,.0) 0 50%, rgba(184,255,0,.08) 50% 51%, rgba(0,0,0,.0) 51% 100%);
  background-size: 8px 8px, 8px 8px;
  mix-blend-mode: overlay;
  opacity: .6;
  border-radius: 0;
  filter: saturate(1.2);
}

/* Glass system (fallback + backdrop-filter when available) */
.glass {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* Fallback for older/environments without backdrop-filter */
  /* opacity will still show as glass-like due to rgba background */
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.12); }
}

/* Layout containers & helpers */
.header, .container, header, main, article, nav, aside, footer { display: block; }

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
  padding: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@supports not (backdrop-filter: blur(8px)) {
  .card { background: rgba(255,255,255,.08); }
}

.tag {
  display:inline-block;
  padding: .25em .5em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(184,255,0,.15);
  border: 1px solid rgba(184,255,0,.35);
  color: #eaffcc;
}

/* Hero / typography */
header {
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8,12,24,.65);
  border-bottom: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
header h1 {
  margin: 0 0 .25rem;
  font-size: clamp(1.25rem, 2.4vw + 0.5rem, 2rem);
  letter-spacing: .2px;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.15);
}
a, button, .btn, .cta {
  outline: none;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}

/* Image frame styling */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 22px rgba(0,0,0,.4);
  background: #0b1120;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Content area (generic) */
.content { padding: 1rem; }

/* Product ad block in footer */
.product-ad {
  display: block;
  text-align: center;
  padding: .8rem;
  margin: .25rem 0;
  border-radius: var(--radius);
  background: rgba(8,12,28,.6);
  border: 1px solid rgba(255,255,255,.28);
}
.product-ad a { color: var(--text); text-decoration: none; display: block; padding: .25rem; }
.product-ad a:hover { text-decoration: underline; }

/* Link/button styling across the page */
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; color: #d1ff6a; }

.btn, .cta {
  display: inline-block;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  text-decoration: none;
  color: #04100a;
  background: linear-gradient(135deg, rgba(183,255,0,.95), rgba(110,255,0,.92));
  font-weight: 700;
  letter-spacing: .2px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .25s ease;
  user-select: none;
}
.btn:hover, .cta:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.btn:active, .cta:active { transform: translateY(0); }
.btn.secondary {
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.25);
}
.btn:focus-visible, .cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
a.btn { display: inline-flex; align-items: center; gap: .5em; }

/* Utilities */
ul, li { margin: 0; padding: 0; list-style: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, nav, footer { display: none !important; }
  .container { width: 100%; padding: 0; }
  img { max-width: 100%; height: auto; }
}