/* Tokens */
:root {
  --bg: #0b0f14;           /* deep space backdrop (burnt blue mix) */
  --bg-2: #0a1a2a;
  --text: #eaf6ff;          /* high-contrast on glass */
  --muted: #a9b7cd;
  --accent: #1fb6ff;         /* cyber blue */
  --accent-2: #ff7a1a;       /* burnt orange */
  --panel: rgba(8, 20, 40, 0.28);
  --glass-border: rgba(120, 180, 255, 0.28);
  --shadow: 0 8px 28px rgba(0,0,0,.25);
  --radius: 12px;
}

/* Section: Base, Layout, Typography */
html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-family: ui-system, system-ui, -apple-system, "Segoe UI", Roboto, Arial; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  /* Layered background: gradient + subtle scanlines (pure CSS) */
  background-image:
    linear-gradient(135deg, rgba(255,122,26,.14) 0%, rgba(31,182,255,.14) 60%, rgba(2,6,23,.92) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.035) 0 1px, transparent 1px 2px);
  background-blend-mode: screen;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Respect user motion preferences */
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* Utility layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr));
}
.card {
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(8, 16, 34, 0.28);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .25em .5em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(31,182,255,.18);
  color: #e8f7ff;
  border: 1px solid rgba(31,182,255,.4);
}
ul, li { margin: 0; padding: 0; list-style: none; }

/* Section: Structural elements styling (HTML targets) */
header {
  padding: 1.25rem 1rem;
  text-align: center;
}
header h1 {
  margin: 0 0 .4rem;
  font-size: clamp(1.4rem, 1.2rem + 1vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: .2px;
}
nav {
  margin-top: .25rem;
}
nav a {
  color: var(--accent);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 6px;
  border: 1px solid rgba(31,182,255,.35);
}
nav a:hover, nav a:focus-visible {
  text-decoration: underline;
  outline: none;
  color: var(--accent-2);
}
main { padding: 1rem; }
article { display: block; }

/* Section: Image frame styling */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(120,180,255,.28);
  background: rgba(8, 14, 28, 0.5);
  box-shadow: 0 12px 38px rgba(0,0,0,.25);
  display: block;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
  filter: saturate(1.05);
}
@media (min-width: 760px) {
  .image-frame { border-radius: 16px; }
}

/* Section: Glass panels (with fallback) */
.glass {
  background: rgba(10, 20, 40, 0.22);
  border: 1px solid rgba(120, 180, 255, 0.28);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .glass { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}
@supports not (backdrop-filter: blur(8px)) and not (-webkit-backdrop-filter: blur(8px)) {
  .glass { background: rgba(10, 20, 40, 0.6); border-color: rgba(120,180,255,0.45); }
}

/* Section: Buttons & links (interactive states) */
a, button, .btn, .cta {
  cursor: pointer;
  outline: none;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; color: var(--accent-2); outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: linear-gradient(to bottom, rgba(31,182,255,.95), rgba(14, 165, 233,.95));
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.btn:active { transform: translateY(0); }
.btn.outline {
  background: transparent;
  border: 1px solid rgba(31,182,255,.8);
  color: var(--text);
}
.cta {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(25, 118, 210, .4);
  color: #eaffff;
  text-decoration: none;
  font-weight: 600;
}
.cta:hover { background: rgba(25,118,210,.6); }

/* Section: Footer blocks (product ads) */
.product-ad, .sponsored-page {
  margin: .5rem 0;
}
footer p { margin: .25rem 0; color: var(--muted); font-size: .9rem; text-align: center; }

/* Section: Typography scaling for hero-like emphasis */
h1, h2, h3 { line-height: 1.15; font-weight: 700; }
p { margin: .5rem 0 1rem; color: var(--muted); }

/* Section: Print readability (basic) */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .glass { background: #fff; border: 1px solid #ccc; box-shadow: none; }
}

/* Section: Reduced motion (alternative) for motion-sensitive users */
@media (prefers-reduced-motion: reduce) {
  .btn, .cta { transition: none; }
}

/* Practical focus rings for keyboard users on interactive elements specifically */
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 3px solid rgba(31,182,255,.85);
  outline-offset: 2px;
  border-radius: 6px;
}