/* Tokens */
:root{
  --bg: #07070b;
  --bg-2: #0b0d1a;
  --bg-3: #11131e;
  --text: #e9e1ff;
  --muted: #c8bfff;
  --accent: #7a5cff;
  --accent-2: #b199ff;
  --card: rgba(255,255,255,.08);
  --card-2: rgba(255,255,255,.12);
  --border: rgba(255,255,255,.28);
  --shadow: 0 8px 24px rgba(0,0,0,.35);
  --radius: 12px;
}

/* Base & layout (mobile-first) */
* { box-sizing: border-box; }
html, body { height: 100%; }
html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: linear-gradient(135deg, rgba(6,6,12,.98) 0%, rgba(12,8,22,.95) 60%, rgba(10,7,20,.96) 100%), #030306;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-attachment: fixed;
  position: relative;
}
* { -webkit-tap-highlight-color: transparent; }

/* Subtle background: pixel mosaic + scanlines (pure CSS) */
html { isolation: isolate; }
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(#000 0 0),
    linear-gradient(to bottom, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 100% 3px, 4px 100%;
  opacity: .25;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(45deg, rgba(120,0,180,.18) 0 2px, transparent 2px),
    linear-gradient(-45deg, rgba(0,180,255,.14) 0 2px, transparent 2px);
  opacity: .12;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
}
/* Pixel mosaic (dense subtle texture) */
body {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.04) 0 2px, transparent 2px),
    radial-gradient(circle at 3px 3px, rgba(255,255,255,.04) 0 2px, transparent 2px),
    linear-gradient(135deg, rgba(6,6,12,.98), rgba(8,6,14,.96) 60%, rgba(12,6,18,.95));
  background-size: 8px 8px, 8px 8px, cover;
  position: relative;
  z-index: 0;
}

/* Glass panels (fallback if backdrop-filter not supported) */
	header, main, article, footer, aside {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, article, footer, aside {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.4);
  }
}

/* Structure helpers */
.container {
  width: 100%;
  max-width: clamp(720px, 88vw, 1200px);
  margin: 0 auto;
  padding: 1rem;
}
.grid { display: grid; gap: 1rem; }

/* Header / hero */
header { text-align: center; padding: 1.25rem 1rem; margin: 1rem auto; }
header h1 { font-size: clamp(1.6rem, 2.5vw + 1rem, 2.6rem); line-height: 1.08; margin: .25rem 0 .5rem; letter-spacing: .2px; }
header .meta { color: var(--muted); font-size: clamp(0.95rem, 0.8vw + 0.75rem, 1.05rem); margin-bottom: .5rem; }

/* Navigation */
nav { margin-top: .25rem; }
nav a { color: var(--text); text-decoration: none; padding: .25rem .5rem; border-radius: 6px; }
nav a:hover, nav a:focus-visible { text-decoration: underline; outline: none; }

/* Main content */
main { display: block; padding: 0; }
article { display: block; }

/* Featured image frame */
.featured-image { margin: .75rem 0 0; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.image-frame { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,.28); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Typography hierarchy */
h2 { font-size: clamp(1.4rem, 2.2vw + 1rem, 2rem); margin: .75rem 0 .5rem; color: var(--text); }
h3 { font-size: clamp(1.1rem, 1.6vw + .8rem, 1.4rem); margin: .75rem 0 .4rem; color: var(--text); }
p { font-size: clamp(1rem, 0.5vw + .9rem, 1.125rem); line-height: 1.55; color: #e9e6ff; margin: .6rem 0; }
blockquote { margin: .8rem 0; padding: .5rem 1rem; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }

/* Content block utility */
.content { max-width: 70ch; }

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

/* Product/ad/footer-styled sections */
.product-ad, .sponsored-page { display: block; text-align: center; padding: .75rem; margin: .5rem 0; }
.product-ad a, .sponsored-page a { text-decoration: none; color: #fff; display: inline-block; padding: .5rem 0; width: 100%; }

/* Footer layout with simple columns on wide viewports */
footer { margin: 1rem auto; padding: .75rem; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: stretch; }

/* Links, buttons, CTAs */
a, button, .btn, .cta { font: inherit; color: inherit; text-decoration: none; }
a { color: var(--accent); }
a:hover, a:focus-visible { text-decoration: underline; color: var(--accent-2); }
button, .btn, .cta {
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 8px;
  padding: .6rem .95rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: inline-block;
  transition: transform .15s ease, background .2s ease, border-color .2s;
}
.btn:hover, .cta:hover { transform: translateY(-1px); background: #6b49ff; }
.btn:active, .cta:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  border-color: rgba(255,255,255,.85);
  color: var(--text);
}
.btn--outline:hover { background: rgba(255,255,255,.08); }

/* Cards and tags (utility classes) */
.card {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem;
}
.tag {
  display: inline-block;
  padding: .15em .4em;
  font-size: .75rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  color: #fff;
}

/* Form elements (basic) */
input, select, textarea {
  width: 100%;
  padding: .5rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.08);
  color: var(--text);
}
input::focus, select:focus, textarea:focus { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* Accessibility & motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Print */
@media print {
  body { background: #fff; color: #000; }
  header, nav, main, article, footer { background: transparent; border: none; box-shadow: none; }
  a { text-decoration: underline; }
}
