/* Section: Theme & Palette */
:root{
  --bg: #0b0f14;            /* gunmetal base */
  --bg-2: #141a21;
  --surface: rgba(18,20,24,.68);
  --text: #eaf6ff;
  --muted: #a4aebb;
  --accent: #8b0000;         /* burgundy core */
  --accent-2: #b10024;       /* brighter burgundy for accents */
  --glass: rgba(26,28,32,.22);
  --glass-strong: rgba(26,28,32,.42);
  --shadow: 0 8px 22px rgba(0,0,0,.28);
  --outline: 2px solid var(--accent-2);
}

/* Section: Reset & Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue";
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.5;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(9,12,16,.92), rgba(15,18,22,.92) 60%, rgba(9,12,16,.92)),
    radial-gradient(circle at 15% 10%, rgba(80,0,30,.25), rgba(0,0,0,0) 40%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* layered: gradient + scanline noise (CSS only) */
  background-image:
    linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.25)),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.04) 0px,
      rgba(255,255,255,.04) 1px,
      rgba(0,0,0,0) 1px,
      rgba(0,0,0,0) 2px
    );
  background-blend-mode: overlay;
  opacity: 0.5;
  filter: saturate(110%);
}

/* Section: Layout helpers */
.container {
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card { /* generic glass card used by utilities */
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .card { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; animation: none; }
}

/* Section: Typography scale */
h1, h2, h3 { color: var(--text); margin: .5em 0; line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 3vw + 1rem, 2.8rem); }
h2 { font-size: clamp(1.25rem, 1.6vw + .5rem, 1.75rem); }
p { margin: .5em 0 1em; color: color-m(rgba(255,255,255,.9)); }
blockquote { margin: .75em 0; padding: .75em 1em; border-left: 3px solid var(--accent-2); background: rgba(20,20,24,.55); border-radius: 6px; color: #e8f0f7; }

/* Section: Header & Nav */
header {
  text-align: center;
  padding: 2rem 1rem 1rem;
}
header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.08; margin: 0 auto .25rem; }
header .meta { font-size: clamp(0.8rem, 0.8vw, 1rem); color: var(--muted); }

/* Simple, accessible nav */
nav { margin-top: .25rem; display: inline-flex; gap: .5rem; }
nav a {
  color: var(--accent-2);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 4px;
}
nav a:hover, nav a:focus-visible { text-decoration: underline; outline: none; }

/* Section: Content area & imagery */
 main { padding: 0 0 2rem; }
 .featured-image {
   display: block;
   width: 100%;
   max-width: 100%;
   margin: 1rem auto 1rem;
  }
 .image-frame {
   aspect-ratio: 16 / 9;
   width: 100%;
   border-radius: 12px;
   overflow: hidden;
   border: 1px solid rgba(255,255,255,.25);
   box-shadow: 0 6px 18px rgba(0,0,0,.35);
   background: rgba(0,0,0,.25);
 }
 .image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Content area styling (glass panels) */
.content { background: var(--glass); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 1rem; }

/* Optional prominent content block styling */
.product-ad, .sponsored-page {
  display: block;
  text-align: center;
  padding: .9rem 1.1rem;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--text);
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
  box-shadow: var(--shadow);
}
.product-ad:hover, .sponsored-page:hover { transform: translateY(-1px); background: rgba(26,28,32,.32); }
.product-ad:focus-visible, .sponsored-page:focus-visible { outline: var(--outline); outline-offset: 2px; }

/* Section: Links & interactive controls */
a, button, .btn, .cta {
  font-family: inherit;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,.28);
  padding: .55em 1em;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s ease;
}
a:hover { text-decoration: underline; }
.btn { background: rgba(139,0,0,.9); border: none; color: #fff; }
.btn:hover { background: #8a0000; }
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.42);
  color: var(--text);
}
.btn:focus-visible, .cta:focus-visible, a:focus-visible, button:focus-visible {
  outline: var(--outline);
  outline-offset: 2px;
}
.cta { font-weight: 600; }

/* Section: Lists & tags */
ul, ol { padding-left: 1.25rem; margin: .75em 0; }
li { margin: .25em 0; }
.tag {
  display: inline-block;
  padding: .15em .5em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(139,0,0,.28);
  color: #ffecec;
  border: 1px solid rgba(255,255,255,.28);
}

/* Section: Aside & footer layout */
footer {
  margin-top: 2rem;
  padding: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
footer section { display: block; }
footer p { margin: .5rem 0; text-align: center; color: var(--muted); }

/* Layout helpers for footer content */
footer { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Section: Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
  header, main, footer { padding: 0; }
  .card, .product-ad, .sponsored-page { background: transparent; border: none; box-shadow: none; }
  footer { border-top: none; }
}
