/* Section: Tokens & Base
   - Mobile-first, indigo/midnight cyberpunk palette
*/
:root{
  --bg: #0a0f22;
  --bg-2: #0b1226;
  --surface: rgba(20,26,58,.72);
  --surface-2: rgba(14,20,44,.60);
  --text: #e8f0ff;
  --muted: #a6b4d0;
  --accent: #6b7cff;
  --accent-2: #8fb4ff;
  --border: rgba(140,150,255,.45);
  --glass: rgba(255,255,255,.08);
  --glass-2: rgba(255,255,255,.14);
  --focus: 2px solid var(--accent-2);
  --shadow: 0 8px 24px rgba(0,0,0,.35);
  --radius: 12px;
}

/* Section: Base resets
   - No resets beyond what is necessary; semantic defaults preserved
*/
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(8,10,26,.92) 0%, rgba(7,9,25,.92) 60%, rgba(9,12,28,.92) 100%),
    linear-gradient(to bottom, rgba(255,255,255,.04), rgba(255,255,255,.02)),
    #05070f;
  background-blend-mode: overlay, overlay, normal;
  background-size: cover;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Section: Layered background: subtle noise/scanlines (pure CSS)
   - Two layered gradients + lightweight scanline texture
*/
body {
  background-image:
    linear-gradient(135deg, rgba(16,18,42,.75), rgba(6,9,25,.75)),
    linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    linear-gradient(to right, rgba(0,0,0,.0), rgba(0,0,0,.0));
  background-size: auto, auto, cover;
  background-repeat: repeat, repeat, no-repeat;
  min-height: 100%;
}

/* Section: Layout helpers
   - Centered container, responsive grid utilities
*/
.container {
  width: 100%;
  max-width: clamp(640px, 86vw, 1120px);
  padding-inline: 1rem;
  margin-inline: auto;
}
.grid { display: grid; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }

/* Section: Glass panels (with fallback)
   - Backdrop blur where supported; fallback uses higher opacity
*/
.glass {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.40); }
}

/* Section: Typography
   - Fluid, accessible yet compact
*/
h1, h2 { margin: 0.25rem 0; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 1.8rem + 2vw, 3.25rem); line-height: 1.08; letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 0.9vw + 1.1rem, 2rem); line-height: 1.15; }
p { font-size: clamp(1rem, 0.8vw + 0.9rem, 1.25rem); line-height: 1.5; color: var(--text); }
ul { margin: .5rem 0 1rem 1.1rem; padding: 0; }
li { margin: .25rem 0; }

/* Section: Image frame
   - Aspect ratio, object-fit, glow/border
*/
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  background: #0b1430;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  image-rendering: auto;
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.04); }

/* Section: Links, buttons, and CTA styles
   - High contrast focus ring via :focus-visible
*/
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: var(--focus); outline-offset: 2px; border-radius: 6px; }

/* Buttons (solid and outline variants) */
.btn, .cta { display: inline-block; padding: .68rem 1rem; border-radius: 8px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .2s ease, background-color .2s ease, color .2s; }
.btn { background: linear-gradient(#6b79ff, #4f5bd2); color: #fff; border: 1px solid rgba(128,140,255,.75); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.btn:active { transform: translateY(0); }
.cta { background: transparent; color: var(--text); border: 1px solid rgba(140,150,255,.75); }
.btn.secondary { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); color: var(--text); }

/* Section: Header, main, footer
   - Glassy, accessible contrast on titles
*/
header, footer { width: 100%; }
header { padding: 1.25rem 0 0.75rem; text-align: center; }
header h1 { color: #eaf2ff; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
header .meta { color: var(--muted); font-size: clamp(0.8rem, 0.6vw + 0.6rem, 0.95rem); }

/* Section: Main layout
   - Mobile-first stacking; on wide viewports, image floats left for a two-column feel
*/
main { padding: 1rem 0; }
.featured-image { width: 100%; }

/* Two-column feel on larger screens without restructuring HTML
   - Float image left, allow text to flow to the right
*/
@media (min-width: 768px) {
  article { overflow: hidden; }
  .featured-image { float: left; width: 42%; margin-right: 3rem; }
  article > * { overflow: hidden; }
}

/* Section: Footer: product ads
   - Glassy blocks with clear callouts
*/
.product-ad, .sponsored-page {
  display: block; width: max-content; margin: .25rem auto; padding: .6rem 1rem; border-radius: 9px;
  background: rgba(15,19,48,.58); border: 1px solid rgba(120,140,255,.65);
}
.product-ad a, .sponsored-page a { color: #e8f0ff; text-decoration: none; }
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Section: Utilities
   - Simple grid helpers for potential future sections
*/
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; }

/* Section: Aside (hidden by default; available for accessibility/test)
*/
aside { display: none; }

/* Section: Print support
   - Basic readability for print
*/
@media print {
  body { background: #fff; color: #000; }
  a { color: #00f; text-decoration: underline; }
}
  
/* Section: Reduce motion
   - Respect user preference for reduced motion
*/
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}