/* Section: Base tokens */
:root {
  --bg: #0a0f2a;           /* indigo base */
  --bg-2: #0a0a1a;
  --text: #eaf0ff;
  --muted: #b9a8d9;
  --accent: #b76e4f;        /* rose gold */
  --accent-2: #e6c6b8;      /* lighter rose */
  --glass: rgba(255,255,255,0.08);
  --glass-strong: rgba(255,255,255,0.18);
  --border: rgba(255,255,255,0.25);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --radius: 14px;
  --focus: #ffffff;
}

/* Section: Global resets & responsive typography */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(15,0,60,.95) 0%, rgba(7,9,30,.95) 60%), var(--bg);
  min-height: 100%;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Subtle CSS noise/scanlines (pure CSS) */
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 12px 12px, 12px 12px;
  mix-blend-mode: overlay;
  opacity: .6;
}
img { display: block; max-width: 100%; height: auto; }

/* Section: Layout helpers */
.container { width: min(1100px, 92%); margin: 0 auto; }

.grid { display: grid; gap: 1rem; }

/* Section: Structural elements styling (WCAG alignment) */
html, body, header, nav, main, article, aside, footer { scroll-margin: 2rem; }

/* Glass panels (fallbacks included) */
header, main, aside, footer {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

/* Section: Header / intro */
header {
  text-align: center;
  padding: 2rem 1rem;
}
header h1 {
  font-size: clamp(1.8rem, 4vw + 0.5rem, 3.2rem);
  line-height: 1.08;
  margin: .25rem 0 0.25rem;
  letter-spacing: .2px;
}
header .meta {
  color: var(--muted);
  font-size: clamp(.9rem, 0.6vw + .9rem, 1.05rem);
  margin: .25rem 0 0;
}
nav { margin-top: .5rem; }
nav a {
  display: inline-block;
  padding: .5rem .95rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.15);
  color: #fff;
  text-decoration: none;
  font-size: .95rem;
  transition: transform .15s ease, background .2s ease;
}
nav a:hover { background: rgba(255,255,255,.18); }
nav a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  background: rgba(255,255,255,.22);
}

/* Section: Main content & article styling (glass content) */
main { padding: 1rem 0 2rem; }
article {
  max-width: 900px;
  margin: 1.5rem auto;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(8px);
  animation: fadeIn 520ms ease forwards;
}
@supports (backdrop-filter: blur(10px)) {
  article { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  article { animation: none; }
}
.featured-image, .image-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  margin: 1rem auto;
  width: min(100%, 860px);
  aspect-ratio: 16 / 9;
  display: block;
}
.featured-image img, .image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Typography helpers */
h2 { font-size: clamp(1.6rem, 2.8vw + .6rem, 2.4rem); margin: .75rem 0; color: var(--text); }
h3 { font-size: clamp(1.2rem, 2vw + .5rem, 1.5rem); margin: .8rem 0; color: var(--text); }
p { margin: .4rem 0 1rem; font-size: clamp(.95rem, 1vw + .2rem, 1.05rem); color: #eaf0ff; }
ul, ol { margin: .25rem 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* Blockquote styling */
blockquote {
  margin: .5rem 0 1rem;
  padding: .6rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(183,110,79,.15);
  border-radius: 6px;
  color: #fff;
}

/* Section: Inline actions & links */
a { color: #dfe6ff; text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; outline: none; }
.btn, .cta, a.btn {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  text-decoration: none;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover, .cta:hover, a.btn:hover { transform: translateY(-1px); background: #a85b3f; }
.btn:active, .cta:active, a.btn:active { transform: scale(.98); }

/* Outline variants (accessible contrast) */
.btn.outline, a.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.6);
}
.btn.outline:hover { background: rgba(255,255,255,.12); }

/* Section: utility classes (layout helpers) */
.container { width: min(1100px, 92%); margin-inline: auto; }
.grid { display: grid; gap: 1rem; }
.card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: .75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(183,110,79,.25);
  color: #ffd8c8;
  border: 1px solid rgba(183,110,79,.5);
}

/* Section: Special footer panels (ads) */
footer .product-ad,
footer .sponsored-page {
  display: inline-block;
  padding: .6rem .9rem;
  border-radius: 8px;
  margin: .25rem;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.25);
}
footer p { margin: .5rem 0; }

/* Section: Images (fallback for no .image-frame support) */
@supports not (aspect-ratio: 16 / 9) {
  .featured-image, .image-frame { height: 240px; }
  .featured-image img, .image-frame img { height: 100%; width: auto; }
}

/* Section: Print styles */
@media print {
  body { background: white; color: black; }
  nav, header, footer { display: none; }
  article { background: white; border: none; padding: 0; border-radius: 0; }
}
