/* Palette & Foundations */
:root {
  --bg: #0a0a14;
  --bg-2: #141125;
  --text: #eae6fb;
  --muted: #c6b5d9;
  --accent: #ff2bd3;
  --accent-2: #7c3aed;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.25);
  --surface: rgba(0, 0, 0, 0.25);
}
html, body { height: 100%; }
html { color-scheme: dark; }
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f4fb;
    --bg-2: #ffffff;
    --text: #1b1b1f;
    --muted: #555168;
    --accent: #4b0082;
    --accent-2: #7a4dff;
    --glass: rgba(255, 255, 255, 0.86);
    --glass-border: rgba(0, 0, 0, 0.08);
    --surface: rgba(0, 0, 0, 0.08);
  }
}
@media (prefers-color-scheme: dark) {
  /* default dark cyber theme */
}
@media print {
  html, body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}

/* Layered Background (gradient + subtle scanlines) */
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.55;
  background:
    linear-gradient(135deg, rgba(80,0,80,.85) 0%, rgba(40,0,60,.75) 60%, rgba(12,0,40,.85) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.25)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html, body { height: 100%; }

/* Motion preference */
@media (prefers-reduced-motion: reduce) {
  html, body, * { animation: none !important; transition: none !important; }
}

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

/* Typography & structure */
header { padding: 2rem 1rem; text-align: center; }
header h1 {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  line-height: 1.05;
  margin: 0 0 .35rem;
  letter-spacing: .2px;
  text-shadow: 0 0 14px rgba(124,58,237,.5);
}
header .meta { font-size: .92rem; color: var(--muted); }

/* Glass panels (primary content container) */
article {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 28px rgba(0,0,0,.40);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  article { background: rgba(12,0,60,.65); }
  article { border-color: rgba(255,255,255,.28); }
}

/* Image framing & visuals */
.featured-image { display:flex; justify-content:center; padding: .5rem 0 1rem; }
.image-frame {
  width: 100%; max-width: 900px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 22px rgba(0,0,0,.4);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  image-rendering: auto;
}
.featured-image img { width: 100%; height: auto; border-radius: 12px; }

/* Text content hierarchy */
h2 { font-size: clamp(1.25rem, 3.2vw, 2rem); margin: .4rem 0 .4rem; color: var(--text); }
p, li { color: var(--text); margin: 0 0 1rem; }
ul { padding-left: 1.25rem; margin: 0 0 1rem; }

/* Links & buttons */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
}
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
}
.btn {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(186,0,255,.95), rgba(255,0,140,.95));
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  font-size: 0.95rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.btn:active { transform: translateY(0); }
.btn.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.6);
  color: var(--text);
}
.cta { padding: .6rem 1rem; border-radius: 999px; }

/* Card / utility visuals */
.card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: .9rem;
}
.tag {
  display: inline-block;
  padding: .15em .5em;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(124,58,237,.25);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
}

/* Layout sections used in footer */
.product-ad, .sponsored-page {
  display: block;
  border-radius: 12px;
  padding: .9rem;
  margin: .5rem 0;
  background: rgba(12,0,60,.40);
  border: 1px solid rgba(255,255,255,.25);
}
.product-ad a, .sponsored-page a { text-decoration: none; display: block; }

/* Footer & global structure */
footer { padding: 1.5rem 1rem; text-align: center; }
.sponsored-page { opacity: .95; }

/* Dark mode refinements for readability */
@media (prefers-color-scheme: light) {
  body { background: #f7f6fb; color: #1b1b1f; }
  article { background: rgba(255,255,255,0.92); border-color: rgba(0,0,0,.08); color: #1b1b1f; }
  .image-frame { border-color: rgba(0,0,0,.08); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
  .product-ad, .sponsored-page { background: rgba(255,255,255,.88); }
}
