/* Base & Tokens */
:root{
  --bg: #0a0b1a;
  --bg-2: #0b1a40;
  --text: #eaf4ff;
  --muted: #a7b8e0;
  --surface: rgba(255,255,255,.08);
  --surface-2: rgba(255,255,255,.12);
  --accent: #4b79ff;        /* royal blue */
  --accent-2: #7a5cff;
  --border: rgba(255,255,255,.25);
  --focus: 0 0 0 3px rgba(66, 153, 255, .75);
  --radius: 14px;
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --shadow-soft: 0 4px 14px rgba(0,0,0,.18);
}

html, body, header, nav, main, article, footer, aside { box-sizing: border-box; }
html, body { height: 100%; }
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Layered ultraviolet background with subtle scanline/noise */
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(135deg, #0a0d1a 0%, #0b1030 60%, #0a0b1a 100%);
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  /* Ultrafine scanlines + soft noise feel */
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(255,255,255,.03) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% 20%, rgba(80,140,255,.08), transparent 40px),
    radial-gradient(circle at 70% 60%, rgba(180,110,255,.07), transparent 40px);
  mix-blend-mode: overlay;
  opacity: .75;
  z-index: -1;
  pointer-events: none;
  filter: saturate(110%);
}
@supports not (backdrop-filter: blur(8px)) {
  body::before { opacity: .9; }
}

/* Layout helpers (utility-like) */
.container { width: 100%; max-width: clamp(700px, 92vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-soft); }
.tag { display:inline-block; padding: .25em .6em; border-radius: 999px; font-size: .75rem; color: #eaf4ff; background: rgba(75,121,255,.25); border: 1px solid rgba(75,121,255,.55); }

/* Core typography (fluid) */
h1, h2, h3 { margin: .25rem 0; line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 2.5vw, 2rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 700; color: #eaf2ff; }
p { margin: 0 0 1rem; font-size: clamp(0.95rem, 1.6vw, 1rem); line-height: 1.6; color: var(--muted); }

/* Glassy surfaces (fallback if backdrop-filter unsupported) */
.glass {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
}
@supports not (backdrop-filter: blur(10px)) {
  .glass { background: rgba(255,255,255,.12); }
}

/* Header, main, footer baseline styling */
header {
  padding: 1rem 1rem;
  margin: 0 auto;
  width: 100%;
  background: rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.25);
  border-radius: 0;
  display: block;
}
header h1 { font-size: clamp(1.4rem, 3.5vw, 2.4rem); margin: .25rem 0 .25rem; }
header .meta { color: var(--muted); font-size: .92rem; }
nav { margin-top: .5rem; }
nav a { color: var(--accent); text-decoration: none; padding: .25rem .5rem; border-radius: 6px; }
nav a:hover { text-decoration: underline; }

/* Main/article content area */
main { padding: 1rem; }
article { display: block; }
.article-hero { display: grid; gap: 1rem; }

/* Image handling rules */
.image-frame { aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border-radius: 12px; 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; }

/* Featured image wrapper (alignment with provided HTML) */
.featured-image { margin: 1rem 0; border-radius: 12px; overflow: hidden; }
.featured-image img { display: block; width: 100%; height: auto; }

/* Content tweaks for legibility over glassy surfaces */
.content { max-width: 60ch; color: var(--text); }

/* Product ad block (footer region) */
.product-ad { display: block; padding: .8rem; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); background: rgba(0, 102, 204, .18); text-align: center; }
.product-ad a { display: inline-block; padding: .5rem 1rem; border-radius: 8px; color: #eaffff; text-decoration: none; background: rgba(0,120,255,.35); border: 1px solid rgba(0,120,255,.7); }
.product-ad a:hover { text-decoration: underline; }

/* Link/button styles (interactive) */
a, button, .btn, .cta { transition: transform .2s ease, background .2s ease; cursor: pointer; color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }
.btn, .cta, a.btn, a.cta { display: inline-block; padding: .6em 1em; border-radius: 8px; border: 1px solid rgba(255,255,255,.45); background: var(--accent); color: #fff; text-align: center; }
.btn:hover, .cta:hover, a.btn:hover, a.cta:hover { transform: translateY(-1px); background: #5b89ff; }
.btn--outline { background: transparent; border: 1px solid rgba(125, 170, 255, .8); color: var(--text); }
.btn:focus-visible, .cta:focus-visible, a.btn:focus-visible, a.cta:focus-visible {
  outline: 0; box-shadow: var(--focus);
  border-color: rgba(0,180,255,.95);
}
a:focus-visible { outline: none; box-shadow: var(--focus); }

/* Lists (ul, li) */
ul { padding-left: 1.25rem; margin: .5rem 0 1rem; }
li { margin: .25rem 0; }

/* Footer layout & styling */
footer { padding: 1rem; display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
footer p { text-align: center; color: var(--muted); margin: .25rem 0 0; }
@media (min-width: 640px) {
  footer { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 980px) {
  main { padding: 1.5rem 1rem; }
  article { padding: 0; }
  .image-frame { border-radius: 14px; }
}

/* Print-friendly tweaks */
@media print {
  body { color: #000; background: #fff; }
  a { color: #0000aa; text-decoration: underline; }
}
