/* Theme tokens */
:root {
  --bg: #120a1c;
  --bg-2: #1a0a2a;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --text: #e9dbc2;
  --muted: #c6b59a;
  --accent: #e8d4af;  /* beige */
  --accent-2: #c7b089;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 26px rgba(0, 0, 0, 0.25);
  --outline: rgba(255, 255, 255, 0.6);
  --radius: 12px;
}

/* Base / Layout */
html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  /* Layered background: gradient + scanlines + soft noise hints */
  background:
    linear-gradient(135deg, rgba(110,0,120,.95) 0%, rgba(12,0,40,.95) 60%, rgba(110,0,120,.95) 100%),
    linear-gradient(to bottom right, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, rgba(0,0,0,0) 1px 2px);
  background-blend-mode: overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  line-height: 1.55;
  overflow-x: hidden;
}

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

/* Glass panel helper (with fallback) */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(255,255,255,0.20); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* Core components */
header {
  padding: 2rem 1rem;
  text-align: center;
  display: grid;
  gap: 0.5rem;
  align-items: center;
  justify-items: center;
  position: relative;
}
header h1 {
  font-size: clamp(1.8rem, 1.2rem + 3vw, 3.2rem);
  line-height: 1.12;
  margin: 0;
  font-weight: 800;
  letter-spacing: .2px;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
header .meta {
  font-size: clamp(0.8rem, 0.8vw, 0.95rem);
  color: var(--muted);
  letter-spacing: .3px;
}
main {
  padding: 0 1rem 3rem;
}
.container { width: 100%; max-width: clamp(720px, 92vw, 1100px); margin-inline: auto; }

/* Featured image frame */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
  margin: 1rem 0 1.25rem;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.02);
  transform: translateZ(0); /* GPU hint */
}
.featured-image { display: block; }

/* Content areas */
.content { color: var(--text); font-size: clamp(0.95rem, 0.9vw + 0.6rem, 1.05rem); line-height: 1.6; }
article { margin: 0 auto 1.25rem; padding: 0; }
article h2, article h3 { color: #fff; margin: .75rem 0 .5rem; font-weight: 700; }
article h2 { font-size: clamp(1.4rem, 0.9vw + 1.2rem, 2.4rem); letter-spacing: .2px; }
article h3 { font-size: clamp(1.05rem, 0.8vw + 0.95rem, 1.4rem); }
article p { margin: .5rem 0 1rem; }
article ul { padding-left: 1.25rem; margin: .25rem 0 1rem; }
article li { margin: .25rem 0; }

/* Link and CTA styling */
a, button, .btn, .cta {
  text-decoration: none;
  color: var(--text);
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 3px; outline: 0; }
button { display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; cursor: pointer; padding: 0; }

/* Button variants */
.btn {
  display: inline-flex;
  padding: 0.7rem 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.14);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
}
.btn + .btn { margin-left: .5rem; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(135deg, rgba(232,196,113,.95), rgba(200,160,90,.95)); border-color: rgba(0,0,0,.15); color: #1b120a; }
.btn.outline {
  background: transparent;
  border-color: rgba(255,255,255,.65);
  color: var(--text);
}
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Utility / common elements */
ul, li { margin: 0; padding: 0; }
ul { list-style: disc; padding-left: 1.25rem; }
li { line-height: 1.6; }

/* Card / grid helpers (utility classes) */
.grid { display: grid; gap: 1rem; }
.card { padding: 1rem; border-radius: var(--radius); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); box-shadow: var(--shadow); }

/* Tag helper */
.tag {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .25rem .5rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700;
  color: #0a0612;
  background: linear-gradient(135deg, #f2e0bf, #e5d2a1);
  border: 1px solid rgba(0,0,0,.15);
}

/* Footer / product ad */
.product-ad {
  margin: 1rem 0 0;
  padding: 1rem;
}
.product-ad h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.product-ad a { display: inline-flex; align-items: center; padding: .6rem 1rem; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); }
.product-ad a p { margin: 0; }

/* Footer typography / layout tweaks */
footer { padding: 1.5rem 1rem; text-align: center; color: var(--muted); }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, footer { display: block; }
  .glass { background: #fff; border: 1px solid #ddd; box-shadow: none; }
}
