/* Base & Tokens */
:root{
  --bg: #04070f;
  --bg-2: rgba(4, 192, 196, 0.08);      /* bright turquoise glow accent */
  --text: #e8fbff;
  --muted: #a7dde3;
  --accent: #00f5ff;                    /* bright turquoise */
  --accent-2: #ff2f92;                  /* plasma pink */
  --glass: rgba(7, 12, 20, 0.28);        /* frosted glass */
  --glass-fallback: rgba(7, 12, 20, 0.6);
  --border: rgba(0, 255, 255, 0.38);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 0 0 0 3px rgba(0, 245, 255, 0.55);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html, body { margin: 0; padding: 0; }

/* Layered, neon-noise background (gradient + scanlines) */
html {
  background-color: var(--bg);
  background-image:
    linear-gradient(135deg, rgba(0,255,255,.12) 0%, rgba(0,0,0,0) 40%),
    repeating-linear-gradient(to bottom, rgba(0,255,255,.04) 0 2px, rgba(0,0,0,0) 2px 4px),
    linear-gradient(to bottom right, #04070f, #03040a 60%, #02040a);
  background-attachment: fixed;
}
body {
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Layout helpers (mobile-first) */
.container {
  width: 100%;
  max-width: clamp(520px, 68ch, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--glass);
  border: 1px solid rgba(0,255,255,.38);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  border-radius: 999px;
  font-size: .75rem;
  color: var(--text);
  background: rgba(0, 245, 255, 0.18);
  border: 1px solid rgba(0, 245, 255, 0.4);
}
a, button, .btn, .cta {
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); }
a:hover, a:focus { text-decoration: underline; outline: none; color: var(--accent); }

/* Focus treatments (WCAG AA) */
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Header, main, article, aside, footer (basic structure) */
html, body, header, nav, main, article, footer, aside {
  scroll-behavior: smooth;
}
header {
  padding-block: 1.25rem;
  padding-inline: 1rem;
}
header h1 {
  font-size: clamp(1.6rem, 1.6rem + 1vw, 2.75rem);
  line-height: 1.05;
  margin: 0 0 .25rem;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--text);
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.9rem, 0.8vw + 0.8rem, 1.05rem);
}

/* Featured image framing (also supports .image-frame) */
.featured-image, .image-frame {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(0,255,255,.38);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  background: #000;
}
.featured-image img, .image-frame img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.image-frame {
  aspect-ratio: 16 / 9;
}

/* Glass panels (content blocks) */
.content {
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(7,12,20,.28); /* frosted look with fallback */
  border: 1px solid rgba(0,255,255,.38);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
}
@supports not (backdrop-filter: blur(12px)) {
  .content { background: rgba(7,12,20,.6); }
}

/* Main typography & spacing */
main { padding: 1rem 0 2rem; }
h2 { font-size: clamp(1.1rem, 0.8vw + 1rem, 1.6rem); margin: .75rem 0 0.5rem; color: var(--text); }
p { font-size: clamp(0.98rem, 0.8vw + 0.9rem, 1.15rem); margin: .6rem 0 1rem; color: #eafcff; }

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

/* Product/ad blocks in footer */
.product-ad { display: inline-block; width: min(100%, 320px); background: rgba(6,18,26,.35); border: 1px solid rgba(0,255,255,.38); padding: .75rem; border-radius: 12px; margin: .5rem; text-align: center; }
.product-ad p { margin: 0; font-weight: 600; }

/* Link behaviors for accessibility */
a, .btn, .cta { transition: color .2s ease, background .2s ease, transform .2s ease; }
.btn, .cta {
  display: inline-block;
  padding: .6em 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0,255,255,.55);
  background: linear-gradient(135deg, rgba(0,255,255,.25), rgba(0,255,255,.05));
  font-weight: 600;
}
.btn:hover, .cta:hover { transform: translateY(-1px); }

/* Optional outline variants (solid vs outline) */
.btn.secondary {
  background: rgba(255, 0, 128,.25);
  border-color: rgba(255,0,128,.5);
}
.cta {
  border: 1px solid rgba(0,255,255,.6);
  background: linear-gradient(135deg, rgba(0,255,255,.35), rgba(255,0,180,.15));
}

/* Print styles (basic readability) */
@media print {
  html, body { background: #fff; color: #000; }
  header, footer { display: none; }
  .container { padding: 0; width: 100%; max-width: 100%; }
  a { color: #000; text-decoration: none; }
  .content { background: transparent; border: none; box-shadow: none; }
}
