/* Base / Theme Tokens */
:root{
  --bg: #0a0b1a;
  --bg-2: #0b1020;
  --text: #e9eaff;
  --muted: #a3a8c9;
  --surface: rgba(255,255,255,0.10);
  --surface-2: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.28);
  --accent: #e6002a;        /* scarlet */
  --accent-2: #5b6bff;       /* indigo accent for contrast */
  --shadow: 0 10px 25px rgba(0,0,0,.32);
  --radius: 14px;
}

/* Section: Global & Layout */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; font-feature-settings: "kern"; }
body {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Layered indigo/scarlet cyber backdrop with scanlines */
  background:
    radial-gradient(circle at 20% 20%, rgba(128,0,160,.15) 0 18%, transparent 18%),
    radial-gradient(circle at 78% 0%, rgba(255,0,60,.15) 0 28%, transparent 28%),
    conic-gradient(from 180deg at 50% 50%, rgba(68,0,170,.10), rgba(0,0,0,0) 25%, rgba(68,0,170,.10) 50%, rgba(0,0,0,0) 75%, rgba(68,0,170,.10) 100%),
    linear-gradient(135deg, var(--bg) 0%, #0a0a1a 60%, #090912 100%);
  background-blend-mode: overlay, overlay, overlay, normal;
  min-height: 100%;
}
header, nav, main, article, aside, footer { padding: 0; }
.container { width: min(1100px, 92vw); margin-left: auto; margin-right: auto; padding-inline: 1rem; }

/* Sub-layer scanlines for depth (optional, respects prefers-reduced-motion) */
@media (prefers-reduced-motion: reduce) {
  body { background-attachment: initial; }
}

/* Section: Typographic Scale (Fluid) */
h1, h2, h3 { margin: 0 0 .5rem; font-weight: 700; letter-spacing: .2px; }
h1 { font-size: clamp(1.75rem, 1.2rem + 3vw, 3rem); line-height: 1.1; }
h2 { font-size: clamp(1.25rem, 0.9rem + 2vw, 1.8rem); }
h3 { font-size: clamp(1rem, 0.8rem + 1.5vw, 1.25rem); color: var(--muted); }

/* Section: Cards / Glass Panels */
.content, .product-ad, .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text);
  backdrop-filter: saturate(1.1) blur(12px);
  -webkit-backdrop-filter: saturate(1.1) blur(12px);
  box-shadow: var(--shadow);
}

/* Fallback for no backdrop-filter: provide slightly denser background */
@supports not (backdrop-filter: blur(12px)) {
  .content, .product-ad, .card { background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.38); }
}
img{ display: block; max-width: 100%; height: auto; }

/* Section: Header / Nav / Hero */
header { text-align: center; padding: 2rem 1rem; position: relative; z-index: 1; }
header h1 { color: var(--text); margin-bottom: .25rem; }
header .meta { color: var(--muted); font-size: clamp(0.9rem, 0.8vw + .8rem, 1.05rem); }

/* Simple responsive nav alignment */
nav { display: inline-flex; gap: .75rem; padding-top: .5rem; }
nav a { color: var(--text); text-decoration: none; padding: .25rem .5rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); }
nav a:hover, nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; text-decoration: underline; }

/* Main layout */
main { padding: 1rem 0 2rem; }
article { display: grid; gap: 1rem; grid-template-columns: 1fr; }

/* Section: Image frame */
.image-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-frame::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
  mix-blend-mode: overlay;
}

/* Section: Content wrapper inside article if used as panel */
.content { max-width: 70ch; }

/* Section: Article typography layout helpers */
ul, ol { padding-left: 1.25rem; margin: .5rem 0 1rem; }
li { margin: .25rem 0; }

/* Section: Buttons / Links variants */
a, button, .btn, .cta {
  cursor: pointer;
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 0.75em 1.25em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
a { background: transparent; color: var(--accent-2); text-decoration: none; }
button, .btn, .cta { background: var(--accent); color: white; border: 1px solid rgba(0,0,0,.15); }
.btn.secondary, .cta.secondary { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.4); }
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:active, .cta:active { transform: translateY(0); opacity: .95; }

/* Outline variant for emphasis (solid + outline states) */
.btn.outline, .cta.outline, a.outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--accent);
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
a:focus-visible { text-decoration: underline; }

/* Section: Utility / tags */
.grid { display: grid; gap: 1rem; width: 100%; }
.card { padding: 1rem; }

/* .tag utility (small label chips) */
.tag {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .25rem .5rem; font-size: .75rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.15);
  color: #fff;
}
.tag + .tag { margin-inline-start: .5rem; }

/* Section: Footer / Ad blocks */
footer { padding: 1.5rem 1rem; text-align: center; color: var(--muted); }
.product-ad, .sponsored-page { display: inline-block; width: auto; margin: .25rem; }

/* Accessibility: Ensure high contrast over glass where text overlays */
@media (prefers-contrast: more) {
  :root { --surface: rgba(255,255,255,.18); }
  .content, .product-ad { border-color: rgba(255,255,255,.6); }
}

/* Layout helpers for responsive behavior */
@media (min-width: 720px) {
  article { grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
}
@media (min-width: 1024px) {
  .container { width: min(1100px, 92vw); }
  main { padding: 2rem 0; }
  nav { justify-content: center; }
}
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}
