/* Section: Tokens & Palette */
:root {
  --bg: #0b0b14;
  --bg-2: #1b0a2a;
  --text: #eafff7;
  --muted: #a6a6b3;
  --accent: #2cff88;      /* glowstick green */
  --accent-2: #7c5cff;    /* galaxy purple */
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.12);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 6px 20px rgba(0,0,0,0.28);
  --radius: 14px;
  --focus: 3px solid var(--accent);
  --focus-offset: 2px;
}

/* Section: Reset & Base */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif; line-height: 1.5; color: var(--text); }
body {
  margin: 0;
  min-height: 100%;
  background: 
    radial-gradient(circle at 20% 0, rgba(0,255,136,0.20), transparent 25%),
    radial-gradient(circle at 80% 20%, rgba(124,92,255,0.25), transparent 28%),
    linear-gradient(135deg, #0a0a14 0%, #1a0936 40%, #0a0a14 100%);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.08) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: 0.5;
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
  html, body { scroll-behavior: auto; }
}
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}

/* Section: Layout Helpers */
.container {
  width: min(100%, clamp(320px, 92vw, 1120px));
  margin-inline: auto;
  padding: 0 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: 0.15em 0.5em;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(124,92,255,0.25);
  color: #eafff7;
  border: 1px solid rgba(124,92,255,0.6);
}
ul, li { list-style: none; padding: 0; margin: 0; }

/* Section: Glass Panels (with fallback) */
.glass {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  padding: 1rem;
  backdrop-filter: blur(12px) saturate(1.05);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,0.18); }
}

/* Section: Typography */
h1 { font-size: clamp(1.6rem, 1.2rem + 2.4vw, 3rem); line-height: 1.15; margin: 0 0 .5rem; color: #eaffff; }
p { font-size: clamp(0.95rem, 0.4vw + 0.9rem, 1.125rem); color: var(--muted); }
.small { font-size: 0.85rem; color: var(--muted); }

/* Section: Interactive (Links & CTAs) */
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); border-radius: 4px; }

/* Buttons & CTAs */
.btn, .cta, button {
  font-family: inherit;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn { background: var(--accent); color: #062210; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); }

.btn--outline {
  background: transparent;
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
}
.btn--outline:hover { background: rgba(124,92,255,0.15); }

/* Section: Regions/Elements */
header, nav, main, article, aside, footer { padding: 0; }

/* Section: Image Frame */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(0,0,0,0.25);
  display: block;
  box-shadow: 0 0 14px rgba(0,255,120,0.5);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  /* Subtle glow on the image for cyberpunk vibe */
  filter: saturate(1.05);
}

/* Section: Content blocks */
.content { padding: 1rem; border-radius: 12px; }

/* Section: Product Ad & Aside Styling */
.product-ad {
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: rgba(0,0,0,0.15);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.25);
  display: inline-block;
}
.product-ad a { color: #eafff7; text-decoration: none; }
.product-ad a:hover { text-decoration: underline; }

aside { padding: 0.5rem; }

/* Section: Print adjustments (basic readability) */
@media print {
  .image-frame { page-break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}