/* Root tokens: yellow stripe + iridescent green theme */
:root {
  --bg: #0a0a0a;
  --bg-2: #0b0f0f;
  --surface: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.25);
  --text: #eefef3;
  --muted: #b8f6be;
  --accent: #dfff2b;      /* yellow-gold stripe accent */
  --accent-2: #2cff88;     /* iridescent green accent */
  --accent-3: #8affc0;
  --shadow: 0 10px 25px rgba(0,0,0,0.45);
  --radius: 14px;
  --focus-ring: 3px solid rgba(255, 235, 0, 0.95);
  --focus: 0 0 0 3px rgba(255, 235, 0, 0.8);
  --grid-gap: 1rem;
}

/* Global resets & layout helpers */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue", sans-serif;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Layered background: gradient base + yellow striped pattern + iridescent glow */
  background: 
    linear-gradient(135deg, rgba(10,10,10,0.85), rgba(8,14,12,0.95) 60%, rgba(5,8,6,0.95)),
    linear-gradient(to bottom right, rgba(0,0,0,0.25), rgba(0,0,0,0.55)),
    repeating-linear-gradient(135deg, rgba(255, 214, 0, 0.15) 0 6px, transparent 6px 12px),
    radial-gradient(circle at 80% -20%, rgba(0,255,140,0.12), transparent 40%),
    #0a0a0a;
  background-blend-mode: normal, overlay, overlay, normal, normal;
  /* No external fonts; keep lightweight */
}

/* Subtle scanline/noise overlay (CSS-only) */
:root { --scanline-opacity: 0.14; }
html::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    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);
  mix-blend-mode: overlay;
  opacity: var(--scanline-opacity);
  z-index: 0;
}

/* Layout containers */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
  position: relative;
  z-index: 1;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--grid-gap);
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.25s ease, background 0.25s ease;
}
.card:hover { transform: translateY(-2px); }

/* Glass panels (fallback included) */
.glass {
  background: rgba(17, 24, 39, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.no-backdrop { background: rgba(17, 24, 39, 0.40); }

/* Header, main, footer, aside semantics */
header, nav, main, article, aside, footer {
  display: block;
}
header {
  padding: 1.25rem;
  margin: 0 0 1rem;
}
header h1 {
  font-size: clamp(1.6rem, 2.2vw + 1rem, 2.8rem);
  line-height: 1.05;
  margin: 0 0 .5rem;
  letter-spacing: .2px;
  font-weight: 700;
  color: var(--text);
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .5rem 0;
  display: inline-block;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
}
nav a:hover { text-decoration: underline; }

/* Main content area */
main {
  padding: 0 0 1.5rem;
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.05);
  transform: scale(1.001);
}
.content {
  display: block;
  padding: 1rem;
  border-radius: calc(var(--radius) - 4px);
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,.25);
}
.aside { padding: 1rem; }

/* Product ad/footer-like sections */
.product-ad, .sponsored-page {
  margin: .75rem 0;
}
.product-ad a, .sponsored-page a {
  text-decoration: none;
  display: block;
  padding: .75rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(0,0,0,0.18));
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.28);
  text-align: center;
}
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Typography scale for content text and headings inside content blocks */
h2, h3 {
  color: var(--text);
  margin: .75rem 0 .25rem;
}
p { color: var(--text); margin: .5rem 0; }

/* Link and button styling with accessibility */
a, button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  font-size: clamp(0.95rem, 0.9vw + 0.6rem, 1.05rem);
  line-height: 1.4;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  outline: none;
}
a:hover, button:hover, .btn:hover, .cta:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus) ;
  outline-offset: 2px;
}
a:focus-visible { text-decoration: underline; }

/* Primary vs secondary button variants */
.btn {
  display: inline-block;
  padding: .75rem 1.25rem;
  border: 1px solid rgba(255,255,255,.4);
  background: linear-gradient(135deg, rgba(208, 255, 0, 0.95), rgba(60, 255, 120, 0.95));
  color: #062100;
  box-shadow: 0 2px 0 rgba(0,0,0,.15);
}
.btn.secondary {
  background: rgba(0,0,0,0.25);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.35);
}
.btn:active, .cta:active { transform: translateY(1px) scale(0.99); }

/* Outline variant for emphasis */
.btn--outline {
  background: rgba(0,0,0,0.0);
  color: var(--text);
  border: 2px solid rgba(255,255,255,.70);
}
.cta {
  display: inline-block;
  padding: .65rem 1rem;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(0,0,0,0.25);
  color: var(--text);
}

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

/* Utility classes */
.container, .grid, .card, .tag { /* tokens kept for consistency */ }

/* Tag badge styling */
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .8rem;
  background: linear-gradient(135deg, rgba(46,255,176,0.25), rgba(255,255,0,0.25));
  border: 1px solid rgba(255,255,255,.35);
  color: #dfffe8;
}

/* Glass panels on header/footer for cyberpunk vibe */
header, footer {
  background: rgba(10, 12, 18, 0.28);
  border: 1px solid rgba(170, 255, 200, 0.25);
  border-radius: 14px;
  padding: 1rem;
  margin: 0.5rem auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
header { display: block; }
footer { display: block; }

/* Accessibility: high contrast tweaks for text over glass if needed */
@media (prefers-contrast: more) {
  :root { --text: #eafff7; --surface: rgba(255,255,255,0.14); }
  header, footer { border-color: rgba(200,255,220,0.55); }
}

/* Responsive typography tweaks */
@media (min-width: 768px) {
  .container { padding-inline: 1.25rem; }
  header { padding: 1.5rem; }
}
@media (prefers-reduced-motion) {
  * { transition: none !important; animation: none !important; }
  .card { transform: none !important; }
}

/* Print styles for basic readability */
@media print {
  html, body { background: #fff; color: #000; }
  header, main, article, footer { background: #fff; color: #000; border: none; }
  a, .btn, .cta { color: #000; text-decoration: underline; }
  .image-frame { page-break-inside: avoid; }
}
