/* Section: Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); background: #000; }

/* Section: Tokens & Color System */
:root {
  --bg: #0a0a2a;           /* ultraviolet-inspired deep base */
  --bg-2: #2b1748;          /* violet-brown gradient accent */
  --text: #e9e6ff;           /* high-contrast text on dark glass */
  --muted: #c9b8d8;          /* secondary text */
  --accent: #7b4a2a;          /* rich brown/copper */
  --accent-2: #d69b2a;        /* copper/gold highlight */
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(0, 0, 0, 0.25);
  --shadow: 0 8px 28px rgba(0,0,0,.35);
  --focus: 0 0 0 3px rgba(125, 92, 35, 0.6);
  --focus-ring: 0 0 0 3px rgba(125, 92, 35, 0.75);
}

/* Section: Layered Background (gradient + subtle noise/scanlines) */
html, body {
  height: 100%;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans";
  color: var(--text);
  line-height: 1.55;
  /* Layered background: gradient + scanlines + subtle noise hints (pure CSS) */
  background-image:
    linear-gradient(135deg, var(--bg), var(--bg-2) 60%, #000 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.05) 0, rgba(255,255,255,0) 40%),
    radial-gradient(circle at 80% 10%, rgba(0,0,0,.04) 0, rgba(0,0,0,0) 40%);
  background-blend-mode: normal, overlay, overlay, overlay;
  background-attachment: fixed;
  background-size: cover;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Section: Typography & Utilities */
h1, h2, h3, h4 { margin: 0 0 0.5rem; font-weight: 700; letter-spacing: .2px; }
p { margin: 0 0 1rem; }
blockquote { margin: 0 0 1rem; padding-left: 1rem; border-left: 3px solid var(--accent-2); color: var(--muted); }

/* Section: Layout & Containers */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  padding: 0 1rem;
  margin-inline: auto;
}
header, main, footer { display: block; }
main { padding: 1.25rem 0 2rem; }

/* Section: Glass Panels & Fallback (backdrop-filter) */
.glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1rem;
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .glass { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background: rgba(255,255,255,0.14); }
}

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

/* Section: Content & Media Helpers */
.content { padding: 0; }

/* Section: Cards, Grids, Tags */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.card {
  padding: 1rem;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow);
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .card { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: rgba(255,255,255,.12); }
}
.tag {
  display: inline-block;
  padding: .2em .6em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(123,74,42,.25);
  color: #ffd;
  border: 1px solid rgba(123,74,42,.4);
}

/* Section: Interactive Elements (Links, Buttons) */
a, button, .btn, .cta {
  font-family: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
a { color: var(--accent-2); }
a:hover, a:focus { text-decoration: underline; outline: none; color: var(--accent-2); }
button, .btn, .cta {
  border: 1px solid rgba(0,0,0,.15);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: .55rem 1rem;
  border-radius: 8px;
  font-weight: 600;
}
.btn, .cta { display: inline-block; }
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:focus-visible, .cta:focus-visible, a:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline: none;
  border-color: rgba(255,255,255,.8);
}
.btn.outline, .cta.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.6);
}
.btn.secondary {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
}
.btn + .btn { margin-left: .5rem; }

/* Section: Page Structure Styling (Header, Main, Footer) */
header {
  display: block;
  padding: 1rem 1rem;
  margin: 0 auto 1rem;
}
header h1 {
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  line-height: 1.15;
}
header .meta {
  font-size: clamp(0.8rem, 0.8vw, 0.95rem);
  color: var(--muted);
}
main { display: block; }

/* Section: Footer & Ad Blocks */
.product-ad {
  padding: .9rem;
  margin-top: .5rem;
  background: rgba(0,0,0,.25);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
}
.product-ad h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.product-ad a { display: inline-block; padding: .5rem 1rem; border-radius: 6px; background: var(--accent-2); color: #111; font-weight: 700; text-decoration: none; }
.product-ad a:hover { filter: brightness(0.98); }

/* Section: Print Styles */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}

/* Section: Accessibility & Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Section: Small Screen Adjustments */
@media (max-width: 640px) {
  header { padding: .75rem; border-radius: 12px; }
  .grid { grid-template-columns: 1fr; }
  .image-frame, .featured-image { border-radius: 10px; }
}
