/* --- Theme Tokens --- */
:root {
  --bg: #0b0b0f;
  --bg-2: #14101d;
  --text: #eaf2ff;
  --muted: #a6b1c6;
  --accent: #ff7a00;       /* burnt orange */
  --accent-2: #7a00ff;     /* ultraviolet */
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  --radius: 12px;
  --focus: 2px solid var(--accent-2);
}

/* --- Base & Layout --- */
html, body { height: 100%; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html, body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(10,10,12,.92) 0%, rgba(9,9,14,.92) 60%, rgba(10,10,12,.92) 100%),
    radial-gradient(circle at 2px 2px, rgba(255,122,0,.55) 2px, transparent 2px),
    radial-gradient(circle at 6px 6px, rgba(122,0,255,.25) 2px, transparent 2px);
  background-size: 8px 8px, 40px 40px, 40px 40px;
  background-blend-mode: overlay, overlay, normal;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layered glass-like containers fallback for modern browsers */
header, main, footer, aside {
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1rem;
  margin: 0.75rem auto;
}

/* --- Section scaffolding (layout utilities) --- */
.container { width: 100%; max-width: clamp(680px, 78vw, 1120px); padding-inline: 1rem; margin-inline: auto; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: .75rem; }
.tag { display: inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; border: 1px solid rgba(255,255,255,.25); color: var(--text); }

/* --- Typography --- */
h1, h2 { margin: 0.25rem 0 0.25rem; letter-spacing: .2px; }
h1 { font-size: clamp(1.8rem, 2.5vw + 1rem, 3.4rem); line-height: 1.08; background: linear-gradient(90deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: clamp(1.4rem, 1.5vw + .6rem, 2.2rem); color: #fff; }

/* Subtle helpers for content width in articles */
article { max-width: clamp(40ch, 65ch, 72ch); margin: 0 auto; padding: .5rem 0 1rem; color: #e9edff; }
article p { margin: .6rem 0; color: #e7eaff; }
article ul { padding-left: 1.25rem; margin: .4rem 0; }
article li { margin: .25rem 0; }

/* --- Visual image frame --- */
.image-frame, .featured-image { width: 100%; max-width: 860px; margin: 0 auto; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.25); display: block; }
.image-frame { aspect-ratio: 16/9; }
.image-frame img, .featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Explicitly styled selector (required) */
.image-frame, .image-frame img { }

.content { padding: 0; }

/* --- Links & interactive controls --- */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.28);
  padding: .5rem .8rem;
  background: rgba(0,0,0,.25);
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
  cursor: pointer;
}
a:hover, button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(122,0,255,.7); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible { outline: 3px solid rgba(122,0,255,.9); outline-offset: 2px; }

/* Primary / secondary button styles */
.btn { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.28); padding: .6rem 1rem; border-radius: 10px; font-weight: 600; }
.btn.primary { background: linear-gradient(135deg, var(--accent) 0%, #ff8a33 60%); border: none; color: #111; text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.btn.secondary { background: rgba(0,0,0,.25); }

/* --- Header, Nav, Main, Article, Footer --- */
header { text-align: center; padding: 1.25rem; }
header h1 { margin: .25rem 0; font-weight: 700; letter-spacing: .4px; }
header .meta { font-size: .92rem; color: var(--muted); }

/* Nav links within header */
nav { margin-top: .5rem; display: inline-flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
nav a { color: var(--text); padding: .4rem .6rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.25); text-decoration: none; }

/* Main flow adjustments */
main { padding: 0.75rem; }
footer { padding: 0.75rem; font-size: .92rem; color: var(--muted); }

/* --- Utility & extras --- */
ul, li { margin: 0; padding: 0; list-style-position: inside; }
.product-ad { margin: .6rem 0; padding: .6rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.28); }
.product-ad a { color: var(--text); display: block; padding: .4rem; text-decoration: none; }
.product-ad a:hover { text-decoration: underline; }

/* Sponsored / secondary sections in footer alignment */
footer .sponsored-page { margin-top: .5rem; }

/* Print styles for basic readability */
@media print {
  body { color: #000; background: #fff; }
  header, main, footer { border: none; box-shadow: none; background: #fff; }
  a, button { text-decoration: underline; color: #000; }
}

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