/* Section: Base tokens */
:root {
  --bg: #2b1f14;
  --bg-2: #42261d;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.18);
  --text: #f6f7f8;
  --muted: #c9c4b5;
  --accent: #cbd5d9; /* silver-ish */
  --accent-2: #a9b4bd;
  --border: rgba(230, 235, 240, 0.35);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --focus: 0 0 0 3px rgba(255, 255, 255, 0.6);
}

/* Section: Base reset & layout */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif; }
body {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  /* Layered background: brown gradient + subtle scanlines + soft glow */
  background-image:
    radial-gradient(circle at 25% 15%, rgba(170, 110, 60, 0.25), rgba(0,0,0,0) 40%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    linear-gradient(#2b1f14 0%, #3a251b 60%, #1a120e 100%);
  background-blend-mode: overlay, overlay, normal;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Section: Structural selectors (targeted per requirement) */
html, body, header, nav, main, article, footer, aside { display: block; }

/* Section: Container & utilities */
.container {
  width: 100%;
  max-width: clamp(680px, 88vw, 1100px);
  padding-inline: 1rem;
  margin-inline: auto;
}

.grid {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* Glassy fallback for browsers without backdrop-filter */
}
@supports not (backdrop-filter: blur(12px)) {
  .card { background: rgba(255,255,255,0.14); }
}

.tag {
  display: inline-block;
  padding: .15em .6em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text);
}

/* Section: Typography (responsive, accessible) */
h1, h2, h3, h4 {
  margin: 0 0 .5rem;
  font-weight: 700;
  line-height: 1.15;
}
h1 { font-size: clamp(1.75rem, 3vw + 1rem, 3.75rem); letter-spacing: .5px; }
h2 { font-size: clamp(1.25rem, 1.6vw + 0.8rem, 2.25rem); }
h3 { font-size: clamp(1.05rem, 1vw + 0.8rem, 1.4rem); }

/* Section: Core layout sections (structure) */
header, nav, main, article, footer, aside {
  padding: 0;
}
header {
  padding: 1.25rem 0 0.75rem;
  text-align: center;
}
header h1 { color: var(--text); margin-bottom: .25rem; }
header .meta { color: var(--muted); font-size: 0.95rem; margin-bottom: .5rem; }

/* Section: Navigation */
nav {
  display: inline-flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: .25rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .4rem .75rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.15);
  transition: transform .15s ease, background .15s ease;
}
nav a:hover { text-decoration: underline; background: rgba(0,0,0,.25); }
nav a:focus-visible { outline: none; box-shadow: var(--focus); }

/* Section: Content area */
main { padding: 1rem 0 2rem; }
article { max-width: 70ch; margin: 0 auto; padding: 0; }

/* Section: Image framing (selector requirement) */
.image-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.05);
}

/* Section: Content helpers */
.content { color: var(--text); }

/* Section: Lists, links, actions */
ul, li { margin: 0; padding: 0; list-style-position: inside; }
ul { padding-left: 1.25rem; }
li { margin: .25rem 0; }

/* Buttons & links (solid and outline variants) */
a, button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  padding: .65rem 1rem;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08);
  cursor: pointer;
  display: inline-block;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
a:hover, .btn:hover, .cta:hover { text-decoration: underline; transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, rgba(210,210,210,.28), rgba(180,180,180,.38));
  border: 1px solid rgba(255,255,255,.6);
}
.btn.secondary {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.4);
}
a:focus-visible, button:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  transform: translateY(-0.5px);
}
@media (prefers-reduced-motion: reduce) {
  a, button, .btn, .cta { transition: none; }
}

/* Section: Layout helpers for responsive grids */
.container, .grid { width: 100%; }
.grid.auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Section: Glass panels (product-ad, sponsor blocks) */
.product-ad, .sponsored-page {
  padding: .75rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow);
}
.product-ad a, .sponsored-page a { display: inline-block; padding: .5rem 0; width: 100%; text-align: center; border-radius: 8px; }

/* Section: Footer */
footer { padding: 1.25rem 0 2rem; text-align: center; }

/* Small print / utility */
.hr { height: 1px; background: rgba(255,255,255,.15); border: 0; margin: 1rem 0; }

/* Section: Print readability */
@media print {
  body { background: white; color: #000; }
  nav, header, footer { display: none; }
  article { padding: 0; margin: 0; }
  .container { max-width: 100%; padding: 0; }
}
