/* Base tokens */
:root{
  --bg: #0a1020;
  --bg-2: #0b1a32;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.12);
  --border: rgba(255,255,255,0.25);
  --text: #e8f6ff;
  --muted: #b8d0ea;
  --accent: #4fb0ff;
  --accent-2: #7bd5ff;
  --shadow: 0 8px 28px rgba(0,0,0,0.25);
  --radius: 14px;
  --focus: 2px solid #9bd;
  --focus-offset: 3px;
}

/* Base / Layout */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  /* Layered background: gradient + subtle noise + scanlines (pure CSS) */
  background-image:
    linear-gradient(135deg, rgba(60,120,255,0.22), rgba(0,0,0,0) 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, overlay;
  background-size: cover;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }

/* Utility containers */
.container { width: 100%; max-width: clamp(320px, 88vw, 1100px); margin-inline: auto; padding-inline: 1rem; }

/* Core sections styling */
header, nav, main, article, aside, footer { padding: 1rem 0; }
header { padding-block: 1.25rem; }
header h1 { font-size: clamp(1.75rem, 4vw + 1rem, 3rem); line-height: 1.08; margin: 0 0 .25rem; letter-spacing: .2px; }
header .meta { color: var(--muted); font-size: .92rem; margin: .25rem 0 0; }

/* Hero / navigation */
nav { display: flex; gap: .5rem; align-items: center; justify-content: flex-start; }
nav a { color: var(--accent-2); text-decoration: none; padding: .25rem .5rem; border-radius: 6px; border: 1px solid rgba(123,213,255,0.4); }
nav a:hover, nav a:focus-visible { text-decoration: underline; background: rgba(123,213,255,0.18); outline: none; }

/* Content and article */
main { display: block; }
article { display: block; margin: 0 auto; padding: 0.25rem 0 1rem; }
.featured-image { width: 100%; margin: 0 0 1rem; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.25); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.featured-image img { width: 100%; height: auto; display: block; }

/* Image frame (alternate class) */
.image-frame { display: block; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.04); box-shadow: inset 0 0 12px rgba(0,0,0,0.15); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Glass panel / frosted card */
.content { padding: 0.75rem; }
.card, .splash, .glass { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* Product ad / sponsor blocks (footer) */
.product-ad, .sponsored-page {
  display: block;
  text-align: center;
  padding: .75rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: block; padding: .25rem; }
.product-ad:hover, .sponsored-page:hover { transform: translateY(-1px); }

/* Typography hierarchy helpers */
h2 { font-size: clamp(1.25rem, 2.6vw + .75rem, 2rem); margin: .75rem 0; color: #eaf4ff; }
h3 { font-size: clamp(1rem, 1.8vw + .5rem, 1.35rem); margin: .75rem 0; color: #eaf4ff; }

/* Lists and inline content */
ul { padding-left: 1.25rem; margin: .4rem 0 1rem; }
li { margin: .25rem 0; }

/* Quote */
blockquote { margin: 1rem 0; padding: .75rem 1rem; border-left: 3px solid rgba(123,213,255,0.8); background: rgba(10,20,40,0.25); border-radius: 6px; }

/* Link/button styles (interactive elements) */
a, button, .btn, .cta { text-decoration: none; color: var(--text); }
button, .btn { display: inline-block; padding: .55rem 1rem; border-radius: 8px; border: 1px solid rgba(120,180,255,0.8); cursor: pointer; background: rgba(60,110,230,0.95); color: #fff; transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s; }
button:hover, .btn:hover { transform: translateY(-1px); }
.btn.outline { background: transparent; border-color: rgba(120,180,255,0.9); color: var(--text); }
.cta { font-weight: 600; }

/* Focus treatments (accessible) */
:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); border-radius: 6px; }

/* Grid utilities (responsive utilities) */
.grid { display: grid; gap: 1rem; }
.grid.autofit { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Print styles */
@media print {
  html, body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #06c; }
  .container { padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}