/* Section: Base tokens */
:root {
  --bg: #0a0f1a;
  --bg-2: #14102a;
  --text: #eaf2ff;
  --muted: #a6b4d4;
  --accent: #4169e1;      /* royal blue */
  --accent-2: #5b0a6f;     /* aubergine */
  --glass: rgba(18, 0, 40, 0.32);
  --glass-strong: rgba(18, 0, 40, 0.52);
  --border: rgba(255,255,255,0.25);
  --shadow: 0 8px 28px rgba(0,0,0,.25);
  --focus: 0 0 0 3px rgba(120,170,255,.6);
}

/* Section: Global */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  background: linear-gradient(135deg, rgba(65,105,225,.15) 0%, rgba(60,0,90,.28) 60%, rgba(0,0,0,.4) 100%), #0a0e1a;
  min-height: 100%;
  position: relative;
  overflow-x: hidden;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
body::before {
  background:
    radial-gradient(circle at 20% 10%, rgba(65,105,225,.25), transparent 40%),
    radial-gradient(circle at 70% 0%, rgba(123,0,200,.20), transparent 40%),
    linear-gradient(135deg, rgba(10,0,40,.6), rgba(0,0,0,0));
  mix-blend-mode: screen;
  filter: saturate(1.1);
}
body::after {
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  opacity: .25;
  mix-blend-mode: overlay;
}

/* Section: Layout helpers */
.container { width: 100%; max-width: clamp(720px, 90vw, 1120px); padding: 0 1rem; margin: 0 auto; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--glass); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); }

/* Section: Explicit content helpers */
.tag { font-size: .75rem; padding: .25em .6em; border-radius: 999px; border: 1px solid rgba(65,105,225,.5); background: rgba(65,105,225,.15); color: #eaf0ff; }

/* Section: Glass panels (structural sections) */
header, main, footer, aside, article { background: transparent; }

/* Section: Hero header styling (glass panel) */
header {
  background: linear-gradient(to bottom right, rgba(65,105,225,.22), rgba(60,0,90,.28));
  border: 1px solid rgba(180,160,255,.45);
  border-radius: 16px;
  padding: 2rem 1rem;
  margin: 1.25rem auto;
  max-width: 1100px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
header h1 { font-size: clamp(1.6rem, 1.2rem + 3vw, 2.8rem); line-height: 1.15; margin: .25rem 0 .5rem; color: #f7fbff; letter-spacing: .2px; }
header .meta { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas; font-size: .9rem; margin-top: .25rem; }

/* Section: Nav */
nav { margin-top: .75rem; }
nav a { color: #e8f0ff; text-decoration: none; padding: .4rem .75rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); }
nav a:hover { text-decoration: underline; }

/* Section: Main content */
main { padding: 0.5rem 1rem 2rem; }
article {
  margin: 1rem auto 0;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(180,120,240,.4);
  background: rgba(18, 0, 50, 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.featured-image { margin: 1rem 0; }
.featured-image img {
  width: 100%; height: auto; display: block; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
article h1 { font-size: clamp(1.4rem, 1rem + 2.5vw, 2.4rem); margin: .25rem 0 .5rem; color: #f7fbff; }
article h2 { font-size: clamp(1.1rem, 0.9rem + 1.5vw, 1.6rem); margin-top: .75rem; color: #eaf0ff; }
article p { color: #eaf1ff; margin: .4rem 0 1rem; }
article ul, article ol { margin: .4rem 0 1rem 1.25rem; color: #f2f7ff; }
article li { margin: .25rem 0; }
blockquote { margin: .75rem 0; padding-left: .75rem; border-left: 3px solid var(--accent); color: #e9f0ff; }

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

/* Section: Footer / ads */
footer { padding: 1rem 0; text-align: center; color: var(--muted); }
.product-ad, .sponsored-page { display: inline-block; padding: .55rem 1rem; margin: .25rem; border-radius: 8px; background: rgba(30,0,60,.32); border: 1px solid rgba(170,140,255,.5); text-decoration: none; color: #eaf0ff; }

/* Section: Interactive controls (buttons & links) */
a, button, .btn, .cta {
  color: #fff;
  background: var(--accent);
  border: 1px solid rgba(255,255,255,.25);
  padding: .7em 1.05em;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
a:hover, button:hover, .btn:hover, .cta:hover { background: #2a57e3; text-decoration: none; transform: translateY(-1px); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(120,170,255,.6);
}
a:focus-visible { outline-offset: 2px; border-color: rgba(180,200,255,.9); }

/* Outline variants */
.btn--outline { background: transparent; color: var(--text); border: 1px solid rgba(130,160,255,.8); }
.btn--outline:hover { background: rgba(130,160,255,.15); color: #eaf0ff; }

/* Section: Content helper */
.content { padding: 1rem; color: var(--text); }

/* Section: Accessibility helpers (motion) */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .cta, a, .btn, button { transition: none; }
}

/* Section: Print */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: #fff; }
  a, button { text-decoration: underline; color: #000; }
}