/* Palette & Theme Tokens */
:root{
  --bg: #2b1b09;
  --bg-2: #3a2315;
  --bg-3: #1a0f07;
  --text: #f6f6f9;
  --muted: #c8bfb8;
  --accent: #4169e1;      /* royal blue */
  --accent-2: #6ea8ff;
  --glass: rgba(255,255,255,.08);
  --glass-border: rgba(255,255,255,.28);
  --card: rgba(255,255,255,.08);
  --card-border: rgba(255,255,255,.25);
  --shadow: 0 8px 24px rgba(0,0,0,.28);
  --radius: 12px;
  --radius-lg: 14px;
  --focus: #ffffff;
  --focus-offset: 3px;
}

/* Baseline & Utilities */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "Liberation Sans", Arial, sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg-3);
  background-image:
    linear-gradient(135deg, rgba(60,25,9,.95) 0%, rgba(10,6,4,.95) 60%, rgba(18,10,8,.95) 100%),
    radial-gradient(circle at 20% 0%, rgba(120,60,0,.15) 0 40%, transparent 60%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-size: cover;
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }

/* Layout helpers */
.container { width: 100%; max-width: clamp(320px, 90vw, 1100px); margin: 0 auto; padding: 0 1rem; }

/* Glass panel (with fallback) */
.card, .image-frame, .featured-image, .product-ad, .sponsored-page {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.card { background: var(--card); border: 1px solid var(--card-border); }

/* Backdrop-filter support for frosted glass (fallback provided) */
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .card, .image-frame, .product-ad, .sponsored-page {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

/* Image framing */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: inset 0 0 12px rgba(0,0,0,.25), 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Fallback image container used by the provided HTML (keeps visuals consistent) */
.featured-image { border-radius: calc(var(--radius) + 2px); overflow: hidden; border: 1px solid rgba(255,255,255,.28); box-shadow: inset 0 0 12px rgba(0,0,0,.25), 0 6px 18px rgba(0,0,0,.25); }
.featured-image img { width: 100%; height: auto; display: block; }

/* Core typography & headings */
h1, h2, h3 { line-height: 1.15; margin: .6rem 0; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 2.4vw + 1rem, 2.6rem); }
h2 { font-size: clamp(1.4rem, 0.8rem + 2vw, 2.2rem); color: #fff; }
h3 { font-size: clamp(1.1rem, 0.8rem + 1.4vw, 1.6rem); color: #e9f0ff; }
p { color: #f3efe8; margin: .75rem 0; font-size: clamp(0.95rem, 0.9vw + 0.9rem, 1.15rem); }

/* Blockquotes for emphasis */
blockquote {
  margin: .75rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: #eaf3ff;
  background: rgba(65,105,225,.08);
  border-radius: 6px;
}

/* Lists */
ul { padding-left: 1.25rem; margin: .75rem 0; }
li { margin: .25rem 0; }

/* Links & interactive elements */
a, button, .btn, .cta {
  color: #fff;
  text-decoration: none;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: .65rem 1rem;
  display: inline-block;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, background .25s ease, color .25s ease;
}
a { background: transparent; color: var(--accent); padding: .25rem .5rem; border-radius: 6px; }
a:hover { text-decoration: underline; color: var(--accent-2); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: var(--focus-offset);
}
.btn, .cta { background: var(--accent); color: #fff; }
.btn:hover, .cta:hover { background: color-mix(in oklab, var(--accent) 90%, #fff 0%); transform: translateY(-1px); }

/* CTA variants (outline) */
.outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.outline:hover {
  background: rgba(65,105,225,.15);
  color: #fff;
  transform: translateY(-1px);
}

/* Utilities (grid & cards) */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { padding: 1rem; }

/* Sectioned layout components */
header {
  padding: 1rem;
  margin: 1rem auto;
  width: min(100%, 1100px);
}
header h1 { color: #fff; margin-bottom: .25rem; }
header .meta { font-size: .85rem; color: var(--muted); }

/* Nav styling */
nav a {
  color: #e7f0ff;
  text-shadow: 0 0 0 transparent;
  padding: .25rem .5rem;
  border-radius: 6px;
}
nav a:hover { background: rgba(255,255,255,.08); }

/* Main content area */
main { padding: 1rem 0; }
article { width: 100%; }
article h2 + p { margin-top: .25rem; }

/* Footer / "ads" sections */
footer { padding: 1rem 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
.product-ad a, .sponsored-page a { display: block; text-align: center; text-decoration: none; color: #fff; }
.product-ad { text-align: center; }
.sponsored-page { text-align: center; }

/* Print-friendly tweaks */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: transparent; box-shadow: none; }
  a { text-decoration: underline; color: #000; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}