/* Base & Token Palette */
:root{
  --bg: #0a0a0a;
  --bg-2: #141010;
  --text: #f8f1e1;
  --muted: #c9bba0;
  --accent: #e6d3b0;
  --accent-2: #f6e6c9;
  --glass: rgba(255,255,255,0.08);
  --glass-strong: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 8px 20px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html, body { height: auto; }
html, body { margin: 0; padding: 0; }

/* Layered, neon-beige matrix-inspired background (mobile-first) */
body {
  background-color: #000;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
  /* Gradient + beige scanlines + subtle noise-esque texture */
  background-image:
    linear-gradient(135deg, #0a0a0a 0%, #0b0b0b 60%, #171210 100%),
    repeating-linear-gradient(to bottom, rgba(230,210,170,.08) 0 2px, rgba(0,0,0,0) 2px 4px),
    radial-gradient(circle at 15% 0%, rgba(0,0,0,.08), transparent 40%);
  background-size: cover;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}
html { font-size: 16px; }

/* Layout helpers (mobile-first) */
.container { width: min(92%, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Glass panel (fallback-safe) */
.card, .content, header, main, article, footer, aside, .product-ad {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.75rem;
}

/* Header & navigation */
header {
  display: block;
  text-align: center;
  padding: 1rem;
  margin: 1rem auto;
  max-width: clamp(320px, 92vw, 1100px);
  background: rgba(12,9,8,.34);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 14px;
}
header h1 { margin: .25rem 0 .4rem; font-size: clamp(1.4rem, 4vw, 2rem); color: var(--text); }
header .meta { font-size: .95rem; color: var(--muted); }

/* Nav links */
nav { margin-top: .25rem; }
nav a {
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  padding: .4rem .7rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.04);
}
nav a:hover { text-decoration: underline; background: rgba(255,255,255,.08); }

/* Main content */
main { padding: .5rem 0; display:block; }
article { padding: 0; max-width: clamp(320px, 92vw, 1100px); margin: 0 auto; }

/* Image framing (supporting selectors) */
.image-frame, .featured-image {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.image-frame img, .featured-image img {
  width: 100%; height: 100%; display: block; object-fit: cover;
}
.image-frame { aspect-ratio: 16 / 9; }

/* Article typography & structure */
h2 { font-size: clamp(1.4rem, 3.8vw, 2rem); margin: .75rem 0 .25rem; color: var(--text); }
h3 { font-size: clamp(1.0rem, 2.8vw, 1.35rem); margin: .75rem 0 .25rem; color: var(--text); }
p { color: #e9e1d3; margin: .5rem 0; }
em { font-style: italic; color: #f9ecd4; }

/* Lists */
ul { padding-left: 1.25em; margin: .25rem 0; color: #e9e1d3; }
li { margin: .25rem 0; }

/* Blockquote */
blockquote {
  margin: .75rem 0; padding: .5rem 1rem;
  border-left: 3px solid var(--accent);
  color: #f3efe0;
  background: rgba(255,255,255,.04);
  border-radius: 6px;
}

/* Footer / product ads */
footer { margin: 1rem auto 2rem; padding: .5rem; display: grid; grid-template-columns: 1fr; gap: .75rem; }
.product-ad, .sponsored-page { text-align: center; text-decoration: none; }
.product-ad p, .sponsored-page p { margin: .25rem 0; font-weight: 600; color: var(--text); }

/* Utility: common interactive controls */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  padding: .55rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.4);
  background: linear-gradient(#e8d5a9, #d6c08c);
  cursor: pointer;
}
a:hover, button:hover, .btn:hover, .cta:hover { filter: brightness(1.05); text-decoration: underline; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(246,214,120,.6);
  outline-offset: 2px;
}
.btn { padding: .6rem 1.05rem; }

/* Print-safe readability */
@media print {
  body { background: #fff; color: #000; }
  header, main, article, footer { background: none; border: none; box-shadow: none; }
  a { text-decoration: underline; color: #00f; }
}

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