/* Base Palette & Tokens */
:root {
  --bg: #14101f;
  --bg-2: #1b1122;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --text: #e9e0ff;
  --muted: #b7a5cc;
  --accent: #b36b3a;        /* brown */
  --accent-2: #8a5a2c;      /* brown-ish for contrast */
  --card: rgba(12, 9, 20, 0.6);
  --border: rgba(255, 255, 255, 0.25);
  --focus: 2px solid #d9b7ff;
  --shadow: 0 6px 18px rgba(0,0,0,.28);
  --radius: 14px;
  --fg-glow: 0 0 16px rgba(172, 132, 255, 0.45);
}

/* Section: Global / Layout */
html, body {
  height: 100%;
}
html {
  font-size: 16px;
}
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  /* Layered background: lilac gradient + subtle brown-tinted glow + scanlines/noise overlay */
  background-image:
    radial-gradient(circle at 20% 10%, rgba(180, 132, 255, .25) 0 25%, transparent 25%),
    radial-gradient(circle at 75% 60%, rgba(140, 100, 210, .15) 0 30%, transparent 30%),
    linear-gradient(135deg, rgba(120, 90, 60, .16) 0 40%, rgba(40, 28, 22, .12) 40% 70%, rgba(40, 28, 22, .0) 70%),
    linear-gradient(#1a0f1f, #0b0914);
  background-blend-mode: screen, screen, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  min-height: 100%;
  position: relative;
  overflow-x: hidden;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* Subtle monochrome noise/scanlines */
  background-image:
    linear-gradient(rgba(0,0,0,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.08) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
  opacity: .25;
}
*, *::before, *::after { box-sizing: border-box; }

/* Section: Containers & Utilities */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem;
  color: var(--text);
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  font-size: .75rem;
  padding: .25rem .5rem;
  border-radius: 999px;
  background: rgba(176, 120, 200, .25);
  color: #efe6ff;
  border: 1px solid rgba(255,255,255,.25);
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Section: Typography */
h1, h2, h3 {
  margin: .25rem 0;
  line-height: 1.15;
}
h1 {
  font-size: clamp(1.5rem, 2.5vw + 1rem, 2.75rem);
  letter-spacing: .2px;
}
p { margin: .25rem 0 0; color: rgba(233, 224, 255, .92); }
small, .muted { color: var(--muted); }

/* Section: Links & Buttons */
a, button, .btn, .cta {
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
a:hover, a:focus-visible { text-decoration: underline; outline: none; color: var(--accent-2); }
a:focus-visible { outline: 2px solid #d9b7ff; outline-offset: 2px; }

/* Button variants */
.btn {
  display: inline-block;
  padding: .75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.32);
  background: rgba(120, 70, 40, 0.95);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); background: rgba(140, 85, 50, 0.98); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* Outline/alternative CTA */
.cta {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .6);
  padding: .75rem 1rem;
  color: var(--text);
  border-radius: 999px;
}
.cta:hover { background: rgba(255,255,255,.06); }

/* Inline utility text links */
.inline-link { color: var(--accent-2); }
.inline-link:hover { text-decoration: underline; }

/* Section: Layout primitives used by HTML structure */
header, nav, main, article, aside, footer {
  display: block;
}
header, main, footer {
  margin: 1rem auto;
}
header {
  text-align: center;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(22, 15, 28, 0.38);
  border: 1px solid var(--border);
  box-shadow: var(--fg-glow);
}
header h1 { margin: 0.25rem 0 0; font-weight: 700; color: #f9f5ff; }
nav {
  margin-top: .25rem;
}
nav a {
  color: var(--text);
  padding: .25rem .5rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.15);
}
nav a:hover, nav a:focus-visible { text-decoration: underline; outline: none; }

/* Main content area with glass panel look */
main {
  display: grid;
  place-items: center;
}
.content {
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(14, 9, 20, 0.40);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  width: 100%;
}
@supports not (backdrop-filter: blur(12px)) {
  .content { background: rgba(14, 9, 20, 0.60); border: 1px solid rgba(255,255,255,.40); }
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}
article { display: block; padding: .5rem 0; }

/* Section: Product area / ad blocks in footer-like region */
.product-ad {
  display: block;
  text-align: center;
  padding: .75rem;
  margin: .25rem 0;
  border-radius: 12px;
  background: rgba(18,12,22,.45);
  border: 1px solid rgba(255,255,255,.28);
}
.product-ad a { color: var(--text); text-decoration: none; font-weight: 600; display: inline-block; padding: .25rem .5rem; }
.product-ad a:hover { text-decoration: underline; }

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

/* Section: Footer */
footer {
  padding: 1rem;
  text-align: center;
  color: rgba(230, 226, 255, .9);
}
footer p { margin: .25rem 0; }

/* Section: Responsiveness / Utilities */
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (min-width: 900px) {
  .container { padding: 0; }
  header { padding: 1.25rem 1.5rem; }
  .content { padding: 1.25rem; }
}
@media print {
  body { color: #000; background: #fff; }
  header, main, footer { background: transparent; border: none; box-shadow: none; }
  a, a:visited { text-decoration: underline; color: #000; }
}
