/* Section: Base theme */
:root {
  --bg: #0b0b0f;
  --bg-2: #141414;
  --surface: rgba(255, 140, 0, 0.14);
  --text: #f7f7f7;
  --muted: #c9c9c9;
  --accent: #ff4d4d;
  --accent-2: #ff8a00;
  --glass: rgba(255,255,255,0.08);
  --glass-2: rgba(255,255,255,0.16);
  --border: rgba(255,255,255,0.25);
  --shadow: 0 8px 24px rgba(0,0,0,.48);
  --focus: #ffd27a;
}
html, body { height: 100%; }
* { box-sizing: border-box; }
html { color-scheme: dark; }
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: var(--bg);
  /* Layered background: gradient + orange/red shapes + subtle scanlines */
  background-image:
    radial-gradient(circle at 15% 10%, rgba(255,140,0,.22) 0 40%, transparent 42%),
    radial-gradient(circle at 75% 40%, rgba(255,0,0,.25) 0 28%, transparent 30%),
    linear-gradient(#0b0b0f 0, #0b0b0f 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-size: 60% 60%, 60% 60%, 100% 100%, 100% 2px;
  background-position: 0 0, 0 0, 0 0, 0 0;
  background-blend-mode: screen, screen, normal, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
header, main, footer, aside { display: block; }

/* Layout helpers */
.container { width: min(1100px, 92%); margin-inline: auto; padding-inline: 0.5rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Section: Layout & header (glass panel) */
header {
  padding: 2rem 1rem;
  text-align: center;
  margin: 2rem auto;
  border-radius: 16px;
  background: rgba(8,8,10,0.6);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
header h1 { font-size: clamp(1.75rem, 4vw + .5rem, 3.25rem); line-height: 1.05; margin: 0 0 .5rem; letter-spacing: .5px; }
header .meta { color: var(--muted); font-size: clamp(.8rem, 2vw, 1rem); }

/* Section: Main content */
main { padding: 1rem; }
article { max-width: 900px; margin: 0 auto; padding: 1rem; }

/* Image frame / hero image */
.featured-image { border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: inset 0 0 12px rgba(0,0,0,.4); margin: 1rem 0; }
.image-frame { 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); background: #000; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content block styling (glass panels with fallback) */
.content { display: block; padding: 0; color: var(--text); }

/* Glass panels with backdrop-filter (fallback provided) */
.card, .glass, .content, .product-ad, section { 
  background: rgba(255,255,255,.08);
  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)) {
  .card, .glass, .content, .product-ad, section { background: rgba(0,0,0,.65); }
}

/* Section: Product ad (footer area) */
.product-ad { display: block; margin: 1rem 0; text-align: center; padding: .75rem; }
.product-ad a { color: #fff; text-decoration: none; display: inline-block; padding: .5rem 1rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,100,0,.25); }
.product-ad a:hover { transform: translateY(-1px); }
.product-ad a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Headings & text rhythm */
h2 { font-size: clamp(1.25rem, 2vw + 1rem, 2rem); margin: .75rem 0; color: #ffd6a2; }
p { margin: .75rem 0; line-height: 1.6; color: #e7e7e7; }
ul, li { margin: .5rem 0; padding-left: 1.25rem; color: #e9e9e9; }

/* Element interactions (links, buttons, CTAs) */
a, button, .btn, .cta { cursor: pointer; transition: color 160ms ease, background 160ms ease, transform 160ms ease; text-decoration: none; color: #ffd6a2; }
a { color: #ffb067; }
a:hover, a:focus { text-decoration: underline; color: #ffd4a3; outline: none; }
a:focus-visible { outline: 3px solid #ffb067; outline-offset: 3px; }

/* Buttons & CTAs */
button, .btn, .cta {
  background: var(--accent-2);
  color: #111;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 10px;
  padding: .55rem .95rem;
  font-weight: 600;
}
.btn.secondary, .cta { background: transparent; color: var(--text); border-color: rgba(255,255,255,.4); }
button:hover, .btn:hover, .cta:hover { transform: translateY(-2px); }
button:focus-visible, .cta:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Utility: tags */
.tag {
  display: inline-block;
  padding: .25rem .5rem;
  font-size: .75rem;
  border-radius: 6px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
}

/* Light mode tweaks for legibility (dark default) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f6f6;
    --bg-2: #f0f0f0;
    --text: #1a1a1a;
    --muted: #515151;
    --accent: #b40000;
    --accent-2: #e55a00;
  }
  body {
    background-color: #f6f6f6;
    background-image: none;
  }
  header { background: rgba(255,255,255,.95); border-color: rgba(0,0,0,.08); }
  .card, .glass { background: rgba(255,255,255,.85); border: 1px solid rgba(0,0,0,.08); box-shadow: 0 6px 20px rgba(0,0,0,.08); }
  a, button, .btn, .cta { color: #2a1f00; }
}

/* Fine-tuning responsive typography */
html { font-size: 16px; }
@media (max-width: 700px) {
  header { padding: 1.5rem 1rem; }
  .image-frame { border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Section: Print readability */
@media print {
  body { color: #000; background: #fff; }
  header, main, article, footer { display: block; }
  a, button { text-decoration: underline; color: #000; }
}