:root {
  --bg: #0b0a07;
  --bg-2: #1a1410;
  --text: #ffffff;
  --muted: #cfc8bd;
  --accent: #e8d6bd;
  --accent-2: #ffffff;
  --card: rgba(255, 255, 255, 0.12);
  --card-border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 24px rgba(0,0,0,0.4);
  --focus: 3px solid #ffffff;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

html { font-size: 16px; }

/* Mobile-first base typography */
body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.6;
  background: linear-gradient(135deg, rgba(234, 214, 184, 0.15) 0%, rgba(210, 184, 136, 0.08) 60%, rgba(234, 214, 184, 0.15) 100%), var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: clip;
}

/* Subtle scanline/noise overlay (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.04) 0px,
    rgba(255, 255, 255, 0.04) 1px,
    transparent 1px,
    transparent 2px
  );
  mix-blend-mode: overlay;
  opacity: 0.25;
}

/* Page structure layering to keep content readable above background */
header, main, article, footer, aside {
  position: relative;
  z-index: 1;
}

/* Layout utilities / tokens */
.container {
  width: 100%;
  max-width: clamp(720px, 90vw, 1100px);
  padding-inline: 1rem;
  margin-inline: auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* Fallback when backdrop-filter isn't supported */
  background-clip: padding-box;
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .card { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}
.card.no-blur { backdrop-filter: none; }

/* Glass panel aesthetics with accessible contrast */
.glass {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.glass-strong {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.38);
}
.hero-shade {
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* Header / Hero
   Centered, with strong typographic hierarchy
*/
header {
  padding: 2rem 0 1rem;
  text-align: center;
}
header h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.5vw, 3.5rem);
  line-height: 1.04;
  margin: 0 0 0.5rem;
  letter-spacing: .2px;
  text-shadow: 0 2px 14px rgba(255,255,255,0.25);
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.8rem, 0.5vw + 0.6rem, 1rem);
  margin-bottom: 0.75rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.08);
  transition: transform .12s ease, background .2s ease;
}
nav a:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }
nav a:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* Main content styling */
main { padding: 1rem 0 2rem; }
article { display: block; }

/* Image frame utilities
   - aspect-ratio, object-fit, subtle glow/border
*/
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 6px 22px rgba(0,0,0,0.35);
  display: block;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}
.featured-image { margin: 1rem 0 1.25rem; }

/* Content text and typography
   - fluid typographic scale via clamp
*/
.content { padding: 0; }

/* Headings and body text inside article */
article h2 {
  font-size: clamp(1.25rem, 0.9rem + 2vw, 2.25rem);
  margin: 1.25rem 0 0.5rem;
}
article h3 {
  font-size: clamp(1rem, 0.8vw + 0.9rem, 1.25rem);
  margin: 0.75rem 0;
}
article p { margin: 0.75rem 0; color: #f5f1e7; }
article blockquote {
  margin: 1rem 0;
  padding: .75rem 1rem;
  border-left: 3px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
}
article ul, article ol { margin: 0.75rem 0 1rem 1.25rem; padding: 0; }

/* Lists customization */
ul, li { color: #f6f2ea; }
li { margin: .25rem 0; }

/* Utility tag pill */
.tag {
  display: inline-block;
  padding: .15em .45em;
  font-size: .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.14);
  color: #fff;
  margin-right: .25em;
}
@media (prefers-color-scheme: light) {
  .tag { color: #0b0a07; background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.15); }
}

/* Footer / ads with glass panels */
footer { padding: 1.5rem 0 2rem; text-align: center; }
.product-ad, .sponsored-page {
  display: inline-block;
  padding: 0.6rem 0.9rem;
  margin: .25rem;
  min-width: max-content;
}
.product-ad a, .sponsored-page a {
  color: var(--text);
  text-decoration: none;
}
.product-ad { border-radius: 10px; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.25); }

/* Buttons and links styling (solid and outline variants) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 0.6rem 1rem;
  display: inline-block;
  background: rgba(255,255,255,0.14);
  cursor: pointer;
  transition: transform .12s ease, background .2s ease, border-color .2s ease;
}
.btn { font-weight: 600; }
.btn:hover { background: rgba(255,255,255,0.22); transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.btn--solid {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.4);
}
.btn--outline {
  background: transparent;
  border-color: rgba(255,255,255,0.7);
}
.cta { padding: .65rem 1rem; }

/* Links interactions for accessibility */
a:hover, a:focus { text-decoration: underline; outline: none; }

/* Print styles (basic readability) */
@media print {
  body { background: white; color: #000; }
  a { text-decoration: underline; }
}
  
/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
  
/* Responsive adjustments */
@media (min-width: 720px) {
  .container { padding-inline: 0; }
  header { padding: 2.5rem 0 1.5rem; }
}
