/* Base tokens */
:root{
  --bg: #0a0a0a;
  --bg-2: #1a130b;
  --text: #e6d9b8;        /* high-contrast light text on glass */
  --muted: #cdbf8e;
  --accent: #d4af37;      /* gold */
  --accent-2: #f0c060;     /* lighter gold for accents */
  --card: rgba(255,255,255,.08);
  --card-border: rgba(255,255,255,.25);
  --shadow: 0 8px 26px rgba(0,0,0,.28);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 0 0 0 3px rgba(212,175,55,.6);
  --font: ui-system, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
}

/* Reset & global typography (mobile-first) */
* { 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;
  min-height: 100dvh;
  color: var(--text);
  background: var(--bg);
  /* Layered background: gradient + subtle gold weave + scanlines */
  background-image:
    linear-gradient(135deg, rgba(10,8,8,.98) 0%, rgba(26,19,15,.98) 60%, rgba(10,8,8,.98) 100%),
    linear-gradient(transparent 0, transparent 60%, rgba(212,175,55,.15) 60%, rgba(212,175,55,.15) 100%),
    repeating-linear-gradient(to bottom, rgba(212,175,55,.08) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 15% 0%, rgba(255,247,210,.04), transparent 25%);
  background-blend-mode: normal, overlay, overlay, overlay;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
  position: relative;
}
body::before {
  /* extra subtle noise/texture without external images */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(transparent, transparent),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: .6;
}
* { box-sizing: border-box; }

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(680px, 85vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  box-shadow: var(--shadow);
  color: var(--text);
}
.tag {
  display: inline-block;
  padding: .15em .6em;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(212,175,55,.25);
  color: var(--text);
  border: 1px solid rgba(212,175,55,.45);
}

/* Glass panels (fallback provided) */
header, main, footer, aside, article {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 1rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
  color: var(--text);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside, article {
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.45);
  }
}

/* Header / hero typography */
header { margin: 1rem auto; padding: 1.25rem; text-align: center; }
header h1 {
  font-family: var(--font);
  font-size: clamp(1.75rem, 3vw + 1rem, 3.5rem);
  line-height: 1.04;
  margin: 0 0 .25rem;
  letter-spacing: .2px;
}
header .meta {
  font-size: clamp(.9rem, .4vw + .8rem, 1.05rem);
  color: var(--muted);
  margin: 0;
  opacity: .95;
}

/* Main content layout */
main { padding: 1rem; }
.featured-image { margin: 1rem auto 0; max-width: 900px; width: 100%; }
.image-frame, .image-frame img {
  display: block;
  width: 100%;
  height: auto;
}
.image-frame {
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transition: transform .25s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Article content tweaks */
article h1, article h2, article h3 {
  margin-top: 1rem;
  margin-bottom: .5rem;
  line-height: 1.15;
}
article p { margin: .5rem 0 1rem; font-size: clamp(1rem, .8vw + .9rem, 1.125rem); }
article ul { margin: .5rem 0 1rem 1.25rem; }
article li { margin: .25rem 0; }

/* Links & CTAs */
a, button, .btn, .cta {
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
a:hover, a:focus { text-decoration: underline; text-decoration-color: rgba(212,175,55,.75); }
a:focus-visible, button:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* Button variants (solid and outline) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.6);
  background: rgba(212,175,55,.25);
  color: #111;
  font-weight: 600;
  transition: transform .15s ease, background .2s ease;
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1a1a;
  border: 1px solid rgba(255,255,255,.8);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); outline-offset: 2px; }

/* Secondary outline button */
.btn.outline {
  background: transparent;
  border: 1px solid rgba(212,175,55,.9);
  color: var(--text);
}
.btn.outline:hover {
  background: rgba(212,175,55,.15);
}

/* Product ad area */
.product-ad {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .75rem;
}
.product-ad h3 { margin: 0; font-size: 1.05rem; }
.product-ad a { display: inline-block; padding: .5rem 0.75rem; border-radius: 999px; background: rgba(212,175,55,.25); border: 1px solid rgba(212,175,55,.65); color: var(--text); }

/* Typography system helpers */
h1, h2, h3 { color: var(--text); }
p { color: color-m-mix(in oklab, black 0%, white 100%); opacity: .95; }

/* Lists styling for clarity and contrast on glass */
ul { padding-left: 1.25rem; }
li { margin: .25rem 0; }

/* Utility: accessible focus on interactive elements within content */
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); }

/* Layout fine-tuning for sections */
header + main { margin-top: .5rem; }
footer { margin-top: 1rem; padding-top: .75rem; }

/* Print styles: readability without heavy visuals */
@media print {
  body::before { display: none; }
  body { background: white; 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; }
}