/* Base tokens */
:root {
  --bg: #0a0b12;
  --bg-2: #1b2130;
  --text: #eaf0ff;
  --muted: #a8b3c7;
  --panel: rgba(255, 255, 255, 0.14);
  --panel-strong: rgba(255, 255, 255, 0.22);
  --border: rgba(255, 255, 255, 0.32);
  --accent: #ff2bd1;
  --accent-2: #a400f0;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  --radius: 14px;
  --maxw: clamp(680px, 78vw, 1100px);
  --focus: 2px solid #fff;
  --focus-offset: 2px;
}

/* Section headers (sectioning comments) */
* { box-sizing: border-box; }

html, body, header, nav, main, article, footer, aside {
  height: auto;
  min-height: 0;
}

/* Global look & feel */
html, body {
  height: 100%;
  background: 
    linear-gradient(135deg, rgba(170, 0, 170, 0.15), rgba(0, 0, 0, 0.15)),
    linear-gradient(#0b0b12 0%, #0b0b12 60%, #0a0e18 100%);
  color: var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
}

/* Subtle layered noise/scanline (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  mix-blend-mode: overlay;
  opacity: .25;
}

/* Container & layout utilities */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1rem;
}

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

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: saturate(1.1) blur(8px);
  -webkit-backdrop-filter: saturate(1.1) blur(8px);
  color: var(--text);
}

.tag {
  display: inline-block;
  padding: .25em .6em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--text);
}

/* Image framing (supports provided selectors) */
.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);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transition: transform .6s ease;
}
.image-frame:hover img {
  transform: scale(1.03);
}

/* Imagery for provided .featured-image (fallback/backstop) */
.featured-image {
  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);
}
.featured-image img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.featured-image:hover img { transform: scale(1.03); }

/* Glass panels (backdrop/frosted) */
.backdrop {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .backdrop { background: rgba(255,255,255,.22); }
}

/* Header, main, article, footer, aside styling */
header {
  margin: 1rem auto;
  padding: 1.25rem;
  max-width: var(--maxw);
  text-align: center;
  border-radius: calc(var(--radius) + 6px);
  background: rgba(10, 10, 18, 0.45);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
header h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0 0 .25rem;
}
header .meta {
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  color: var(--muted);
}
main {
  display: grid;
  place-items: start;
  padding: 1rem 0 2rem;
}
article {
  width: 100%;
}
footer {
  padding: 1.25rem;
  margin-top: 1rem;
}
.product-ad {
  display: grid;
  gap: .5rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  text-align: center;
}
.product-ad p { margin: 0; font-weight: 600; }
.product-ad a { color: var(--text); text-decoration: none; display: inline-block; padding: .5rem 1rem; border-radius: 999px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); }
.product-ad a:hover, .product-ad a:focus { text-decoration: underline; }

/* Typography & content flow */
h2 { font-size: clamp(1.25rem, 3.5vw, 1.75rem); margin: 1.25rem 0 .5rem; color: var(--text); }
p { margin: .75rem 0; color: var(--text); font-size: clamp(14px, 2.2vw, 18px); }
ul { padding-left: 1.25rem; margin: .75rem 0; }
li { margin: .25rem 0; }

/* Blockquote styling (gentle highlight) */
blockquote {
  margin: .75rem 0;
  padding: .75rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(255,255,255,.05);
  border-radius: 6px;
  color: var(--text);
}

/* Link & button aesthetics (WCAG-friendly) */
a, button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  padding: .65em 1em;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
a:hover, a:focus { text-decoration: underline; text-underline-offset: 3px; outline: none; }
.btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: .95; }
.cta {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.4);
}
.btn:focus-visible, .cta:focus-visible, a:focus-visible, button:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}

/* Accessibility helpers for high-contrast text on glass */
@media (prefers-contrast: more) {
  :root { --text: #f8f8ff; }
  .card, .backdrop { background: rgba(255,255,255,.18); }
}

/* Responsive helpers */
@media (max-width: 720px) {
  header { padding: 1rem; }
  .product-ad { padding: .75rem; }
  .container { padding-inline: .75rem; }
}

/* Print styles for readability */
@media print {
  body { color: #000; background: #fff; }
  header, main, footer { background: transparent; box-shadow: none; }
  a, button, .btn, .cta { color: #000; background: none; border: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: translateZ(0); }
}