/* Section: Tokens & Theme */
:root{
  --bg: #1b120f;
  --bg-2: #2b1f14;
  --text: #e9d8b3;
  --muted: #cbb59a;
  --accent: #b07a2a;
  --accent-2: #d9b26a;
  --glass: rgba(255,255,255,.08);
  --glass-2: rgba(255,255,255,.14);
  --border: rgba(255,255,255,.28);
  --shadow: 0 8px 24px rgba(0,0,0,.28);
  --radius: 12px;
  --radius-sm: 8px;
  --focus: 0 0 0 3px rgba(214, 170, 92, .9);
  --focus-alt: 0 0 0 3px rgba(255,255,255,.6);
}

/* Section: Base Reset & Layout skeleton */
html, body { height: 100%; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  line-height: 1.5;
  background: 
    linear-gradient(135deg, rgba(176,112,52,.75), rgba(22,12,8,.85)),
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.04), transparent 30%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 2px, transparent 2px 4px);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }

/* Section: Helpers / Utilities */
.container { max-width: clamp(320px, 90vw, 1100px); margin: 0 auto; padding: 0 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Section: Glass panels (fallback if backdrop-filter not supported) */
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.16); }
}

/* Section: Specific selectors (required targets) */
html, body, header, nav, main, article, footer, aside { }
.image-frame, .image-frame img { }
.content { }

/* Section: Layout blocks for sections used in markup */
header { padding: 1rem 1rem 0.75rem; }
header h1 { font-size: clamp(1.6rem, 1.2rem + 2.5vw, 2.8rem); line-height: 1.15; margin: 0 0 .25rem; letter-spacing: .2px; }
header .meta { font-size: .9rem; color: var(--muted); margin-bottom: .75rem; }
nav a { color: var(--text); text-decoration: none; padding: .35rem .6rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); }
main { padding: 0 1rem 1.25rem; }
article { padding: 1rem; border-radius: var(--radius); }

/* Section: Image framing & visuals */
.featured-image { margin: 1rem auto; max-width: 1020px; }
.image-frame { aspect-ratio: 16/9; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,.28); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Content blocks */
.content { padding: .75rem; }

/* Section: Ad / footer blocks */
footer { padding: 1rem; display: grid; gap: .75rem; justify-items: center; }
.product-ad, .sponsored-page { display: inline-block; padding: .6rem .85rem; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.28); text-align: center; }
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; }

/* Section: Typography scales (h2/h3/ul/li) */
h2, h3 { margin: .75rem 0 .5rem; line-height: 1.25; }
h2 { font-size: clamp(1.25rem, 1rem + 1.6vw, 1.9rem); }
h3 { font-size: clamp(1.15rem, 0.9vw + .9rem, 1.4rem); }
ul { margin: .5rem 0 1rem; padding-left: 1.25rem; }
li { margin: .25rem 0; }

/* Section: Lists styling for accessibility contrast within glass */
li strong { color: #fff; }

/* Section: Links & buttons (interactive states) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: none;
  padding: .5em 1em;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  transition: transform .15s ease, background .25s ease, color .25s ease;
}
a:hover, a:focus { text-decoration: underline; outline: none; }
a:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline-offset: 0;
}
.btn { display: inline-block; background: var(--accent); color: #111; border: 1px solid rgba(0,0,0,.15); padding: .6em 1.1em; border-radius: 8px; }
.btn:hover { background: #c07a2a; transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.6); }
.btn--outline:hover { border-color: rgba(255,255,255,.9); }

/* Section: Generic utility classes (compact) */
.card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); padding: .75rem; box-shadow: var(--shadow); }

/* Section: Print-friendly tweaks */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}

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