/* Section: Base & Tokens */
:root {
  --bg: #0b0b14;
  --bg-2: #0f1424;
  --surface: rgba(18, 23, 42, 0.66);
  --surface-2: rgba(18, 23, 42, 0.40);
  --text: #eaf0ff;
  --muted: #a8b58a; /* olive accent */
  --accent: #9a5cff; /* neon purple */
  --accent-2: #6b8e23; /* olive */
  --border: rgba(138, 92, 246, 0.35);
  --ring: 0 0 0 3px rgba(154, 92, 255, 0.65);
  --shadow: 0 8px 20px rgba(0,0,0,.38);
  --radius: 14px;
}

/* Section: Global & Layout basics */
* { box-sizing: border-box; }
html, body { height: 100%; }
html, body, header, nav, main, article, aside, section, footer {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
}
html, body {
  min-height: 100dvh;
  color: var(--text);
  background: 
    radial-gradient(circle at 25% 5%, rgba(138,92,246,.15) 0 25%, transparent 40%),
    radial-gradient(circle at 90% 15%, rgba(107,142,35,.12) 0 25%, transparent 40%),
    linear-gradient(135deg, #0a0b14 0%, #0b0f1a 60%, #0b0d1a 100%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: screen, screen, normal, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { margin: 0; display: grid; grid-template-rows: auto 1fr auto; gap: 1rem; padding: 0; position: relative; }
:focus { outline: none; }

/* Section: Typography & Utilities */
html { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; line-height: 1.5; }
:root { color-scheme: dark; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; font-weight: 700; color: var(--text); }
p { color: var(--muted); margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:focus-visible, a:hover { text-decoration: underline; outline: none; }

/* Section: Text sizing (fluid typography) */
html { font-size: clamp(14px, 1.6vw, 16px); }
h1 { font-size: clamp(1.75rem, 3.2vw + 1rem, 3rem); }
p { font-size: clamp(0.95rem, 1.4vw + 0.5rem, 1.125rem); }

/* Section: Layout helpers */
.container { width: min(100%, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; gap: 1rem; }
.card { background: rgba(12, 16, 28, 0.66); border: 1px solid rgba(138, 92, 246, 0.34); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.tag { display: inline-block; padding: .15em .54em; border-radius: 999px; font-size: .75rem; background: rgba(154, 92, 255, 0.15); color: #eae4ff; border: 1px solid rgba(154, 92, 255, 0.35); }

/* Section: Glass panels (fallback included) */
header, nav, main, article, aside, footer {
  background: rgba(18, 22, 40, 0.42);
  border: 1px solid rgba(138, 92, 246, 0.28);
  border-radius: 14px;
  padding: 0.75rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  -webkit-border-radius: var(--radius);
  border-radius: var(--radius);
}
@supports not (-webkit-backdrop-filter: blur(12px)) and (backdrop-filter: blur(12px)) {
  /* Fallback handled by the same rule above; kept explicit for clarity */
}
@media (prefers-color-scheme: light) {
  header, nav, main, article, aside, footer { background: rgba(255,255,255,0.72); color: #0a0a0a; border-color: rgba(0,0,0,0.12); }
}
header { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
nav { display: flex; gap: .5rem; align-items: center; }
main { padding: 1rem 0; }
.image-frame { aspect-ratio: 16 / 9; width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.28); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 8px 20px rgba(0,0,0,.25); background: #141824; display: block; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.content { padding: .75rem; color: var(--text); }

/* Section: Image frame specifics (alt visuals) */
.image-frame { transition: transform .2s ease-in-out; }
.image-frame:focus-within, .image-frame:hover { transform: scale(1.01); }

/* Section: Product ad & footer items */
.product-ad, .sponsored-page { display: block; text-align: left; padding: .75rem; border-radius: 12px; background: rgba(15, 18, 30, 0.6); border: 1px solid rgba(138,92,246,.28); }
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: block; }
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Section: Link & button treatments (interactive) */
button, .btn, .cta { font-family: inherit; font-size: inherit; padding: .55rem .95rem; border-radius: 999px; border: 1px solid rgba(138, 92, 246, 0.45); background: linear-gradient(135deg, rgba(138,92,246,0.95), rgba(140, 95, 255, 0.9)); color: white; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; box-shadow: 0 6px 14px rgba(0,0,0,.28); transition: transform .2s ease, box-shadow .2s ease; text-decoration: none; }
button:focus-visible, .btn:focus-visible, .cta:focus-visible { outline: none; box-shadow: var(--ring); transform: translateY(-1px); }
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,0,0,.34); }

/* Section: Interaction variants */
.btn.secondary { background: transparent; color: var(--text); border-color: rgba(138,92,246,.6); }
.btn.secondary:hover { background: rgba(138,92,246,.15); }

/* Section: Lists */
ul { list-style: none; padding: 0; margin: 0; }
li { margin: .25rem 0; }

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

/* Section: Responsive refinements */
@media (min-width: 768px) {
  main { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; }
  .image-frame { border-radius: 16px; }
}
@media (min-width: 1024px) {
  nav { justify-content: space-between; align-items: center; }
  .grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .container { padding-inline: 1.25rem; }
}

/* Section: Accessibility niceties */
:focus-visible { outline: 3px solid rgba(154, 92, 255, 0.9); outline-offset: 2px; border-radius: 6px; }
/* Section: Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transform: none !important; }
}