/* 1. Base & Tokens */
:root{
  --bg: #0b0b14;
  --bg-2: #171923;
  --text: #e9e9e9;
  --muted: #b8b8bd;
  --accent: #b66a2a;        /* copper */
  --accent-2: #e0a05b;      /* copper highlight */
  --glass: rgba(18,18,26,0.28);
  --glass-border: rgba(255,255,255,0.28);
}
html, body, header, nav, main, article, footer, aside { /* structural selectors for consistency */ }
html, body { height: 100%; }
* { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* 2. Layered, responsive background (gradient + scanlines + stars) */
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  background: 
    linear-gradient(135deg, rgba(128,64,0,0.28), rgba(0,0,0,0.40) 60%),
    radial-gradient(circle at 20% 0%, rgba(255,180,90,0.25), transparent 40%),
    radial-gradient(circle at 80% 25%, rgba(120,120,120,0.15), transparent 40%),
    #08090b;
  /* subtle noise/scanline via layered gradients (pure CSS) */
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 12%, rgba(255,255,255,0.12) 0 6px, transparent 6px),
    radial-gradient(circle at 70% 40%, rgba(255,255,255,0.08) 0 8px, transparent 8px),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: 0.85;
  filter: saturate(110%);
}

/* 3. Layout primitives */
.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
  padding-block: 1.5rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(20,20,24,0.28);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 12px;
  padding: 1rem;
  color: var(--text);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.tag {
  display: inline-block;
  padding: 0.14rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(182,106,42,0.25);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}

/* 4. Glass panels (with fallback) */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(0,0,0,0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass {
    background: rgba(18,18,26,0.75);
    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  }
}

/* 5. Image frame styling (required selectors) */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* 6. Typography & content area */
.content { padding: 0.75rem; }

/* 7. Sectioned content areas */
header, main, footer, aside { display: block; }

/* 8. Specific sections and elements (selectors required) */
header { padding: 1rem 0; }
header h1 {
  font-family: inherit;
  font-size: clamp(1.75rem, 4vw + 0.25rem, 3.75rem);
  line-height: 1.04;
  margin: 0 0 0.25rem;
  letter-spacing: .2px;
}
header .meta {
  font-size: clamp(0.9rem, 0.6vw + 0.8rem, 1.05rem);
  color: var(--muted);
  margin-bottom: 0.75rem;
}
header nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
header nav a {
  color: var(--text);
  text-decoration: none;
  padding: .4rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.25);
}
header nav a:hover { text-decoration: underline; background: rgba(255,255,255,0.08); }

/* 9. Main article layout & typography */
main { padding: 1rem 0; }
article { max-width: clamp(640px, 90vw, 980px); margin: 0 auto; }
.featured-image { margin: 1rem 0; }
.featured-image img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid rgba(255,255,255,0.28); box-shadow: 0 10px 22px rgba(0,0,0,0.4); }

/* Headings & body copy */
h2 { font-size: clamp(1.6rem, 1.2vw + 1.4rem, 2.4rem); margin: 0.75rem 0 0.4rem; color: var(--text); }
p { color: var(--muted); font-size: clamp(1rem, 0.9vw + 0.9rem, 1.15rem); margin: 0.9rem 0; }
blockquote {
  margin: 1rem 0;
  padding: .75rem 1rem;
  border-left: 4px solid var(--accent-2);
  background: rgba(0,0,0,0.22);
  border-radius: 6px;
  color: #f6f6f6;
}
ul { margin: 0.5rem 0 1rem 1.25rem; color: var(--text); }
li { margin: .25rem 0; }

/* 10. Lists and inline visuals */
ul, li { -webkit-margin-start: 0; margin-inline-start: 1.25rem; }

/* 11. Links, buttons & interactive controls (WCAG AA focus) */
a, button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
a { color: var(--text); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; outline: none; }

/* Button variants */
.btn {
  display: inline-block;
  padding: .65rem 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(102,51,0,0.25);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}
.cta {
  display: inline-block;
  padding: .75rem 1.2rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.38);
  background: linear-gradient(135deg, rgba(184,115,51,0.9), rgba(128,64,0,0.9));
  color: #fff;
}
.btn:hover, .cta:hover { transform: translateY(-1px); }

/* Focus visibility (high contrast) */
:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 8px;
}

/* 12. Footer / ad sections styling (consistency) */
footer { padding: 1rem 0 2rem; }
.product-ad {
  display: inline-block;
  margin: .25rem;
  padding: .5rem .75rem;
  border-radius: 10px;
  background: rgba(184,115,51,0.28);
  border: 1px solid rgba(255,255,255,0.28);
}
.product-ad a { color: var(--text); text-decoration: none; display: block; padding: .25rem 0; }
.product-ad a:hover { text-decoration: underline; }

/* 13. Accessibility: print-friendly */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}
