/* Section: Tokens & Base
   Tokens derived for cobalt + cyber yellow aesthetic with glassy surfaces. 
*/
:root {
  --bg: #0b1220;
  --bg-2: #0a1a38;
  --text: #eaf2ff;
  --muted: #a6b4d0;
  --accent: #ffd400;
  --accent-2: #7bdcff;
  --surface: rgba(255,255,255,.08);
  --surface-2: rgba(255,255,255,.12);
  --border: rgba(255,255,255,.28);
  --shadow: 0 6px 20px rgba(0,0,0,.32);
  --radius: 12px;
  --focus: 0 0 0 3px rgba(255, 212, 0, .75);
  --text-contrast: #ffffff;
}

/* Section: Global reset & layered background (gradient + scanlines) */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
body {
  margin: 0;
  color: var(--text);
  min-height: 100%;
  background: 
    linear-gradient(135deg, rgba(2,6,20,.92), rgba(8,22,60,.92) 60%, rgba(0,0,0,.92)),
    linear-gradient(135deg, rgba(0,0,0,.0), rgba(0,0,0,.25) 60%, rgba(0,0,0,.6));
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  /* Subtle cobalt scanlines (pure CSS) */
  background: 
    linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    linear-gradient(to right, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% 0%, rgba(0,180,240,.08), transparent 40%);
  background-size: auto 2px, 2px auto;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
  opacity: .75;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  /* faint glow + noise via gradients */
  background: radial-gradient(circle at 25% 10%, rgba(0,160,240,.08), transparent 40%),
              radial-gradient(circle at 70% 60%, rgba(255,215,0,.05), transparent 40%);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
  opacity: .9;
}
* { box-sizing: border-box; }

/* Section: Layout utilities
   - .container for centered content
   - .grid, .card utility patterns
*/
.container {
  max-width: clamp(320px, 90vw, 1100px);
  margin: 0 auto;
  padding: 0 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

/* Section: Typography
   - fluid/accessible type scale with clamp()
*/
h1, h2, h3 { margin: .25rem 0; font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 3rem); color: #eaffff; }
h2 { font-size: clamp(1.2rem, 0.9rem + 1.5vw, 2rem); color: #eaffff; }
p { color: var(--muted); margin: .5rem 0 1rem; }
ul { padding-left: 1.25rem; margin: .5rem 0 1rem; color: var(--text); }
li { margin: .25rem 0; }

/* Section: Image framing
   - .image-frame and its image
*/
.image-frame {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  background: #000;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Section: Glass panels (Fallback + Backdrop-filter)
   - general frosted panels for header/content/sections
*/
.content, header, main, footer, aside {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
}
.content { padding: 1rem; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
@supports not (backdrop-filter: blur(12px)) {
  .content { background: rgba(255,255,255,.14); }
}
header {
  text-align: center;
  padding: 1.75rem 1rem;
  margin: 0 auto 1rem;
  border-bottom: 0;
  background: rgba(2,6,20,.35);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
}
header h1 { margin: .25rem 0; font-size: clamp(1.8rem, 1vw + 1rem, 3rem); letter-spacing: .5px; }
header .meta { color: var(--muted); font-size: clamp(.8rem, .5vw, .95rem); }

nav a {
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  padding: .4rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  margin-inline: .25rem;
}
nav a:hover { text-decoration: underline; }

/* Section: Button & link styles
   - solid primary, outline variant, focus-visible ring
*/
a, button, .btn, .cta {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; }
.btn {
  display: inline-block;
  padding: .75rem 1.1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.25);
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); background: rgba(0,0,0,.35); }
.btn.primary {
  background: linear-gradient(to right, rgba(0,120,200,.95), rgba(0,60,150,.95));
  border: 1px solid rgba(255,255,255,.6);
}
.btn:focus-visible, .cta:focus-visible, a:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline-offset: 2px;
}
.cta {
  padding: .65rem 1rem;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,.6);
  background: transparent;
  color: var(--text);
}
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--text);
}

/* Section: Utility styling for lists + content blocks */
ul { list-style: disc; padding-left: 1.25rem; }

/* Section: Structural page layout
   - Centered container with responsive content
*/
main { padding: 0; }
footer {
  margin-top: 1.25rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: stretch;
  background: rgba(2,6,20,.35);
  border-top: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
}
.product-ad, .sponsored-page {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: .75rem;
  text-align: center;
}
.product-ad a, .sponsored-page a { color: var(--text); display: block; }

/* Section: Print styles */
@media print {
  body { background: #fff; color: #000; }
  a, a:visited { text-decoration: underline; }
}
  
/* Section: Motion preferences
   - Respect reduced motion
*/
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}