/* Tokens */
:root {
  --bg: #0b0f14;
  --bg-2: #1a2230;
  --text: #eaf2f7;
  --muted: #a8b3bd;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.12);
  --accent: #ffd400;
  --accent-2: #fff84a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 28px rgba(0,0,0,.32);
  --focus: 3px solid rgba(255,214,0,.85);
  --container-max: min(1100px, 92vw);
}

/* Global reset & accessibility */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  /* Layered background: gradient + subtle noise/scanlines */
  background-image:
    radial-gradient(circle at 60% -10%, rgba(255,255,255,.08), transparent 25%),
    linear-gradient(135deg, #0b0f14 0%, #182033 60%, #0b0f14 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}

/* Layout primitives */
header, nav, main, article, aside, footer { display: block; }
.container { width: 100%; max-width: var(--container-max); padding: 0 1rem; margin-inline: auto; }

/* Section headers (sectioned styling) */
header {
  padding: 2rem 1rem;
  text-align: center;
  position: relative;
}
header h1 {
  margin: 0 0 .25rem;
  font-size: clamp(2rem, 3vw + 1rem, 3.75rem);
  line-height: 1.04;
  letter-spacing: .4px;
  color: #eaf2ff;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
header .meta {
  margin: 0;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  color: var(--muted);
}

/* Main content & typography */
main { padding: 1rem 1rem 2rem; display: grid; place-items: center; }
article { width: 100%; max-width: calc(900px + 2vw); padding: 0; }

/* Image frame */
.image-frame {
  width: 100%; aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 22px rgba(0,0,0,.3);
  margin: 0 0 1rem;
  background: #000;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  image-rendering: -webkit-optimize-contrast;
}
.featured-image { border-radius: 14px; overflow: hidden; }

/* Content copy */
.content { padding: .25rem 0 1rem; line-height: 1.6; color: #eaf3fb; }

/* Lists */
ul { margin: .5rem 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* Glass panel / cards */
.card, .glass { 
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius);
  padding: .9rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #eef5ff;
}
@supports not (backdrop-filter: blur(10px)) {
  .glass, .card { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4); }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Utility grid / blocks */
.grid { display: grid; gap: 1rem; }
@media (min-width: 680px) {
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
.card h3 { margin: .25rem 0 .5rem; font-size: 1.125rem; }

/* Product ad / footer panels */
footer { padding: 2rem 1rem; display: grid; gap: 1rem; justify-items: center; }

.product-ad, .sponsored-page {
  width: 100%; max-width: 720px;
  display: grid; gap: .5rem; text-align: center;
}
.product-ad a, .sponsored-page a {
  display: block; text-decoration: none;
  padding: .75rem 1rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.25);
  color: var(--text);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; background: rgba(0,0,0,.3); transform: translateY(-1px); }
.product-ad a:focus-visible, .sponsored-page a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,214,0,.85); }

/* Links & CTAs */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
a:hover { text-decoration: underline; color: var(--accent-2); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255,214,0,.95);
  border-radius: 6px;
  outline-offset: 0;
}

/* Buttons variants */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .75rem 1.25rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.12);
  color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.25);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn.primary { background: var(--accent); color: #1a1a1a; border-color: rgba(0,0,0,.1); }
.btn.outline { background: transparent; border: 1px solid rgba(255,255,255,.55); color: #e8f0ff; }
.btn:hover { transform: translateY(-1px); }

/* Images with frame accents (subtle glow) */
.image-frame { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 6px 18px rgba(0,0,0,.25); }

/* Typography fallbacks and fluid sizes */
h2 { font-size: clamp(1.4rem, 1.6vw + 1rem, 2.4rem); margin: .75rem 0 .25rem; }
p { margin: 0 0 1rem; }

/* Image frame glow on hover (subtle) */
.image-frame:hover { filter: saturate(1.05); }

/* Small helpers */
.small { font-size: 0.9rem; color: var(--muted); }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, footer { page-break-after: avoid; }
  .glass { background: #fff; color: #000; border: 1px solid #000; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@supports (backdrop-filter: blur(0px)) {
  .glass { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}

/* Section styling hooks (ensuring selectors exist in the page) */
header, nav, main, article, aside, footer,
.image-frame, .image-frame img, .content,
.product-ad, a, button, .btn, .cta,
ul, li, .container, .grid, .card, .tag { /* section header marker */ }

/* Minimal entry animation (GPU-friendly) */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.featured-image { animation: fadeInUp 520ms ease-out; opacity: 0; animation-fill-mode: forwards; }
@media (prefers-reduced-motion: no-preference) {
  .featured-image { animation-name: fadeInUp; animation-duration: 520ms; animation-timing-function: ease-out; }
}