/* Section: Tokens & Base */
:root{
  --bg: #0b0b0e;
  --bg-2: #141018;
  --text: #f7f2e6;
  --muted: #e9c8a3;
  --accent: #d4af37;       /* gold */
  --accent-2: #f6c7a3;     /* peach */
  --glass: rgba(255,255,255,.08);
  --glass-border: rgba(255,255,255,.25);
  --shadow: 0 8px 28px rgba(0,0,0,.28);
  --shadow-soft: 0 6px 18px rgba(0,0,0,.22);
  --radius: 14px;
  --focus: 2px solid color-m-mix(in srgb, var(--accent) 60%, black);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: #0b0b0e;
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
  /* Layered background: gradient + subtle glow + scanlines (pure CSS) */
  background-image:
    radial-gradient(circle at 20% -10%, rgba(212,175,55,.18), transparent 40%),
    linear-gradient(135deg, rgba(12,12,12,.95), rgba(10,10,14,.95)),
    linear-gradient(to bottom, rgba(0,0,0,.0), rgba(0,0,0,.25));
  background-blend-mode: normal, normal, overlay;
}
body::before, body::after {
  content: "";
  position: fixed;
  left: 0; right: 0;
  top: 0; bottom: 0;
  pointer-events: none;
}
body::before {
  /* Subtle glow layer against the gold/peach palette */
  background: radial-gradient(circle at 25% 0%, rgba(212,175,55,.18), transparent 40%),
              radial-gradient(circle at 75% 20%, rgba(246,199,163,.12), transparent 40%);
  z-index: -2;
  filter: saturate(1.05);
}
body::after {
  /* Scanline effect (pure CSS) */
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: .25;
  z-index: -1;
}

/* Section: Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}

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

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .card { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; animation: none; }
}

.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  background: #111;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}

.content { padding: 0.75rem 0; color: var(--text); }

/* Section: Typography & hierarchy */
h1, h2, h3 { margin: .25rem 0; line-height: 1.15; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(1.75rem, 2vw + 1rem, 3.25rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 1vw + .8rem, 2rem); }
h3 { font-size: clamp(1.1rem, .8vw + .8rem, 1.5rem); }
p { color: var(--text); margin: 0 0 1rem; font-size: clamp(0.95rem, 0.9vw + .8rem, 1.05rem); }

ul { padding-left: 1.25rem; margin: .25rem 0 1rem; }
li { margin: .25rem 0; }

/* Section: Links & controls (focusable) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
a:hover { text-decoration: underline; }

/* Buttons & CTAs (solid & outline variants) */
.btn {
  display: inline-block;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,.66);
  background: linear-gradient(to bottom right, rgba(212,175,55,.95), rgba(212,175,55,.75));
  color: #1a130a;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  text-shadow: 0 1px 0 rgba(255,255,255,.25);
  box-shadow: 0 4px 12px rgba(212,175,55,.55);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.25);
}
.cta { display: inline-block; }

/* Section: Nav, header, main, aside, article, footer */
header, main, aside, footer {
  display: block;
  width: 100%;
}
header {
  padding: 1rem;
  margin: 0 auto 1rem;
}
header, footer {
  background: rgba(0,0,0,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: calc(var(--radius) + 2px);
  padding: 1rem;
  box-shadow: var(--shadow);
}
nav { margin-top: .5rem; }

/* Specific structural styling to ensure contrast */
header h1 { margin: .25rem 0 .25rem; font-size: clamp(1.6rem, 1.5vw + 1rem, 2.6rem); }
header .meta { color: var(--muted); font-size: .9rem; margin-bottom: .25rem; }

/* Main article styling */
main { padding: 0 0 1rem; }
article { padding: 0; }

/* Featured image wrapper (targeting .image-frame if present) */
.featured-image { width: 100%; margin: 0 0 .75rem; }
.featured-image img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); }

/* Section: Utility patterns for content blocks used by the page */
.product-ad {
  display: block;
  text-align: center;
  padding: .75rem;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
}
.product-ad a { color: var(--text); }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}
@media (max-width: 720px) {
  header { padding: .75rem; }
  .card { padding: .75rem; }
  .btn { width: auto; padding: .65rem 1rem; }
}

/* Section: Accessibility improvements for contrast on glass surfaces */
@media (prefers-contrast: more) {
  :root { --glass: rgba(255,255,255,.12); }
}
