/* Base tokens */
:root {
  --bg: #0b0a1a;
  --bg-2: #2b1e65;
  --text: #f7f7fb;
  --muted: #cbd5e1;
  --accent: #d4a300;       /* mustard */
  --accent-2: #4f3bd8;      /* indigo */
  --card: rgba(18,12,40,.38);
  --border: rgba(255,255,255,.25);
  --glass: rgba(20,16,40,.38);
}

/* Section: Base & Theme */
html, body { height: 100%; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(20,12,60,.95) 0%, rgba(12,8,40,.95) 60%),
    radial-gradient(circle at 15% -10%, rgba(212,170,60,.25), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 2px, transparent 2px 4px);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
  opacity: .6;
}

/* Section: Layout helpers */
.container { width: min(92%, 1100px); margin-inline: auto; padding: 0 1rem; }

/* Section: Typography scale & helpers */
h1, h2, h3 { margin: 0 0 .5rem; color: var(--text); line-height: 1.15; }
h1 { font-size: clamp(1.8rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 700; }

/* Section: Glass surfaces */
.header-glass, .section-glass, .glass { background: rgba(13,12,40,.28); border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px; padding: .75rem; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
@supports not ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .glass, .section-glass { background: rgba(13,12,40,.6); }
}
.section-glass { padding: .75rem; }

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

/* Section: Core layout elements */
header, main, footer, aside { display: block; }
header { padding: 2rem 1rem; text-align: center; border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(13,12,40,.45); border-radius: 0 0 14px 14px; margin: 0; }
header h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); margin: .25rem 0 .25rem; }
header .meta { font-size: .85rem; color: var(--muted); margin-bottom: .25rem; }

/* Section: Main content grid & cards */
main { padding: 1rem; }
article { max-width: clamp(320px, 90vw, 1000px); margin-inline: auto; }
.featured-image { margin: 0 0 1rem; }
.content { font-size: clamp(1rem, 2vw, 1.125rem); color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--card); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: .75rem; }

/* Section: Text & links behavior */
p, li { color: var(--text); }
ul { margin: .5rem 0 1rem 1.25rem; padding: 0; }
ul li { margin: .25rem 0; }

/* Links & buttons */
a, button, .btn, .cta { text-decoration: none; color: inherit; }
a { color: var(--accent); }
a:hover, a:focus-visible { text-decoration: underline; color: #fff; outline: none; }
.btn, a.btn, button { font-family: inherit; font-weight: 600; display: inline-block; padding: .6rem 1rem; border-radius: 999px;
  border: 0; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease; text-align: center; }
.btn { background: linear-gradient(to bottom right, #d4a300 0%, #b88900 100%); color: #1a1400;
  box-shadow: 0 6px 14px rgba(212,163,0,.4); }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.4); box-shadow: none; }
.btn:hover { transform: translateY(-1px); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Section: Footer layout & ad blocks */
footer { padding: 1rem; display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; }
.product-ad, .sponsored-page { text-align: center; padding: .75rem; }
.product-ad a, .sponsored-page a { display: block; padding: .75rem; border-radius: 12px; background: rgba(20,14,40,.5);
  border: 1px solid rgba(255,255,255,.25); color: var(--text); text-decoration: none; }

/* Section: Utilities & responsive behavior */
@media (min-width: 760px) {
  header { padding: 2rem 1.5rem; }
  footer { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}
@media print {
  body { background: white; color: #000; }
  a { color: #000; text-decoration: underline; }
}
@media (max-width: 599px) {
  header nav { flex-wrap: wrap; justify-content: center; gap: .5rem; }
}

/* Section: Accessibility helpers for contrast on glass surfaces */
@media (prefers-color-scheme: light) {
  :root { --text: #111; }
  body { background: #f7f7fb; color: #111; }
  .glass, .section-glass { background: rgba(255,255,255,.85); }
}