/* Base tokens & resets */
:root {
  --bg: #0a0a0f;
  --bg-2: #14131b;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --text: #e9f0ff;
  --muted: #a6a6a6;
  --accent: #FF6F61;
  --accent-2: #FF8A60;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(0,0,0,.45);
  --focus: 2px solid var(--accent);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  font-size: clamp(14px, 0.9vw + 12px, 18px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
  background: 
    linear-gradient(135deg, rgba(10,10,20,.95) 0%, rgba(14,12,25,.95) 60%, rgba(8,8,12,.95) 100%),
    radial-gradient(circle at 20% 0%, rgba(255,115,92,.15), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, normal;
  color: var(--text);
  overflow-x: hidden;
}

/* Layered background refinement for subtle cyber grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(circle at 60% 20%, rgba(0,255,200,.04), transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(255,140,0,.04), transparent 40%);
  mix-blend-mode: overlay;
  filter: saturate(0.9);
  z-index: 0;
}

/* Layout helpers & typography scale */
.container {
  width: min(92%, 1100px);
  margin-inline: auto;
  padding: 0 0.5rem;
  position: relative;
  z-index: 1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
}
.card h3 { margin: .5rem 0; font-size: 1.1rem; }

.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
}

/* Glass panels with backdrop-filter (fallback provided) */
.glass {
  background: rgba(15, 15, 25, 0.18);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 6px 26px rgba(0,0,0,.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .glass {
    background: rgba(15,15,25,.28);
  }
}

/* Header, main, footer, aside styling per requirements */
header, nav, main, article, footer, aside {
  display: block;
}
header {
  text-align: center;
  padding: 2rem 1rem 1.25rem;
}
header h1 {
  font-size: clamp(1.75rem, 3.2vw, 3.5rem);
  line-height: 1.05;
  margin: 0.25rem 0 0.25rem;
  letter-spacing: .2px;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.9rem, 0.8vw, 1.05rem);
  margin-top: .25rem;
}
nav {
  margin-top: .5rem;
}
nav a {
  color: #fff;
  text-decoration: none;
  padding: .4rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  transition: transform .15s ease;
}
nav a:hover { transform: translateY(-1px); text-decoration: underline; }

/* Main content layout */
main { padding: 1rem 0 2rem; }
article { max-width: 72rem; margin-inline: auto; padding: 0 0.5rem; }

/* Content helpers */
.content { padding: 1rem; }

/* Paragraphs & lists */
p { color: #eaf0ff; margin: .6em 0; }
ul, ol { margin: .5em 0 1em 1.1em; color: var(--muted); }
li { margin: .25em 0; }

/* Links & CTAs (a, button, .btn, .cta) */
a, button, .btn, .cta {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
  transition: transform .15s ease, background-color .2s ease, color .2s ease;
}
a:hover, a:focus-visible { text-decoration: underline; outline: none; }
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .72em 1.1em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: linear-gradient(180deg, rgba(255,111,97,0.95), rgba(255,111,97,0.85));
  color: white;
  font-weight: 600;
}
.btn:focus-visible, .cta:focus-visible, a:focus-visible, button:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:active, .cta:active { transform: translateY(0); }

/* Outline variant */
.btn--outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.6);
  color: var(--text);
}
.btn--outline:hover { background: rgba(255,255,255,.08); }

/* Utility & typography helpers */
.tag {
  display:inline-block;
  padding:.15em .5em;
  font-size:.75rem;
  border-radius:999px;
  background: rgba(255,255,255,.15);
  color: #fff;
  border:1px solid rgba(255,255,255,.25);
}
.content h2 {
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  margin: .75em 0 .25em;
}
.content h1, .content h2, .content h3 { line-height: 1.25; }

/* Feature visuals inline within article */
.featured-image { margin: .75rem 0; border-radius: 12px; overflow: hidden; }

/* Footer sections as glass panels */
footer {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.product-ad, .sponsored-page {
  padding: .75rem;
}
.product-ad a, .sponsored-page a { text-align: center; display: block; padding: .75rem; }
.product-ad p, .sponsored-page p { margin: 0; font-weight: 600; }

/* Print styles (basic readability) */
@media print {
  body { background: white; color: #000; }
  a { text-decoration: underline; color: inherit; }
  .glass { background: transparent; border: 1px solid #000; box-shadow: none; }
}
  
/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Minor helper for responsive image frames in article if used */
@media (max-width: 720px) {
  header { padding: 1.5rem 0.75rem 1.25rem; }
  .grid { gap: .75rem; }
}