/* Theme Tokens */
:root{
  --bg: #0a0a0a;
  --bg-2: #141414;
  --text: #f5eecf;
  --muted: #d9c78a;
  --accent: #f7d55a;    /* pastel yellow/gold */
  --accent-2: #e6b84a;  /* secondary gold hue */
  --panel: rgba(255, 238, 170, 0.16);
  --panel-strong: rgba(255, 238, 170, 0.28);
  --border: rgba(255, 230, 170, 0.6);
  --shadow: 0 8px 24px rgba(0,0,0,0.28);
  --focus: #ffffff;
}

/* 1) Base & Layered Background (gradient + subtle scanlines) */
html, body { height: 100%; }
html { font-size: 16px; }
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans";
  line-height: 1.5;
  background:
    linear-gradient(135deg, rgba(246, 214, 110, 0.12), rgba(246, 214, 110, 0.06) 60%, rgba(246, 214, 110, 0.12)),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* 3) Glass panels (with fallback) */
.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .glass { background: rgba(20,20,20,0.72); border-color: rgba(255,230,170,0.6); }
}

/* 4) Global element styling per required selectors */
html, body, header, nav, main, article, footer, aside { /* presentational anchors; no extra rules needed here beyond defaults */ }

.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: optimizeQuality;
  filter: saturate(1.05);
}

/* .content (if used) defaults */
.content { padding: 1rem; }

/* .product-ad placement cards */
.product-ad {
  display: block;
  margin: 0.75rem 0;
}
.product-ad a {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,230,170,0.6);
  background: rgba(0,0,0,0.25);
  transition: transform .15s ease, background .2s ease;
}
.product-ad a:hover { background: rgba(0,0,0,0.35); transform: translateY(-1px); text-decoration: underline; text-underline-offset: 3px; }

/* 5) Typography & components */
h1, h2, h3 { margin: 0 0 .5rem 0; color: var(--text); }
h1 {
  font-size: clamp(1.8rem, 2.8vw + 1rem, 3rem);
  line-height: 1.15;
}
p { margin: 0 0 1rem 0; color: var(--text); opacity: 0.95; }

/* Links & interactive elements */
a, button, .btn, .cta {
  font-family: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  outline: none;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 6px;
}
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Buttons (solid + outline variants) */
.btn {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,230,170,0.9);
  background: linear-gradient(to bottom right, rgba(247,213,90,0.95), rgba(230, 180, 60, 0.95));
  color: #1a1400;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255,255,255,.25);
  transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(to bottom right, var(--accent), var(--accent-2)); border-color: rgba(255, 210, 90, 0.9); color: #1a1400; }
.btn.outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--text);
}
.btn.cta { font-size: 1rem; }

/* Glass blocks for header / sections */
header, main, footer { width: 100%; }
header { padding: clamp(1rem, 4vw, 2rem); text-align: center; }
header h1 { font-weight: 700; letter-spacing: .2px; color: var(--text); }
nav { display: flex; justify-content: center; gap: .5rem; padding-top: .25rem; }

/* 6) Layout helpers */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(20,20,20,0.22);
  border: 1px solid rgba(255,230,170,0.35);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.card h3 { margin-top: 0; font-size: 1.05rem; }

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

/* 8) Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}
