/* Base / Tokens */
:root {
  --bg: #000000;
  --bg-2: #120b22;
  --text: #f7f7ff;
  --muted: #cbb7e6;
  --accent: #ff2bd6;
  --accent-2: #a100ff;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif; color: var(--text); }
body {
  margin: 0;
  background: linear-gradient(135deg, #000 0%, #0a0010 60%, #0b0b0f 100%);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layered background: gradient + subtle noise/scanline effect (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,0,210,.08), rgba(255,0,210,0) 40%),
    linear-gradient(135deg, rgba(0,0,0,.65) 0%, rgba(0,0,0,.25) 60%, rgba(0,0,0,.65) 100%);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: -2;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0,0,0,.04) 0px,
      rgba(0,0,0,.04) 1px,
      transparent 1px,
      transparent 2px
    );
  mix-blend-mode: overlay;
  opacity: .6;
  pointer-events: none;
  z-index: -2;
}

/* Layout helpers */
.container {
  width: min(1100px, 92%);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: rgba(8,8,12,.22);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.tag {
  display: inline-block;
  padding: .25em .5em;
  border-radius: 999px;
  font-size: .75rem;
  color: #fff;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
}
ul { margin: 0 0 1em 1.25em; padding: 0; }
ul li { margin: .25em 0; }

/* Glass panels (with graceful fallback) */
.glass, header, footer, .product-ad {
  background: rgba(12,12,14,.22);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass, header, footer, .product-ad {
    background: rgba(12,12,14,.66);
  }
}
header, footer, .product-ad {
  padding: 1rem 1.25rem;
  margin: .5rem 0;
}
header { text-align: center; border-radius: 12px 12px 0 0; border-bottom: 1px solid rgba(255,255,255,.08); }

/* Header / Hero typography */
header h1 {
  font-family: inherit;
  font-size: clamp(1.75rem, 2.4vw + 1rem, 3.25rem);
  line-height: 1.12;
  margin: 0 0 .25rem;
  font-weight: 800;
  letter-spacing: .2px;
}
header .meta {
  font-size: .9rem;
  color: var(--muted);
  margin: 0;
}

/* Main content */
main { padding: 1rem 0 2rem; }
article { max-width: 900px; margin: 0 auto; }

/* Featured image frame */
.featured-image { margin: 0 0 1rem; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 6px 22px rgba(0,0,0,.5); }
.featured-image img { display: block; width: 100%; height: auto; object-fit: cover; }

/* Generic image frame helper (for any .image-frame usage) */
.image-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  background: #111;
  box-shadow: 0 6px 22px rgba(0,0,0,.5);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  /* Subtle glow */
  filter: saturate(1.05);
}
.image-frame {
  aspect-ratio: 16/9;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; }

/* Typography scale */
h2 { font-size: clamp(1.5rem, 1.8vw + 1rem, 2.4rem); margin: .75rem 0 .25rem; }
h3 { font-size: clamp(1.2rem, 1.2vw + .9rem, 1.6rem); margin: .75rem 0; }
p { margin: 0 0 1rem; }

/* Links and buttons */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
a:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }

button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 999px;
  padding: .65rem 1rem;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  display: inline-block;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn { background: var(--accent); }
.btn:hover { transform: translateY(-1px); background: #ff3ae5; }
.btn:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.4);
}
.btn--outline:hover { background: rgba(255,255,255,.04); transform: translateY(-1px); }

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

/* Lists */
ul { padding-left: 1.25em; }
li { margin: .25em 0; }

/* Product ad (footer area) */
.product-ad { padding: 1rem; display: block; }
.product-ad h3 { margin: 0 0 .5rem; font-size: 1.1rem; }
.product-ad a { text-decoration: none; display: inline-block; width: 100%; }
.product-ad p { margin: 0; padding: .25rem 0; color: #fff; }

/* Print styles (small, readable) */
@media print {
  body, html { background: #fff; color: #000; }
  a { text-decoration: underline; color: inherit; }
  header, footer { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border: none; }
}

/* Responsive tweaks */
@media (min-width: 640px) {
  .container { padding-inline: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}