/* Base: tokenized palette & global helpers */
:root {
  --bg: #0a0a0a;               /* deep space */
  --bg-2: #0f1115;             /* secondary dark for depth */
  --text: #eaffff;              /* high-contrast text on glass */
  --muted: #a6b4c2;             /* secondary text */
  --accent: #d6a700;            /* mustard/yellow accent */
  --accent-2: #2bd6c6;           /* turquoise/cyan accent */
  --surface: rgba(255,255,255,.08);      /* frosted glass base */
  --surface-2: rgba(255,255,255,.14);    /* stronger glass layer */
  --stroke: rgba(255,255,255,.28);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --ring: 0 0 0 3px rgba(43,214,198,.55); /* focus ring */

  --radius: 12px;
  --maxw: clamp(640px, 85vw, 1200px);
}

/* Reusable helpers */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Layered background: gradient + subtle scanlines + faint glow sparks */
  background:
    radial-gradient(circle at 15% 0%, rgba(43,214,198,.08) 0 40%, transparent 40%),
    linear-gradient(135deg, rgba(0,0,0,.25), rgba(0,0,0,.55) 60%, rgba(0,0,0,.35)),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 2px, transparent 2px 4px),
    radial-gradient(circle at 80% 20%, rgba(214,166,0,.12), transparent 40%);
  background-blend-mode: overlay;
  min-height: 100%;
  padding: 1rem;
  overflow-x: hidden;
}

/* Layout containers (mobile-first) */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1rem;
}

header, main, footer, aside, nav, article {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0.75rem auto;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: saturate(1.2);
  backdrop-filter: saturate(1.2);
  /* Fallback for no backdrop-filter: tighten opacity */
  background-color: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.25);
  color: var(--text);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside, nav, article {
    background: rgba(255,255,255,.14);
  }
}

/* Header / hero tuning */
header h1 {
  font-family: inherit;
  font-size: clamp(1.75rem, 2.8vw + 1rem, 3.25rem);
  line-height: 1.15;
  margin: 0 0 .25rem;
  color: #e8fff8;
}
header .meta {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.8rem, 1.6vw, 0.95rem);
  letter-spacing: .2px;
  opacity: .95;
}

/* Main typography and content area */
main { display: block; }
article { max-width: var(--maxw); margin: 0 auto; }
article p { color: #eafaff; margin: .75rem 0; }
article h2 {
  font-size: clamp(1.15rem, 2vw + .5rem, 1.6rem);
  margin: .75rem 0 0.4rem;
  color: #eaffff;
}
article ol, article ul { padding-left: 1.25rem; margin: .5rem 0 1rem; }
article li { margin: .35rem 0; }

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

/* Content helpers (even if not in DOM, satisfy selectors) */
.content { padding: .5rem; }

/* Product ad / footer panels (glass panels) */
.product-ad, .sponsored-page {
  display: inline-block;
  padding: .75rem 1rem;
  border-radius: 10px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.25);
  text-align: center;
  min-width: 180px;
  margin: .25rem;
}
.product-ad a, .sponsored-page a {
  color: #d9fff2;
  text-decoration: none;
  font-weight: 600;
}
.product-ad a:focus-visible, .sponsored-page a:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 8px;
}
footer p {
  margin: .5rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}

/* Interactive controls: a, button, .btn, .cta */
a, button, .btn, .cta {
  font: inherit;
  color: #eaffff;
  text-decoration: none;
}
a:hover, a:focus, a:focus-visible {
  text-decoration: underline;
  outline: none;
}
button, .btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5ch;
  padding: .6rem .95rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  color: #eaffff;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn--solid {
  background: var(--accent);
  border-color: rgba(0,0,0,.15);
  color: #1b0e00;
  font-weight: 700;
}
.btn--solid:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn--outline {
  background: transparent;
  border-color: rgba(43,214,198,.65);
  color: #d7fff9;
}
.btn--outline:hover { background: rgba(43,214,198,.15); }
.cta { padding-inline: 1rem; }

/* Focus states for accessibility (keyboard) */
:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 8px;
  outline-offset: 2px;
}

/* Utility grid / cards (responsive) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: .9rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(43,214,198,.25);
  color: #d9fff2;
  border: 1px solid rgba(43,214,198,.55);
}

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, footer { display: none; }
  article { margin: 0; border: none; background: transparent; padding: 0; }
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
}