/* Base tokens */
:root {
  --bg: #0a0a0a;
  --bg-2: #141414;
  --text: #f9f5c4;
  --muted: #d9cc82;
  --accent: #ffd400;
  --accent-2: #ffdf55;
  --panel: rgba(12,12,12,.28);
  --panel-2: rgba(12,12,12,.34);
  --border: rgba(255,255,255,.25);
  --shadow: 0 6px 22px rgba(0,0,0,.45);
}

/* Reset & base typography */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  background: 
    radial-gradient(circle at 15% -10%, rgba(255,213,0,.12), transparent 20%),
    radial-gradient(circle at 85% 0, rgba(0,0,0,.25), transparent 25%),
    linear-gradient(#0b0b0b 0, #0a0a0a 60%, #0b0b0b 100%);
  background-blend-mode: overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  isolation: isolate;
  position: relative;
}
body::before {
  content:"";
  position: fixed; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.04) 0 1px,
    transparent 1px 2px
  );
  mix-blend-mode: overlay;
  opacity: .25;
}
body::after {
  content:"";
  position: fixed; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,213,0,.05), transparent 40%),
              radial-gradient(circle at 70% 80%, rgba(0,0,0,.15), transparent 40%);
  mix-blend-mode: soft-light;
  pointer-events: none;
  opacity: .8;
}

/* Layout helpers */
.container { width: 100%; max-width: clamp(320px, 72rem, 1200px); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); }

/* Glass panel (frosted) with fallback */
.glass {
  background: rgba(8,8,8,.22);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(8,8,8,.66); }
}

/* Hero & typography scales */
header { padding: 2rem 0 1rem; }
header h1 {
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(1.8rem, 1.2vw + 2.2rem, 4rem);
  line-height: 1.05;
  margin: 0 0 .5rem;
  letter-spacing: .2px;
  color: var(--text);
  text-shadow: 0 0 14px rgba(255,213,0,.25);
}
header .meta { color: var(--muted); font-size: .92rem; }

/* Imagery */
.featured-image { border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 8px 20px rgba(0,0,0,.3); margin: .5rem 0 1rem; }
.image-frame { aspect-ratio: 16/9; width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Article content */
main { display: block; }
article { display: block; padding: 1rem; border-radius: 12px; }
h2 { font-size: clamp(1.4rem, 0.8rem + 2vw, 2.4rem); margin: .75rem 0 0.25rem; color: var(--text); }
h3 { font-size: clamp(1.15rem, 0.7rem + 1.5vw, 1.6rem); margin: .75rem 0; color: var(--text); }
p { color: #f6f2c0; line-height: 1.6; margin: .5rem 0; }
ul { padding-left: 1.4rem; margin: .25rem 0; }
li { margin: .25rem 0; }

/* Link & CTA styling */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
a:focus-visible, button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

/* Buttons (solid & outline variants) */
.btn, .cta, a.btn {
  display: inline-block;
  padding: .75rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.35);
  background: linear-gradient(#ffd400, #f6c400);
  color: #1b140a;
  transition: transform .15s ease, box-shadow .2s ease;
  cursor: pointer;
}
.btn:hover, .cta:hover, a.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.btn:active, .cta:active, a.btn:active {
  transform: translateY(0);
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,.4);
}
.btn:focus-visible, .cta:focus-visible, a.btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Small UI helpers */
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,.25);
}

/* Layout primitives */
header, nav, main, article, aside, footer { padding: 0; margin: 0; }
nav { display: none; }

/* Content containers on pages */
.content { padding: 1rem 0; display: block; }

/* Product ad block (glass panel) */
.product-ad { display: block; padding: .75rem; }
.product-ad h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.product-ad p { margin: 0; }

/* Print styles */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
  .glass { background: #fff; border: 1px solid #ccc; }
}

/* Accessibility & motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
  
/* Focus & keyboard accessibility baseline on all focusable elements */
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

/* Small screens adjustments */
@media (max-width: 640px) {
  header { padding: 1.25rem 0; }
  .grid { grid-template-columns: 1fr; }
}
