/* 1. Palette & Foundations */
:root{
  --bg: #041a0b;
  --bg-2: #0b2f15;
  --bg-3: #0a4a12;
  --text: #eafff0;
  --muted: #b9f0c0;
  --accent: #ff1744; /* scarlet */
  --accent-2: #1cff7a; /* neon green glow accent */
  --surface: rgba(14,46,22,0.28);
  --surface-2: rgba(14,46,22,0.42);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 6px 18px rgba(0,0,0,.25);
  --focus: 0 0 0 3px rgba(255,23,68,.55);
  --glass-blur: blur(12px);
}
html, body, header, nav, main, article, aside, footer { box-sizing: border-box; }
/* 2. Layered background (gradient + subtle scanlines/noise) */
html, body { height: 100%; }
body{
  margin:0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  line-height: 1.5;
  background: 
    linear-gradient(135deg, rgba(3,60,26,.9) 0%, rgba(5,100,28,.82) 60%, rgba(2,40,12,.92) 100%),
    radial-gradient(circle at 20% 0, rgba(0,255,140,.15), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(255,23,68,.15), transparent 35%);
  background-color: var(--bg);
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}
body::before{
  content:"";
  position: fixed;
  inset:0;
  pointer-events:none;
  /* subtle scanlines layered over the neon forest */
  background-image:
    linear-gradient(rgba(0,0,0,.0), rgba(0,0,0,.04)),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  background-size: auto 4px;
  mix-blend-mode: overlay;
  opacity:.5;
  z-index:0;
}
@media (prefers-reduced-motion: reduce){
  body::before{ display:none; }
}

/* 3. Layout primitives */
.container{ max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; padding: 0 1rem; }

/* 4. Typography & helpers */
h1{ font-size: clamp(1.9rem, 2.5vw + 1rem, 3rem); line-height:1.08; margin: .25rem 0 0.5rem; color: var(--text); }
h2{ font-size: clamp(1.25rem, 1.6vw + .6rem, 1.8rem); margin:.75rem 0 .5rem; color:#eafff3; }
p{ font-size: clamp(0.95rem, 0.8vw + .9rem, 1.125rem); color: #eafbe0; margin:.25rem 0 1rem; }
.meta{ font-family: ui-monospace,SFMono-Regular,monospace; font-size: .9rem; color: var(--muted); margin:0; }

/* 5. Base interactive elements */
a, button, .btn, .cta{ font-family: inherit; font-weight: 600; text-decoration: none; color: var(--text); cursor: pointer; }
a:hover, a:focus{ text-decoration: underline; text-decoration-color: rgba(255,23,68,.8); }
a:focus-visible, button:focus-visible{ outline: none; box-shadow: var(--focus); outline-offset: 2px; border-radius:6px; }
button{ border: none; background: rgba(0,0,0,.25); padding:.55em 1em; border-radius:8px; color: var(--text); }

/* 6. Glass surfaces (fallback if backdrop-filter not supported) */
.glass{ background: rgba(8,28,12,.22); border: 1px solid rgba(120,255,180,.35); border-radius: 12px; padding: .75rem; box-shadow: var(--shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.noback{ background: rgba(8,28,12,.6); border: 1px solid rgba(120,255,180,.6); border-radius: 12px; padding:.75rem; }

/* 7. Glass panels utility (apply to key sections) */
.header-panel, .content, .card, .product-ad{ background: rgba(8,28,12,.28); border: 1px solid rgba(120,255,180,.32); border-radius:12px; padding: .75rem; }

/* 8. Image frame styling */
.image-frame{ aspect-ratio: 16/9; width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); box-shadow: 0 8px 24px rgba(0,0,0,.5); background:#000; display:block; }
.image-frame img{ width:100%; height:100%; object-fit: cover; display:block; }

/* 9. Layout primitives (grid, cards, tags) */
.container.grid{ display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: stretch; }
.card{ padding: .9rem; border-radius: 12px; background: rgba(16,32,16,.28); border: 1px solid rgba(255,255,255,.25); box-shadow: var(--shadow); }

/* 10. Content & sections */
.content{ padding: 1rem 0; color: var(--text); }

/* 11. Product ad & other blocks (footer sections) */
.product-ad{ padding: .75rem; text-align: center; margin:.5rem 0; }
.product-ad a{ display:block; padding: .5rem; border-radius: 8px; color: var(--text); }

/* 12. Lists & inline helpers */
ul{ padding-left: 1.25rem; margin: .5rem 0; }
li{ margin: .25rem 0; }
.tag{ display:inline-block; padding:.15em .5em; border-radius:999px; font-size:.75rem; background: rgba(0,255,140,.15); border:1px solid rgba(0,255,140,.4); color:#eafff0; }

/* 13. Buttons (solid primary, outline secondary) */
.btn{ padding:.65em 1.05em; border-radius:8px; border:1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.25); }
.btn--primary{ background: var(--accent); border: none; color: #fff; }
.btn--outline{ background: transparent; border:1px solid rgba(255,255,255,.5); color: var(--text); }

/* 14. Accessibility: high contrast focus for interactive controls in all themes */
:focus-visible{ outline: none; box-shadow: 0 0 0 3px rgba(255, 23, 68, .5); outline-offset: 2px; border-radius:6px; }

/* 15. Print: basic readability */
@media print{
  body{ background: #fff; color:#000; }
  a{ color:#000; text-decoration: underline; }
  .gloss, .glass, .image-frame{ display: none; }
}

/* 16. Subtle entrance animation (GPU-friendly) */
@media (prefers-reduced-motion: no-preference){
  header{ animation: fadeInUp .6s ease-out; }
  main article{ animation: fadeInUp .6s ease-out; animation-delay: .15s; }
}
@keyframes fadeInUp{
  from{ opacity:0; transform: translateY(8px); }
  to{ opacity:1; transform: translateY(0); }
}