/* Base & Tokens */
:root {
  --bg: #1b1408;
  --bg-2: #2a210f;
  --surface: rgba(20, 14, 8, 0.62);
  --text: #f1f0ea;
  --muted: #c9c3a6;
  --accent: #6b8e2a;   /* olive */
  --accent-2: #a6a43b; /* lighter olive/gold */
  --border: rgba(255, 255, 255, 0.32);
  --shadow: 0 6px 20px rgba(0,0,0,.45);
  --radius: 12px;
  --focus: 2px solid #fff;
  --focus-offset: 2px;
}

/* Reset & layout primitives */
* { box-sizing: border-box; }
html, body { height: 100%; }
html, body { margin: 0; padding: 0; }
body {
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  background: linear-gradient(135deg, #3b2a16 0%, #1b1408 60%, #3b2a16 100%);
  min-height: 100%;
  position: relative;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  /* subtle parchment texture via layered scanlines/noise (pure CSS) */
  background-image:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(to right, rgba(0,0,0,.04) 0 2px, transparent 2px 4px);
  opacity: .65;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.container {
  width: 100%;
  max-width: clamp(720px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

/* Structural sections (section selectors) */
header, nav, main, article, footer, aside {
  padding: 0;
  margin: 0;
}

/* Header / hero */
header {
  padding: 1.25rem 1rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
header h1 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.75rem, 4vw + 0.5rem, 3rem);
  line-height: 1.04;
  letter-spacing: .2px;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
@media (prefers-color-scheme: light) {
  header, main, footer { color: #1a1a14; }
  header h1 { color: #1a1a14; text-shadow: none; }
}

/* Main content */
main { padding: 1rem 0; }
article { display: block; }

/* Image frame with aspect ratio, glow, border */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
  display: block;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.05);
}
@media (prefers-color-scheme: light) {
  .image-frame { border-color: rgba(0,0,0,.2); }
}

/* Glass panel / content blocks (frosted glass) */
.content {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(22, 16, 8, 0.62);
  border: 1px solid rgba(255,255,255,.28);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(12px)) {
  .content { background: rgba(22, 16, 8, 0.8); }
}
.card {
  background: rgba(15, 11, 7, 0.55);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius);
  padding: .75rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  color: #e8f0d5;
  background: rgba(107, 142, 42, 0.18);
  border: 1px solid rgba(107, 142, 42, 0.4);
}

/* Links & typography accessibility */
a {
  color: var(--accent);
  text-decoration: none;
}
a:focus-visible, a:hover {
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 6px;
}
button, .btn, a.btn, .cta {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
}
.btn, .cta {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.38);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover, .cta:hover {
  transform: translateY(-1px);
  background: #7a9a4b;
}
.btn:active, .cta:active {
  transform: translateY(0);
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(107, 142, 42, .9);
}
.btn--outline:hover {
  background: rgba(107, 142, 42, 0.15);
}
.btn:focus-visible, .btn--outline:focus-visible, .cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
}
.product-ad, .sponsored-page {
  display: inline-block;
  padding: .55rem 1rem;
  border-radius: 999px;
  margin: .25rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,.32);
  background: rgba(18, 28, 0, .38);
}
.product-ad a, .sponsored-page a {
  color: #fff;
  text-decoration: none;
}
.product-ad:hover, .sponsored-page:hover {
  transform: translateY(-1px);
}
footer { padding: 1rem 0; text-align: center; }

ul, li { padding: 0; margin: 0; list-style: none; }

/* Utility & layout helpers */
.container { width: 100%; max-width: clamp(720px, 90vw, 1100px); margin: 0 auto; padding: 0 1rem; }
.grid { display: grid; gap: 1rem; }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Light-mode tweaks for legibility (optional variant) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f3e6;
    --bg-2: #efe6d0;
    --surface: rgba(255,255,255,.92);
    --text: #1a1a14;
    --muted: #5a5a5a;
    --border: rgba(0,0,0,.15);
  }
  body { background: linear-gradient(135deg, #f7f3e0 0%, #efe7d0 60%, #f7f3e0 100%); color: var(--text); }
  .content { background: rgba(255,255,255,.8); backdrop-filter: none; }
  .image-frame { border-color: rgba(0,0,0,.2); }
  a { color: #1a4e1a; }
}