/* Base Tokens */
:root{
  --bg: #0b0b0f;
  --bg-2: #14141a;
  --surface: rgba(235, 190, 0, 0.18);
  --surface-2: rgba(235, 190, 0, 0.08);
  --text: #f5f5d7;
  --muted: #c5c09a;
  --accent: #e6c400;
  --accent-2: #ffd94a;
  --card: rgba(15,15,20,0.66);
  --border: rgba(234, 198, 0, 0.45);
  --shadow: 0 8px 28px rgba(0,0,0,0.45);
  --radius: 14px;
  --focus: 3px solid #ffd966;
  --focus-color: #ffd966;
}
html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  /* Layered background: pixel mosaic + subtle scanlines + gradient */
  background-image:
    linear-gradient(0deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    repeating-linear-gradient(to bottom, rgba(0,0,0,0.25) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% 0%, rgba(255, 212, 0, 0.08), transparent 40%),
    linear-gradient(#0b0b0f, #0b0b0f);
  background-size: 20px 20px, 20px 20px, 2px 2px, 100% 100%, cover;
  background-blend-mode: overlay, overlay, normal, normal, normal;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
}
/* Layout helpers */
.container { width: 100%; max-width: clamp(680px, 82vw, 1100px); margin: 0 auto; padding: 1rem; }

/* Glass surfaces (with fallback) */
header, main, article, aside, footer {
  background: rgba(14,14,20,0.28);
  border: 1px solid rgba(234, 204, 0, 0.40);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, article, aside, footer { background: rgba(14,14,20,0.85); }
}

/* Hero content (header) */
header { display: grid; gap: .25rem; align-items: start; padding: 1.25rem; }
header h1 { font-size: clamp(1.75rem, 3.5vw, 3.25rem); line-height: 1.05; margin: 0; font-weight: 700; letter-spacing: .4px; color: #fffdf0; text-shadow: 0 1px 0 rgba(0,0,0,.4); }
header .meta { font-size: clamp(0.9rem, 0.5vw, 1rem); color: var(--muted); margin-top: .25rem; }

/* Main content area */
main { display: block; }
article { display: block; }

/* Image frame styling (as required) */
.image-frame { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; border: 1px solid rgba(234, 198, 0, 0.45); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 10px 26px rgba(0,0,0,.45); background: #000; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content block styling */
.content { padding: .75rem 0; }

/* Headings & typography */
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin: .75rem 0; color: #fff; }
p { font-size: clamp(1rem, 0.9vw, 1.15rem); color: var(--muted); margin: .6rem 0 1rem; }
blockquote { margin: .8rem 0; padding: .6rem 1rem; border-left: 3px solid var(--accent); color: #f9f6d5; background: rgba(0,0,0,0.18); border-radius: 6px; font-style: italic; }

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

/* Utility components */
.card { background: var(--card); border: 1px solid rgba(235, 210, 60, 0.5); border-radius: 12px; padding: .9rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Product ad / simple callouts */
.product-ad { padding: .5rem 0; }
.product-ad a { display: block; padding: .9rem; text-align: center; text-decoration: none; border-radius: 10px; background: rgba(234, 178, 0, 0.22); border: 1px solid rgba(234, 178, 0, 0.5); color: var(--text); transition: transform .18s ease, background .18s ease; }
.product-ad a:hover { transform: translateY(-1px); background: rgba(234, 178, 0, 0.30); }
.product-ad a:focus-visible { outline: 3px solid var(--focus-color); outline-offset: 2px; }

/* Links & controls */
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 3px solid var(--focus-color); outline-offset: 2px; border-radius: 4px; }

button, .btn, .cta {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(234, 178, 0, 0.55);
  background: linear-gradient(to bottom, rgba(234,178,0,0.95), rgba(234,178,0,0.75));
  color: #1a180f;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); }
button:focus-visible, .btn:focus-visible, .cta:focus-visible { outline: 3px solid var(--focus-color); outline-offset: 2px; }

/* Utility typography tweaks for accuracy on glass */
.subtle { color: var(--muted); }

/* Print-friendly (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, main, article, aside, footer { background: transparent; border: none; box-shadow: none; }
  a { color: #0000ee; text-decoration: underline; }
}

/* Accessibility & motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
 
/* Light-scheme variant for readability when user prefers light UI */
@media (prefers-color-scheme: light) {
  :root{
    --bg: #f6f5e0;
    --bg-2: #f0f0d6;
    --text: #1a1a0f;
    --muted: #5b5b3a;
    --surface: rgba(0,0,0,0.08);
    --surface-2: rgba(0,0,0,0.04);
    --accent: #b08700;
    --accent-2: #d4a900;
    --card: rgba(255,255,255,0.8);
    --border: rgba(0,0,0,0.15);
    --shadow: 0 4px 14px rgba(0,0,0,0.15);
  }
  body { color: var(--text); background: linear-gradient(#f5f4e3, #f5f4e3); }
  header, main, article, aside, footer { background: rgba(255,255,255,0.85); border: 1px solid rgba(0,0,0,0.1); color: #1a1a0f; }
  a { color: #2b4bd8; }
  a:hover { text-decoration: underline; }
  button, .btn, .cta { background: linear-gradient(to bottom, #ffd966, #e5c04a); color: #1a1a0f; border-color: rgba(0,0,0,0.15); }
}
