/* Theme & Tokens */
:root {
  --bg: #0a0a0f;
  --bg-2: #111129;
  --text: #e8e0ff;
  --muted: #c9c5e8;
  --accent: #d4af37;        /* gold */
  --accent-2: #b48aff;      /* lavender */
  --glass: rgba(255, 255, 255, 0.08);
  --glass-2: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 24px rgba(0,0,0,.28);
  --shadow-soft: 0 6px 16px rgba(0,0,0,.22);
  --focus-ring: 2px solid rgba(180, 140, 255, 0.9);
}

/* 1) Global resets & mobile-first foundations */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
body {
  margin: 0;
  color: var(--text);
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.6;
  background:
    linear-gradient(135deg, rgba(12,10,25,.95), rgba(12,10,25,.92) 60%, rgba(20,12,28,.95)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 70% -10%, rgba(176, 119, 255, .08), transparent 40%);
  background-attachment: fixed;
  color-scheme: dark;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }

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

/* 3) Structural elements styling (glass panels where relevant) */
header, nav, main, article, aside, footer { padding: 0; margin: 0; }
header { padding: 2rem 1rem 1rem; text-align: center; }
header h1 { font-size: clamp(1.6rem, 4vw + 0.5rem, 3rem); margin: 0.25rem 0 0.25rem; letter-spacing: .2px; }
header .meta { color: var(--muted); font-size: 0.9rem; }

/* 4) Glass panels with graceful fallbacks */
main { padding: 1rem 0; }
article {
  padding: 1.25rem;
  margin: 0.5rem auto;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
}
@supports not (backdrop-filter: blur(10px)) {
  article { backdrop-filter: none; background: rgba(255,255,255,.12); }
}
.image-frame, .featured-image {
  display: block;
  width: 100%; border-radius: 12px;
  overflow: hidden; border: 1px solid var(--border);
  background: rgba(255,255,255,.08);
  box-shadow: 0 6px 18px rgba(0,0,0,.25), inset 0 0 6px rgba(255,255,255,.15);
  margin: 0.75rem 0;
}
.image-frame { aspect-ratio: 16 / 9; }
.image-frame img, .featured-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
@media (min-width: 700px) {
  .image-frame { border-radius: 14px; }
}

/* 5) Content & typography inside article */
article h2 { font-size: clamp(1.4rem, 1.2vw + 1rem, 2rem); margin: .75rem 0 .25rem; color: #fff; }
article h3 { font-size: 1.05rem; margin: .6rem 0 .25rem; color: #fff; }
article p { color: rgba(232,226,255,.95); margin: .5rem 0; }
article ul { margin: .4rem 0 1rem 1.1rem; color: rgba(232,226,255,.95); }
article li { margin: .25rem 0; }

/* 6) Utilities & common components */
.content { padding: 0; }
.product-ad {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: var(--glass);
  border: 1px solid var(--border);
  margin: .5rem auto;
}
.product-ad h3 { margin: 0 0 .25rem; font-size: 1rem; }
.product-ad a { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 0; color: var(--text); text-decoration: none; }
.product-ad a p { margin: 0; }

/* 7) Buttons & links (solid + outline variants) */
.btn, .cta { display: inline-block; padding: .75rem 1.25rem; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.4); font-weight: 600; cursor: pointer;
  text-align: center; transition: transform .2s ease, box-shadow .2s ease;
  background: linear-gradient(135deg, rgba(212,175,55,.95), rgba(176,120,0,.95));
  color: #111;
}
.btn:hover, .cta:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.btn:active, .cta:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.btn--outline {
  background: transparent;
  border: 1px solid rgba(212,175,55,.95);
  color: var(--text);
}
a.btn, a.cta { display: inline-block; }

/* 8) Utility components: grids, cards, tags */
.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: .75rem;
  box-shadow: var(--shadow-soft);
}
.tag {
  display: inline-block;
  padding: .15em .5em;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(212,175,55,.25);
  color: #ffd;
  border: 1px solid rgba(255,255,255,.25);
}

/* 9) Layout helpers for page sections (nav placeholder, main grid if present) */
nav { display: none; }

/* 10) Print accessibility */
@media print {
  body { background: #fff; color: #000; }
  article { background: #fff; border: 0; box-shadow: none; }
  a, a:visited { text-decoration: underline; color: #000; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}