/* Global tokens */
:root {
  --bg: #0a0a0f;
  --bg-2: #14121e;
  --text: #f5f7fb;
  --muted: #cbd5e1;
  --accent: #ff2a2a;
  --accent-2: #ff5a5a;
  --card: rgba(8,8,12,0.58);
  --glass: rgba(8,8,12,0.28);
  --border: rgba(255,255,255,0.25);
  --shadow: 0 6px 20px rgba(0,0,0,0.35);
}

/* Section: Global layout & baseline */
* { 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; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #0b0710 0%, #1a0f1a 60%, #0b0710 100%);
  min-height: 100%;
  overflow-x: hidden;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255,255,255,0.9) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 40%, rgba(180,180,255,0.9) 0 1px, transparent 1px);
  background-size: 2px 2px, 3px 3px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  left: 0; top: 0; right: 0; height: 2px;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}
img { max-width: 100%; height: auto; display: block; }

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

/* Section: Typography */
h1, h2 { color: var(--text); margin: 0.5em 0; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 2.5vw, 2.4rem); line-height: 1.15; }
h2 { font-size: clamp(1.25rem, 1.6vw, 1.6rem); }
p { color: var(--muted); margin: 0.5em 0; line-height: 1.5; }
blockquote { margin: 0.75em 0; padding: 0.5em 1em; border-left: 4px solid var(--accent); background: rgba(0,0,0,0.25); border-radius: 6px; color: var(--text); }

/* Section: Content framing */
.image-frame { aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,0.25); box-shadow: 0 8px 20px rgba(0,0,0,0.35); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Content area */
.content { padding: .5rem 0; }

/* Section: Cards & tags (utility classes) */
.card { background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.25); border-radius: 10px; padding: .75rem; }
.tag { display: inline-block; padding: .15em .5em; border-radius: 999px; font-size: .75rem; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.15); color: var(--text); }

/* Section: Glass panels & surfaces (fallbacks included) */
header, .product-ad, aside, .sponsored-page {
  background: rgba(6,6,12,0.28);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  header, .product-ad, aside, .sponsored-page {
    background: rgba(6,6,12,0.60);
    border-color: rgba(255,255,255,0.40);
  }
}

/* Section: Interaction (links, buttons) */
a, button, .btn, .cta { color: var(--text); text-decoration: none; cursor: pointer; }
a { color: var(--text); }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
button, .btn { padding: 0.6em 1em; border-radius: 8px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); color: var(--text); font: inherit; }
.btn { display: inline-flex; align-items: center; gap: .5em; }

/* Button variants */
.btn--solid { background: var(--accent); border-color: rgba(0,0,0,0.2); color: #fff; }
.btn--outline { background: transparent; border-color: rgba(255,255,255,0.6); color: var(--text); }

/* Focus treatment for accessibility */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Section: Page structure */
header { padding: 1.25rem; margin: 0.75rem auto; }
header h1 { margin: 0; }

/* Section: Page sections (footer layout) */
footer { padding: 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }

/* Section: Lists tweaks */
ul { margin: 0.5em 0; padding-left: 1.25rem; }

/* Section: Core layout semantics (explicit selectors required by task) */
html, body, header, nav, main, article, footer, aside { }

/* Section: Print (readability) */
@media print {
  body { background: white; color: black; }
  a { text-decoration: none; color: black; }
}

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