/* Base tokens */
:root {
  --bg: #0b0f14;           /* gunmetal dark */
  --bg-2: #1b1f28;         /* gunmetal mid */
  --surface: rgba(255,255,255,0.10);
  --text: #eae6e0;          /* near-white for contrast on dark */
  --muted: #a9a29f;
  --accent: #8b5e2b;         /* brown */
  --accent-2: #c07a3b;       /* lighter brown for accents */
  --glass: rgba(255,255,255,0.12);
  --glass-border: rgba(255,255,255,0.28);
  --shadow: 0 8px 28px rgba(0,0,0,0.45);
  --focus: #ffd166;           /* accessible focus ring */
}
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  color: var(--text);
  font-family: ui-system, ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.55;
  /* Layered gunmetal background: gradient + scanlines + subtle vignettes (pure CSS) */
  background:
    radial-gradient(circle at 20% 20%, rgba(0,0,0,0.25), transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(0,0,0,0.25), transparent 40%),
    linear-gradient(135deg, #0a0e13 0%, #141923 60%, #1b1410 100%);
  /* scanlines */
  background-image:
    linear-gradient(135deg, rgba(10,12,16,0.92), rgba(18,14,9,0.92) 60%, rgba(20,18,16,0.92) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, rgba(0,0,0,0) 1px 2px),
    radial-gradient(circle at 60% 20%, rgba(120,90,60,0.15), transparent 40%);
  background-blend-mode: normal, overlay, normal;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Layout helpers */
.container { max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); }

/* Section elements */
html, body, header, nav, main, article, footer, aside {
  display: block;
}
header, footer { position: relative; }

/* Glass panels (with graceful fallback) */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: 0 6px 22px rgba(0,0,0,0.28);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); }
}

/* Header / Hero styling */
header {
  margin: 1.25rem auto;
  padding: 1rem;
  width: min(92%, 1100px);
  color: var(--text);
}
header h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3.75rem);
  line-height: 1.15;
  margin: 0 0 .25rem;
  letter-spacing: .2px;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.9rem, 0.6rem + 0.9vw, 1.1rem);
  margin: 0 0 0.75rem;
}
nav a {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}
nav a:hover { text-decoration: underline; }

/* Hero content area */
main { padding: 0 0 2rem; }
article { padding: 1rem; max-width: 900px; margin-inline: auto; }

/* Featured image framing (frame-like with glow) */
.featured-image { margin: .5rem 0 1rem; }
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.25);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.001);
  transition: transform 0.6s ease;
}
.image-frame:hover img { transform: scale(1.04); }

/* Typography (fluid scaling) */
h1, h2 { color: #fff; }
h2 { font-size: clamp(1.15rem, 0.9rem + 1.4vw, 1.8rem); margin: .75rem 0 0.5rem; }
p { color: var(--text); margin: .6rem 0 1rem; }
ul, ol { margin: .5rem 0 1rem 1.1rem; color: var(--text); }
li { margin: .25rem 0; }

/* Links and CTAs */
a, button, .btn, .cta {
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background .25s ease, color .25s ease;
}
a { color: var(--accent-2); }
a:hover, a:focus { text-decoration: underline; outline: none; }
button, .btn {
  display: inline-block;
  padding: .6em .95em;
  border-radius: .6em;
  border: 1px solid rgba(139,94,43,0.9);
  background: rgba(139,94,43,0.95);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.outline {
  background: transparent;
  border-color: rgba(139,94,43,0.9);
  color: var(--text);
}
.cta { /* alias for primary actions */ }

/* Focus states (accessible) */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Content area styling */
.content { padding: 1rem; }

/* Sidebar-like / product-ad styling in footer */
.product-ad, .sponsored-page {
  display: inline-block;
  vertical-align: top;
  width: calc(50% - 0.5rem);
  margin: 0.5rem;
}
.product-ad a, .sponsored-page a { display: block; text-align: center; text-decoration: none; color: var(--text); }

/* Footer styling */
footer { padding: 1rem 0; margin-top: 1rem; }
footer p { margin: .25rem 0; color: var(--muted); }

/* Utility: card / tag */
.tag {
  display: inline-block;
  padding: 0.15em 0.6em;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(139,94,43,0.25);
  border: 1px solid rgba(139,94,43,0.6);
  color: #fff;
  line-height: 1;
}

/* Accessibility: print styles */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  header, main, footer { page-break-inside: avoid; }
  .glass { background: #fff; border-color: #ccc; }
}

/* Responsive tweaks */
@media (max-width: 800px) {
  nav { margin-top: .25rem; }
  .product-ad, .sponsored-page { width: 100%; margin: .25rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}