/* Base & Tokens */
:root{
  --bg: #0b001a;
  --bg-2: #1a0033;
  --text: #eaf2ff;
  --muted: #b6c7e6;
  --accent: #2ee6c1;
  --accent-2: #4bd5ff;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 6px 24px rgba(0,0,0,.34);
  --radius: 14px;
  --focus: 0 0 0 3px rgba(46,223,193,.55);
}

*,
*::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", "Liberation Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
  font-size: clamp(14px, 2.4vw, 18px);
  background-color: var(--bg);
  /* Layered background: parchment gradient + subtle noise/scanlines */
  background-image:
    linear-gradient(135deg, rgba(120,0,140,0.55), rgba(0,40,60,0.55)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.035) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% 0%, rgba(0,0,0,0.15), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(0,0,0,0.15), transparent 40%);
  background-blend-mode: overlay, overlay, multiply, multiply;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html, body { scroll-behavior: auto; }
}

/* Layout helpers (compact; responsive) */
.container {
  width: 100%;
  max-width: clamp(860px, 90vw, 1200px);
  margin-inline: auto;
  padding-inline: 1rem;
}

.grid { display: grid; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }

/* Structural elements (apply glassy feel) */
header, main, footer, aside {
  /* uses glassy panels where relevant; base styling below for cohesion */
}

header {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem 1rem;
  margin: 1rem auto;
  width: min(100%, 1100px);
  border-radius: calc(var(--radius) + 6px);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 10px 28px rgba(0,0,0,.25);
}
header h1 {
  font-size: clamp(1.6rem, 4vw, 2.75rem);
  line-height: 1.12;
  margin: 0 0 .25rem;
  letter-spacing: .2px;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
}

/* Featured image frame (compat with .image-frame) */
.featured-image,
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.38);
  background: #000;
  display: block;
  margin: 1rem auto 1.25rem;
  box-shadow: inset 0 0 12px rgba(0,0,0,.25);
}
.image-frame { /* extra utility if used elsewhere */
  border-color: rgba(255,255,255,.5);
}
.image-frame img, .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}

/* Main content area */
main { padding: 1rem 0 2rem; }

article {
  width: 100%;
  max-width: 92ch;
  margin: 0 auto;
  padding: 0 0.5rem;
}
article h2, article h3 {
  margin: 1.25rem 0 0.5rem;
  line-height: 1.25;
}
article p { margin: .75rem 0; color: #e7efff; }

/* Content helpers (compat with .content) */
.content { padding: 0.5rem; }

/* Inline elements: links and buttons */
a, button, .btn, .cta {
  font: inherit;
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  padding: .55rem .95rem;
  border: 1px solid rgba(255,255,255,.42);
  background: rgba(0,0,0,.20);
  display: inline-block;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; color: var(--accent); }
a:focus-visible { outline: none; box-shadow: var(--focus); outline-offset: 2px; }

/* Button variants */
.btn, .cta {
  background: rgba(14, 170, 160, 0.25);
  border-color: rgba(14, 170, 160, 0.6);
  color: #eaffff;
}
.btn:hover, .cta:hover { transform: translateY(-1px); background: rgba(14, 170, 160, 0.42); }
.btn:active, .cta:active { transform: translateY(0); }

.btn.outline, .cta.outline {
  background: transparent;
  border-color: rgba(46,223,193,.75);
  color: #eaffff;
}
.btn.primary, .cta.primary { background: rgba(32,227,192,.9); border-color: rgba(32,227,192,.95); color: #04140f; }
.btn:focus-visible, .cta:focus-visible { outline: none; box-shadow: var(--focus); outline-offset: 0; }

/* Lists & typography helpers */
ul, li { margin: 0 0 0.5rem 1.1rem; padding: 0; }
li { margin: .25rem 0; }
blockquote {
  margin: .75rem 0; padding: .75rem 1rem; border-left: 4px solid rgba(46,223,193,.75);
  background: rgba(0,0,0,.18);
  border-radius: 8px;
}
p { color: #eef4ff; }

/* Product/ad blocks in footer */
footer { padding: 2rem 1rem; }
.product-ad,
.sponsored-page {
  display: flex; align-items: center; justify-content: center;
  padding: 0.75rem; border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
footer p { margin: .5rem 0 0; text-align: center; color: var(--muted); }
footer > section { min-width: 0; }

footer .product-ad a, footer .sponsored-page a {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--text);
  padding: .5rem 1rem;
}
footer .product-ad p, footer .sponsored-page p {
  margin: 0; font-weight: 600;
}
footer .product-ad { grid-column: span 1; }
footer .sponsored-page { grid-column: span 1; }

/* Simple responsive grid for potential utilities */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

/* Print readability */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: transparent; box-shadow: none; border: none; }
  a { text-decoration: underline; color: #000; }
}
 
/* Reduced motion policy for interactive cues only when allowed */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}