/* Base tokens */
:root {
  --bg: #0a0a0a;
  --bg-2: #0f0f0f;
  --text: #e7d077;
  --muted: #c9b463;
  --accent: #d4af37;
  --accent-2: #ffd969;
  --surface: rgba(255,255,255,0.09);
  --surface-2: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.25);
  --shadow: 0 6px 16px rgba(0,0,0,.5);
  --radius: 14px;
  --gap: 1rem;
}

html, body { height: 100%; }
* { box-sizing: border-box; }
html { color-scheme: dark; }

/* Background: gradient + subtle gold glow + scanline-like noise (pure CSS) */
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  min-height: 100dvh;
  background-color: #000;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(212,175,55,.25), rgba(212,175,55,0) 40%),
    linear-gradient(#0a0a0a 0, #050505 60%, #000 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: screen, normal, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Reduced motion safeguard */
  transition: background 0.3s ease;
}

* { scroll-behavior: smooth; }

/* Layout containers & helpers */
.container { width: 100%; padding: 0 1rem; margin: 0 auto; max-width: clamp(680px, 86vw, 1120px); }

/* Section scaffolding utilities */
.grid { display: grid; gap: var(--gap); }
.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); }

/* Glass panels with graceful fallback */
article, .glass { background: rgba(0,0,0,0.28); border: 1px solid rgba(255,255,255,0.25); border-radius: var(--radius); padding: 1rem; box-shadow: 0 8px 22px rgba(0,0,0,.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* Fallback for environments without backdrop-filter */
@supports not (backdrop-filter: blur(12px)) {
  article, .glass { background: rgba(0,0,0,0.66); border-color: rgba(255,255,255,0.35); }
}

/* Core page structure**
*/
header, nav, main, article, aside, footer { display: block; }

/* Header styling (hero band) */
header {
  padding: 1.25rem 0;
  text-align: center;
}
header h1 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.8rem, 1.2vw + 1.4rem, 3rem);
  font-weight: 700;
  letter-spacing: .4px;
  line-height: 1.05;
  color: var(--text);
}
header .meta {
  margin-top: .25rem;
  font-size: clamp(0.85rem, 0.6vw + 0.8rem, 1rem);
  color: var(--muted);
}

/* Main content layout */
main { display: grid; place-items: center; padding: 1rem 0; }
article { width: 100%; max-width: clamp(680px, 92vw, 1000px); }

/* Featured image frame with aspect ratio, glow, border */
.image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
  margin: 0.75rem 0 1rem;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  filter: saturate(1.05) brightness(0.98);
}

/* Headline hierarchy in hero/content */
h2 {
  margin-top: 0.25rem;
  font-size: clamp(1.4rem, 0.9vw + 1.2rem, 2.4rem);
  line-height: 1.15;
  color: var(--text);
}
p { color: rgba(231, 208, 119, 0.95); line-height: 1.55; margin: 0 0 1rem; }
blockquote { margin: .75rem 0; padding: .75rem 1rem; border-left: 3px solid var(--accent); color: #f6e8bd; background: rgba(0,0,0,.25); border-radius: 6px; }

/* Lists */
ul { padding-left: 1.25rem; margin: .5rem 0 1rem; color: var(--text); }
li { margin: .25rem 0; }

/* Content helper class (glass content block) */
.content { padding: 0.5rem 0 0; }

/* Product ad / footer region styling */
.product-ad { padding: 0.75rem; border-radius: 12px; margin: 0.75rem 0; display: block; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25); text-align: center; }
.product-ad a { color: var(--text); text-decoration: none; display: inline-block; padding: .6rem 1rem; border-radius: 999px; font-weight: 600; }
.product-ad a:hover { text-decoration: underline; background: rgba(255,255,255,0.12); }

/* Footer content */
footer { padding: 1rem; text-align: center; color: var(--muted); }

/* Link and button styles (high contrast & accessible focus) */
a, button, .btn, .cta {
  font-family: inherit;
  font-size: 1rem;
  text-decoration: none;
  color: var(--accent-2);
}
a { color: var(--accent-2); }
a:hover, a:focus { text-decoration: underline; outline: none; }

/* Focus treatment (strong, visible) */
:focus-visible { outline: 2px solid #ffd700; outline-offset: 2px; border-radius: 6px; }

/* Button variants (solid + outline) */
button, .btn, .cta { background: var(--accent); color: #111; border: 1px solid rgba(0,0,0,.15); padding: .65em 1.0em; border-radius: 999px; cursor: pointer; transition: transform .2s ease, background .2s ease; }
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); background: #e4b83c; }
.btn.outline, .cta.outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }

/* Images (frame) default accessibility tweaks */
.image-frame img { display: block; }

/* Layout utilities for responsive grids (auto-fit) */
.grid.auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); }

/* Typography: ensure fluid typography across sizes */
html { font-size: 16px; line-height: 1.4; }
@media (min-width: 700px) {
  html { font-size: 17px; }
}
@media (min-width: 1024px) {
  html { font-size: 18px; }
}
p, ul { color: rgba(231, 208, 119, 0.95); }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
 
/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}
 
/* Light-mode variant for better legibility when needed */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f3e9;
    --bg-2: #efe9d3;
    --text: #1b1b1b;
    --muted: #6b5a2a;
    --accent: #b6861a;
    --accent-2: #d9a51a;
    --surface: rgba(255,255,255,0.8);
    --surface-2: rgba(255,255,255,0.95);
    --border: rgba(0,0,0,0.15);
    --shadow: 0 2px 8px rgba(0,0,0,.08);
  }
  body {
    background-image:
      radial-gradient(circle at 20% 10%, rgba(214,174,55,.25), rgba(214,174,55,0) 40%),
      linear-gradient(#f7f2e6 0%, #f6f0e0 60%, #f7f5ed 100%),
      repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
    color-scheme: light;
  }
  article, .glass { background: rgba(255,255,255,0.92); border-color: rgba(0,0,0,0.12); color: #111; }
}
