/* Base tokens */
:root{
  --bg: #0a001a;
  --bg-2: #140033;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.12);
  --text: #e9eaff;
  --muted: #b5a9ce;
  --accent: #7bdcff;
  --accent-2: #d66aff;
  --border: rgba(255,255,255,0.28);
  --shadow: 0 8px 28px rgba(0,0,0,0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 0 0 0 3px rgba(123, 220, 255, 0.6);
  --glow: 0 0 24px rgba(123,220,255,.25);
}
/* Global resets & background layer (gradient + scanlines) */
html, body { height: 100%; }
* { box-sizing: border-box; }
html {
  color-scheme: dark;
}
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial;
  color: var(--text);
  background: linear-gradient(135deg, rgba(30,0,60,.9) 0%, rgba(6,0,20,.92) 60%, rgba(10,0,25,.96) 100%), var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(0,0,0,.04) 0 2px, transparent 2px 4px);
  mix-blend-mode: overlay;
  opacity: .6;
  pointer-events: none;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; }
a:focus-visible { outline: none; box-shadow: var(--focus); outline-offset: 2px; }

/* Layout utilities (mobile-first) */
.container { width: 100%; max-width: clamp(680px, 92vw, 1100px); margin-inline: auto; padding: 0 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Page structure styling */
html, body, header, nav, main, article, footer, aside {
  display: block;
}
header {
  padding: 1.25rem 1rem;
  position: relative;
  z-index: 1;
}
header h1 {
  font-size: clamp(1.4rem, 1.6vw + 1rem, 2.4rem);
  line-height: 1.15;
  margin: 0 0 .25rem;
  letter-spacing: .2px;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.8rem, 0.6vw + .6rem, 1rem);
}
main { padding: 1rem 0; }
article {
  /* Glass panel with backdrop blur (fallback handled below) */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  article {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.12);
  }
}
@supports not (backdrop-filter: blur(8px)) and not (-webkit-backdrop-filter: blur(8px)) {
  article {
    background: rgba(255,255,255,0.18);
  }
}
.featured-image { width: 100%; margin-bottom: .75rem; }
.image-frame {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
  background: #111;
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content typography & structure */
.content { line-height: 1.6; color: var(--text); }
.content h1 { margin: .75rem 0 0.25rem; font-size: clamp(1.6rem, 2vw + 1rem, 2.8rem); }
.content h2 { font-size: clamp(1.25rem, 1.2vw + 1rem, 1.75rem); margin: 1rem 0 .5rem; }
.content h3 { font-size: clamp(1.05rem, 1vw + .9rem, 1.25rem); margin: .75rem 0; }
.content p { margin: .75rem 0; }
.content ul { margin: .75rem 0 1rem 1.25rem; padding: 0; }
.content li { margin: .35rem 0; }

/* Utility / component classes */
.container { /* kept for compatibility */ }
.grid { /* responsive grid */ }
.card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-sm);
  padding: .75rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  font-size: .75rem;
  color: var(--muted);
  background: rgba(0,0,0,.15);
}

/* Product ad (footer) */
.product-ad {
  display: block;
  padding: .9rem 1rem;
  margin: .5rem 0 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0,0,0,.22);
  text-align: left;
}
.product-ad h3 { margin: 0 0 .25rem; font-size: 1rem; }
.product-ad a { display: inline-block; width: max-content; }

/* Buttons & links (solid + outline variants) */
.btn, .cta, a, button {
  font: inherit;
  cursor: pointer;
}
.btn {
  display: inline-block;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  background: linear-gradient(135deg, rgba(63,97,255,.95), rgba(25,41,190,.95));
  color: #fff;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--glow); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }

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

/* Forms (basic) */
input, textarea, select {
  font: inherit;
  padding: .6rem .75rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.08);
  color: var(--text);
  width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; box-shadow: var(--focus); }

/* Typography scale helpers for responsive type */
@media (min-width: 720px) {
  .container { padding: 0 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
article, header, main, footer { animation: fadeInUp .4s ease both; }

/* Accessibility refinements for contrast on glass */
@media (prefers-contrast: more) {
  :root { --surface: rgba(255,255,255,.14); }
  article { border-color: rgba(255,255,255,.5); }
}
