/* Section: Base tokens */
:root{
  --bg: #0b0b0e;
  --bg-2: #141518;
  --text: #f5f3ee;
  --muted: #b8b8b8;
  --accent: #d4af37;
  --accent-2: #8a8a8a;
  --card: rgba(255,255,255,0.08);
  --card-2: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 6px 20px rgba(0,0,0,.35);
  --radius: 14px;
}

/* Section: Global primitives (mobile-first) */
html, body { height: 100%; }
html { color-scheme: dark; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
html, body { margin: 0; padding: 0; }
* { box-sizing: border-box; }

/* Section: Layered background (gradient + subtle scanlines) */
body {
  min-height: 100dvh;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(20,20,20,.95) 0%, rgba(15,15,15,.95) 60%, rgba(20,20,20,.95) 100%),
    radial-gradient(circle at 10% -5%, rgba(212,175,55,.12), transparent 25%),
    radial-gradient(circle at 80% 20%, rgba(212,175,55,.08), transparent 20%);
  background-blend-mode: normal, overlay, overlay;
  position: relative;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* subtle gold beams hint + scanlines */
  background-image:
    radial-gradient( circle at 20% 0%, rgba(212,175,55,.12) 0 20%, transparent 22% ),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: .85;
  animation: drift 20s linear infinite;
}
@keyframes drift{ from{ transform: translateX(0); } to{ transform: translateX(-6px); } }

/* Section: Layout primitives */
.container{ width: 100%; max-width: clamp(720px, 90vw, 1120px); margin-inline: auto; padding-inline: 1rem; }

/* Section: Structural elements (basic reset for guaranteed visuals) */
header, nav, main, article, aside, footer { display: block; }
header { padding: 2rem 0 1rem; position: relative; z-index: 1; }
main { padding: 0 0 2rem; }
footer { padding: 1.25rem 0; }

/* Section: Glassy panels (fallback included) */
.card, .image-frame, .content, .product-ad { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 1rem; }

/* Backdrop-filter fallback (no blur) */
@supports not (backdrop-filter: blur(12px)) {
  .card, .image-frame, .content, .product-ad { background: rgba(255,255,255,.16); }
}

/* Section: Hero / content layout */
.header-hero { padding: 1rem; border-radius: var(--radius); background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.25); display: grid; gap: .75rem; }
header h1 { font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.05; margin: 0; font-weight: 800; letter-spacing: .2px; color: #fffbe5; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
header .meta { color: var(--muted); font-size: 0.92rem; }

/* Section: Content typography (system UI, fluid sizes) */
article { display: block; padding: 0; }
.content h2, .content h3 { color: #fff; margin: .5rem 0 0.25rem; }
h1, h2, h3 { font-weight: 700; letter-spacing: .2px; }
p { margin: .75rem 0; color: var(--text); font-size: clamp(0.95rem, 2vw, 1.125rem); line-height: 1.6; }
blockquote { border-left: 4px solid var(--accent); margin: .75rem 0; padding: .25rem 1rem; color: #f3e7c7; background: rgba(212,175,55,.15); border-radius: 6px; }

/* Section: Image frame handling */
.image-frame { width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 6px 18px rgba(0,0,0,.35); margin: .75rem 0; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Support legacy featured image container (also improves visuals) */
.featured-image{ width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 6px 18px rgba(0,0,0,.35); }

/* Section: Utility grid and cards (responsive utilities) */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Section: Card / tag utilities (WCAG-friendly) */
.card { padding: 1rem; }
.tag{ display:inline-block; padding:.25rem .5rem; border-radius:999px; font-size:.75rem; text-transform: uppercase; letter-spacing:.4px; background: rgba(212,175,55,.25); border: 1px solid rgba(212,175,55,.6); color: #ffe8a3; }

/* Section: Navigation/link/button styles (high contrast focus) */
a, button, .btn, .cta { color: #fff; text-decoration: none; outline: none; border: none; cursor: pointer; }
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent); }
button, .btn, .cta { display: inline-block; padding: .75rem 1rem; border-radius: 10px; font-weight: 600; border: 1px solid rgba(212,175,55,.6); background: linear-gradient(#d4af37, #b0851f); color: #111; transition: transform .15s ease, box-shadow .2s ease; }
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.25); }
button:focus-visible, .btn:focus-visible, .cta:focus-visible, a:focus-visible { outline: 3px solid #ffe082; outline-offset: 2px; border-radius: 8px; }

/* Primary/secondary variants (compact, accessible) */
.btn.primary, .cta.primary { background: linear-gradient(#ffd767, #d5a726); color: #1a1a1a; }
.btn.outline, .cta.outline { background: transparent; color: var(--text); border: 1px solid var(--accent); }

/* Section: Lists and navigation defaults */
ul { margin: 0 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* Section: Typography helpers for print */
@media print{
  body{ background: #fff; color: #000; }
  a{ text-decoration: underline; }
  .card, .image-frame{ background: #fff; border: 1px solid #ddd; }
}

/* Section: Reduced motion preference */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}

/* Section: Structural wrappers for the page (ensuring correct stacking) */
header, main, footer { position: relative; z-index: 1; }

/* Section: Minor layout helpers (centering content) */
.main-wrap { display: block; margin: 0 auto; max-width: clamp(700px, 85vw, 1100px); padding: 0 1rem; }

/* Section: Ensure responsive typography across components that reference .content */
.content { color: var(--text); }

/* Section: Footer product ad styling (within .product-ad) */
.product-ad { display: grid; gap: .5rem; text-align: left; }
.product-ad h3 { margin: 0; font-size: 1.1rem; }
.product-ad a { display: inline-block; padding: .5rem .75rem; border-radius: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); color: #fff; text-decoration: none; }
.product-ad a:hover { text-decoration: underline; }

/* Section: Accessibility helpers for high-contrast text over glass */
:focus-visible{ outline: 3px solid #ffd36e; outline-offset: 2px; border-radius: 6px; }

/* Utility: ensure the containers scale nicely on tiny viewports */
@media (max-width: 520px){
  header{ padding: 1.25rem 0; }
  .image-frame{ border-radius: 12px; }
}
