/* Base tokens */
:root {
  --bg: #1b120b;
  --bg-2: #2b140d;
  --sand: #d6b889;
  --sand-2: #c79f66;
  --text: #f5f0e6;
  --muted: #d6c8b7;
  --accent: #e2b85a;
  --accent-2: #a16a2b;
  --glass: rgba(255, 255, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.18);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  --link: #ffd9a7;
  --link-hover: #ffe5b9;
  --focus: #ffffff;
}

/* Layout & background (mobile-first) */
html, body {
  height: 100%;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
  background: #000;
  /* Layered background: gradient + brown data vortex hints + sand accents */
  background-image:
    radial-gradient(circle at 20% 0%, rgba(180,120,60,.25), transparent 20%),
    radial-gradient(circle at 85% 15%, rgba(120,60,20,.25), transparent 20%),
    conic-gradient(from 180deg at 50% 50%, rgba(80,40,12,.20), rgba(80,40,12,.0) 40%, rgba(80,40,12,.20) 60%, rgba(80,40,12,.0) 100%);
  background-blend-mode: overlay;
  background-size: cover;
}
body::after {
  /* subtle scanlines/noise over the page (pure CSS) */
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0) 50%, rgba(0,0,0,.06) 50%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  background-size: auto;
  mix-blend-mode: overlay;
  opacity: 0.65;
  z-index: 0;
}
body { z-index: 0; }

/* Helper containers */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding: 0 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@supports not (backdrop-filter: blur(8px)) {
  .card { background: rgba(255,255,255,.18); }
}
.tag {
  display: inline-block;
  padding: .28em .6em;
  border-radius: 999px;
  font-size: .75rem;
  color: #111;
  background: var(--sand);
  border: 1px solid rgba(0,0,0,.08);
}

/* Typography scale (fluid) */
h1, h2, h3 {
  line-height: 1.15;
  margin: 0.25rem 0;
}
h1 { font-size: clamp(1.8rem, 2.4vw + 1rem, 3rem); }
h2 { font-size: clamp(1.4rem, 1.6vw + 0.8rem, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1vw + 0.8rem, 1.5rem); }
p { margin: .5rem 0 1rem; }

/* Header / navigation */
header {
  padding: 1.25rem 1rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
header h1 {
  font-size: clamp(1.6rem, 2vw + 1rem, 2.75rem);
  margin: 0.25rem 0 0.25rem;
  letter-spacing: .2px;
}
header .meta {
  font-size: clamp(0.9rem, 0.8vw + 0.8rem, 1.05rem);
  color: var(--muted);
}
nav {
  margin-top: .75rem;
}
nav a {
  color: var(--link);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 6px;
}
nav a:hover, nav a:focus-visible {
  text-decoration: underline;
  outline: none;
  color: var(--link-hover);
}
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Hero-like article content */
main { padding: 1rem 0 2rem; }
article {
  display: block;
  margin: 0 auto;
  max-width: clamp(520px, 90vw, 900px);
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  margin: 0.75rem 0 1rem;
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.image-frame:hover img {
  transform: scale(1.02);
}

/* Content blocks & lists */
.content { padding: 0.25rem 0 0; }
ul { padding-left: 1.25rem; margin: .25rem 0 1rem; }
li { margin: .25rem 0; }

/* Footer / product ads */
footer {
  padding: 1rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
.product-ad, .sponsored-page {
  display: inline-block;
  margin: .25rem;
}
.product-ad a, .sponsored-page a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: .75rem 1rem;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
  transition: transform .2s ease, background-color .2s ease;
}
.product-ad a:hover, .sponsored-page a:hover,
.product-ad a:focus-visible, .sponsored-page a:focus-visible {
  background: rgba(255,255,255,.14);
  transform: translateY(-1px);
}
.product-ad a:hover { text-decoration: none; }
.product-ad p, .sponsored-page p { margin: 0; }

/* Form controls (baseline for potential inputs) */
input, select, textarea, button {
  font-family: inherit;
  font-size: 1rem;
}
button, .btn, .cta {
  border: 0;
  border-radius: 10px;
  padding: .65rem 1rem;
  background: var(--accent);
  color: #1a130d;
  font-weight: 600;
  display: inline-block;
}
button.secondary, .btn.outline, .cta.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
button:hover, .btn:hover, .cta:hover {
  filter: brightness(1.05);
}
button:active, .btn:active, .cta:active {
  transform: translateY(1px);
}
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  body::after { display: none; }
  .card { background: #fff; border: 1px solid #ccc; }
  a { text-decoration: underline; }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Load-time polish for the article (gentle fade-in) */
article { opacity: 0; animation: fadeIn 520ms ease forwards; animation-delay: 40ms; }
@media (prefers-reduced-motion: reduce) { article { animation: none; } }

/* Accessibility: ensure high contrast text over glass for body content inside cards */
.card, .container, header, main, article, footer {
  color: var(--text);
}