/* Base tokens */
:root{
  --bg: #041212;
  --bg-2: #0a1b1b;
  --text: #eafff7;
  --muted: #b7e6d9;
  --accent: #b31a2b;     /* burgundy */
  --accent-2: #2ee6b3;    /* mint / radar accent */
  --glass: rgba(255,255,255,.14);
  --glass-strong: rgba(255,255,255,.28);
  --shadow: 0 8px 24px rgba(0,0,0,.28);
  --radius: 14px;
}

/* Section: Baseline reset and typography */
html, body { height: 100%; }
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(135deg, rgba(4,18,18,.95) 0%, rgba(8,24,24,.95) 60%, rgba(4,12,12,.95) 100%);
  position: relative;
  overflow-x: hidden;
}

/* Section: layered background (radar sweep) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: conic-gradient(from 0deg at 50% 50%, rgba(46,230,179,.25), rgba(46,230,179,.0) 25%, rgba(46,230,179,.0) 75%, rgba(46,230,179,.25) 100%);
  mix-blend-mode: screen;
  animation: radar-sweep 14s linear infinite;
  opacity: .75;
}
@keyframes radar-sweep { to { transform: rotate(360deg); } }

/* Subtle scanlines / noise layer (pure CSS) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.08)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: .25;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), rgba(0,0,0,.0) 60%);
  content: "";
}

/* Section: Layout utilities */
.container {
  width: 100%;
  max-width: clamp(720px, 86vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
  position: relative;
  z-index: 1;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Section: Structural elements */
header, nav, main, article, aside, footer {
  /* ensure they participate in the flow and can receive glass panels if needed */
}
nav { padding: 0; margin: 0; }
main { padding: 0; }
article { padding: 0; }
aside { display: none; }

/* Section: Hero + header styling (future cyberpunk / hacker vibe) */
header {
  padding: 2rem 0 1.25rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
header h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
  line-height: 1.12;
  margin: .25rem 0 0.25rem;
  letter-spacing: .2px;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(0,0,0,.5);
}
header .meta {
  font-size: clamp(.9rem, 1.4vw, 1rem);
  color: var(--muted);
  margin-top: .25rem;
}

/* Section: Content chips / panels (glass) */
.card, .content, .product-ad {
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(6, 28, 28, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 1rem;
}
.content {
  color: var(--text);
  font-size: clamp(1rem, 1.2vw + .4rem, 1.125rem);
  line-height: 1.6;
  padding: 0;
}
.content p { margin: 0 0 1rem; }
.content h2, .content h3 { margin: .75rem 0 .5rem; }

/* Image framing */
.image-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.18);
  margin: 1rem 0;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
}

/* Section: Product ad in footer */
.product-ad {
  display: grid;
  gap: .75rem;
  padding: 1rem;
  background: rgba(12, 40, 40, 0.28);
  border: 1px solid rgba(255,255,255,.3);
}
.product-ad h3 { margin: 0; font-size: 1.05rem; }
.product-ad a {
  display: inline-block;
  padding: .6rem 0.75rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(0,0,0,.28);
}
.product-ad a:hover, .product-ad a:focus-visible { text-decoration: underline; }

/* Section: Links and controls (AA accessible focus) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
a { color: var(--accent-2); text-decoration: none; border-bottom: 1px dotted rgba(46,230,179,.4); }
a:hover { text-decoration: underline; }

/* Focus visibility for accessibility */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Button variants */
.btn { display: inline-block; padding: .65rem 1rem; border-radius: 999px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.3); }
.btn.primary, .cta {
  background: rgba(176,26,42,.95);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  padding: .65rem 1rem;
}
.btn.primary:hover, .cta:hover { background: #a0132c; transform: translateY(-1px); }

/* Subtle secondary button style if used without class */
.btn.secondary { background: rgba(0,0,0,.22); color: var(--text); }

/* Section: lists and tags */
ul, li { margin: 0; padding: 0; }
li { margin: 0.25rem 0; padding-left: 0.5rem; }

/* Section: utilities (compact) */
.tag {
  display: inline-block;
  padding: .25rem .5rem;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--text);
}

/* Section: Print-friendly (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
  nav, aside { display: none !important; }
}

/* Section: Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}