:root {
  /* Espresso + copper palette tokens */
  --bg: #0a0a0f;
  --bg-2: #141018;
  --surface: rgba(12, 12, 16, 0.68);
  --surface-2: rgba(255, 255, 255, 0.08);
  --text: #e9f0f5;
  --muted: #a6b1be;
  --accent: #c06a1b;       /* copper */
  --accent-2: #e5a33a;     /* brass glow */
  --border: rgba(255, 255, 255, 0.22);
  --shadow: 0 10px 28px rgba(0,0,0,.40);
  --radius: 14px;
  --focus: 0 0 0 3px rgba(198, 106, 27, 0.55);
  --glow: 0 0 20px rgba(198, 106, 27, 0.25);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

html, body {
  height: 100%;
}

* { box-sizing: border-box; }

html, body, header, nav, main, article, footer, aside {
  /* Ensure consistent font rendering across elements */
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: clamp(14px, 1.2vw + 12px, 16px); /* fluid typography */
  line-height: 1.55;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  /* Layered background: gradient + subtle scanlines + copper accents */
  background-image:
    radial-gradient(circle at 20% -5%, rgba(184, 92, 0, 0.28), transparent 20%),
    linear-gradient(135deg, #0a0a0f 0%, #141018 40%, #0a0a0f 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  background-size: cover;
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Glass panels (fallback-friendly) */
header, main, footer, aside {
  background: rgba(8, 8, 12, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0.75rem auto;
  max-width: min(1100px, 92vw);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@supports not (backdrop-filter: blur(8px)) {
  header, main, footer, aside {
    background: rgba(8, 8, 12, 0.88); /* stronger fallback for older browsers */
  }
}
section.grid, section.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.75rem;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-gap: 1rem;
}
.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1rem;
}
.tag {
  display: inline-block;
  padding: 0.15em 0.5em;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(192, 110, 27, 0.25);
  color: var(--text);
  border: 1px solid rgba(192, 110, 27, 0.6);
  margin-right: 0.25rem;
}
.image-frame {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 22px rgba(0,0,0,0.4);
  aspect-ratio: 16 / 9;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}
.featured-image { margin: 1rem 0; }

a, button, .btn, .cta {
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 0.6rem 1rem;
  background: linear-gradient(to bottom, rgba(192,110,27,0.95), rgba(140,70,14,0.95));
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
a:hover, button:hover, .btn:hover, .cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(to bottom, rgba(210,125,28,1), rgba(140,70,14,1));
  text-decoration: underline;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  outline: var(--focus);
  outline-offset: 2px;
  box-shadow: var(--glow);
}
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn--outline {
  background: rgba(0,0,0,0.0);
  border: 1px solid rgba(230, 184, 128, 0.8);
  color: var(--text);
}
.btn--outline:hover {
  background: rgba(230,184,128,0.12);
}
.cta {
  padding: 0.65rem 1.1rem;
}
.inline-links { display: inline-flex; align-items: center; gap: .5rem; }

/* Content typography and structure */
header h1 {
  font-size: clamp(1.75rem, 2.6vw + 1rem, 3rem);
  line-height: 1.15;
  margin: 0 0 .25rem 0;
  letter-spacing: .2px;
  color: var(--text);
}
header .meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 .75rem 0;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .4rem .6rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
}
nav a:hover { text-decoration: underline; }

/* Article content styles */
main article {
  display: block;
}
main article h2 {
  font-size: clamp(1.25rem, 1vw + 1.2rem, 1.6rem);
  margin: 1rem 0 0.25rem;
  color: #f6f6f6;
}
main article p {
  color: #e9f0f5;
  margin: 0 0 1rem;
}
main article ul, main article ol {
  margin: 0 0 1rem 1.1rem;
  color: #e9f0f5;
}
main article li { margin: .3rem 0; }

/* Content helper for potential side content */
.content {
  display: block;
  padding: 0.5rem 0;
  color: var(--text);
}
.product-ad, .sponsored-page {
  display: block;
  text-align: center;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text);
  text-decoration: none;
}
.product-ad p, .sponsored-page p { margin: 0; }

/* Lists adaptability for accessibility and contrast */
ul, li {
  color: var(--text);
}
li::marker { color: var(--accent); }

/* Print styles: basic readability */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { border: none; background: transparent; border-radius: 0; padding: 0; }
  a, button { color: #000; }
}
  
/* Responsive helpers for layouts (grid utilities) */
@media (min-width: 640px) {
  .grid--auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); grid-gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}