/* Section: Tokens */
/* Copper-maroon, future cyberpunk palette with glass accents */
:root {
  --bg: #2b0f0f;
  --bg-2: #4a1414;
  --text: #f7f0e8;
  --muted: #d6c6b4;
  --accent: #8f2f2f;
  --accent-2: #d07a4a;
  --glass: rgba(255,255,255,.08);
  --glass-strong: rgba(255,255,255,.22);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --radius: 12px;
}

/* Section: Base layout and background (mobile-first, layered background) */
html, body { margin: 0; padding: 0; min-height: 100%; color: var(--text);
  background:
    linear-gradient(135deg, rgba(60,18,12,.95) 0%, rgba(18,6,6,.95) 60%, rgba(40,14,12,.95) 100%),
    radial-gradient(circle at 70% -10%, rgba(180,110,60,.15) 0%, transparent 40%),
    #140808;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html { color-scheme: dark; }

/* Subtle grid/scanline noise overlay (pure CSS) */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,.04) 1px, transparent 1px),
    linear-gradient(to right, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: .18;
  mix-blend-mode: overlay;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 2px 2px;
  opacity: .05;
  mix-blend-mode: overlay;
  filter: grayscale(.2);
}

/* Section: Glass panels baseline (fallback and backdrop-filter support) */
header, main, footer, aside, article, .card { background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius);
  padding: 1rem;
}
@supports not (backdrop-filter: blur(6px)) {
  header, main, footer, aside, article, .card { background: rgba(255,255,255,.22); }
}
@supports (backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px)) {
  header, main, footer, aside, article, .card {
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    background: rgba(255,255,255,.14);
  }
}

/* Section: Layout utilities */
.container { width: 100%; max-width: clamp(680px, 82vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.card { padding: .75rem; }

/* Section: Image frame styling (also cover .featured-image for compatibility) */
.image-frame, .featured-image {
  width: 100%; max-width: 100%; border-radius: 12px;
  overflow: hidden; border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame { aspect-ratio: 16/9; }
.image-frame img, .featured-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Section: Typographic scale (responsive) */
h1 { font-size: clamp(1.75rem, 4vw + 1rem, 3rem); line-height: 1.15; margin: .25rem 0 .5rem; color: var(--text); letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 2.5vw + .5rem, 1.6rem); margin: .75rem 0 .4rem; color: var(--text); }
p, li { font-size: clamp(1rem, 0.8vw + .9rem, 1.125rem); color: var(--text); }
ul, ol { padding-left: 1.25rem; margin: .25rem 0; }
blockquote { margin: .75rem 0; padding: .5rem 1rem; border-left: 4px solid var(--accent-2); color: var(--muted); }

/* Section: Content helpers */
.content { padding: 1rem; }

/* Section: Product ad and CTAs */
.product-ad { text-align: center; background: rgba(255,255,255,.08); padding: .75rem; border-radius: 12px; border: 1px solid rgba(240,170,120,.5); }
.product-ad a { color: var(--text); text-decoration: none; display: inline-block; padding: .4rem .75rem; border-radius: 6px; border: 1px solid rgba(240,120,60,.6); background: rgba(210,120,60,.25); }
.product-ad a:hover { background: rgba(210,120,60,.4); text-decoration: underline; }

/* Section: Link and buttons styling with focus states */
a, button, .btn, .cta { color: var(--text); text-decoration: none; border-radius: 8px; padding: .6em 1em; border: 1px solid transparent; background: transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
a { color: var(--accent-2); }
a:hover, a:focus { text-decoration: underline; outline: none; }

/* Button variants */
.btn { background: var(--accent-2); color: #111; font-weight: 600; border: 1px solid rgba(0,0,0,.15); }
.btn:hover { transform: translateY(-1px); background: #e29f72; color: #fff; }
.btn:active { transform: translateY(0); }

/* Section: Focus treatments (WCAG AA-ish) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Section: Focus for interactive controls (explicit) */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-2); outline-offset: 2px;
}

/* Section: Navbar-like nav placeholder styling if present */
nav { display: block; }

/* Section: Print styles */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: transparent; border: none; padding: 0; }
  a { text-decoration: underline; }
}
  
/* Section: Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}