/* Section: Base Tokens & Theme */
:root{
  --bg: #0b0f0a;
  --bg-2: #0a1410;
  --text: #eafff0;
  --muted: #9af3c1;
  --accent: #2fe37a;
  --accent-2: #ff8a00;
  --glass: rgba(15,23,18,.28);
  --glass-strong: rgba(15,23,18,.5);
  --glass-border: rgba(62,255,170,.35);
  --shadow: 0 8px 28px rgba(0,0,0,.45);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 2px solid var(--accent);
  --focus-offset: 2px;
  --container-max: clamp(320px, 88vw, 1100px);
}
html, body { height:100%; }
html { color-scheme: dark; }

/* Section: Global reset & layered background (gradient + orange dot pattern + scanlines) */
html, body { margin: 0; padding: 0; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial; }

/* Mobile-first: base surface with cyber glow and pattern */
body {
  min-height: 100dvh;
  color: var(--text);
  background:
    /* orange dots pattern (layered) */
    radial-gradient(circle at 10px 12px, rgba(255,128,0,.95) 1.2px, transparent 1.4px),
    radial-gradient(circle at 40px 26px, rgba(255,128,0,.85) 1.2px, transparent 1.4px),
    radial-gradient(circle at 70px 14px, rgba(255,128,0,.75) 1.2px, transparent 1.4px),
    /* subtle orange dot spread across page */
    radial-gradient(circle at 100px 80px, rgba(255,128,0,.75) 1.2px, transparent 1.4px),
    /* base gradient (dark cyber) */
    linear-gradient(135deg, #041d15 0%, #02140f 60%, #02120a 100%);
  background-blend-mode: normal;
  background-size: 120px 80px, 120px 80px, 120px 80px, 120px 80px, auto;
  background-color: #030f0a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}
@media (prefers-color-scheme: light){
  body { 
    background: #f6f8f5;
    color: #0b2211;
    background-image:
      linear-gradient(135deg, #f6f8f5 0%, #eef4ee 60%, #e8efe9 100%);
  }
}
@media (prefers-reduced-motion: reduce){
  body { background-attachment: scroll; }
}

/* Section: Layout helpers */
.container { width: 100%; margin-inline: auto; padding-inline: 1rem; max-width: var(--container-max); }

/* Section: Typography */
h1, h2 { margin: 0 0 .5rem 0; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(1.75rem, 2.6vw + 1rem, 3.5rem); line-height: 1.04; letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 1.6vw + .75rem, 2rem); }
p { margin: .75rem 0; font-size: clamp(1rem, 0.9vw + .9rem, 1.125rem); color: var(--text); opacity: .95; }

/* Section: Glass panels (fallback if backdrop-filter unsupported) */
header, main, footer, .card, .product-ad, aside {
  background: linear-gradient(to bottom, rgba(2,6,4,.36), rgba(2,6,4,.22));
  border: 1px solid rgba(0,255,170,.35);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@media (prefers-color-scheme: light){
  header, main, footer, .card, .product-ad { background: rgba(255,255,255,.7); border: 1px solid rgba(0,0,0,.08); }
}
@media (prefers-reduced-motion: reduce){
  header, main, footer { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* Section: Structural elements (required selectors) */
html, body, header, nav, main, article, footer, aside { /* explicit selectors touched for completeness */ }

/* Section: Header & Hero */
header { padding: 2rem 1rem; margin: 1rem auto; max-width: var(--container-max); text-align: left; }
header h1 { color: #dfffe4; text-shadow: 0 0 12px rgba(0,255,120,.25); }
header .meta { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95rem; margin-top: .25rem; }

/* Section: Featured image framing (supports .image-frame and .featured-image) */
.image-frame, .featured-image {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 720px;
  margin: 1rem auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  background: #0b0f0a;
}
.image-frame img, .featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Content area & typography scaffolding */
.main-content { padding: 0.25rem 0 1rem; }
p + ul { margin-top: .25rem; }

/* Section: Lists & items */
ul { padding-left: 1.25rem; margin: .75rem 0; }
li { margin: .25rem 0; }

/* Section: Content helpers */
.content { display: block; }

/* Section: Cards / Grid / Tags (utility classes) */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { padding: 1rem; border-radius: var(--radius-sm); background: rgba(4,8,8,.28); border: 1px solid rgba(0,255,170,.32); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.tag { display:inline-block; padding: .25em .6em; border-radius: 999px; font-size: .75rem; background: rgba(46,255,208,.18); color: var(--text); border: 1px solid rgba(46,255,208,.4); }

/* Section: Content sections within footer (ads) */
.product-ad { display:block; margin: .5rem 0; padding: .75rem; border-radius: var(--radius-sm); overflow:hidden; }
.product-ad a { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); text-decoration: none; padding: .25rem 0; }
.product-ad a:hover { text-decoration: underline; }

/* Section: Links & interactives */
a, button { color: var(--accent-2); cursor: pointer; text-decoration: none; }
a:hover, button:hover, .cta:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .cta:focus-visible { outline: 2px solid var(--accent); outline-offset: var(--focus-offset); border-radius: 4px; }

/* Section: Buttons (solid and outline variants) */
.btn, .cta, button {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(0,255,170,.65);
  background: linear-gradient(135deg, rgba(0,255,170,.25), rgba(0,0,0,.0));
  color: var(--text);
  font-weight: 600;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  text-align: center;
}
.btn.primary { background: linear-gradient(135deg, #2bd56e, #1f9b3d); color: #06240e; border: 1px solid rgba(0,0,0,.15); }
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:active, .cta:active { transform: translateY(0); opacity: .9; }

/* Section: Utilities (container, grid etc. implemented above) */
.container { width: 100%; margin-inline: auto; padding-inline: 1rem; max-width: var(--container-max); }

/* Section: Footer */
footer { padding: 1rem; margin: 1rem auto 2rem; max-width: var(--container-max); text-align: center; }

/* Section: Print & Motion preferences */
@media print {
  body { background: white; color: black; }
  a { text-decoration: underline; color: black; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}