/* Section: Tokens & Base Layer */
:root {
  --bg: #0b0b0f;
  --bg-2: #141621;
  --text: #e8e8ee;
  --muted: #aab4c2;
  /* Gold / Silver themed accents */
  --gold: #d4af37;
  --gold-d: #b08a2c;
  --silver: #cbd5e1;
  --silver-d: #98a3b4;

  /* Glass & surfaces */
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 12px 28px rgba(0,0,0,0.45);
  --blur: 12px;
  --focus: rgba(212, 175, 55, 0.85);

  /* Utility accents */
  --accent: var(--gold);
  --accent-2: var(--silver);
  --radius: 14px;
  --radius-sm: 10px;

  /* Grid helpers */
  --gap: 1.25rem;
  --container-max: clamp(320px, 92vw, 1200px);
}

html, body, header, nav, main, article, footer, aside {
  /* Structural selectors reset scope (no layout rules here) */
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

html {
  color-scheme: dark;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: #000;
  color: var(--text);
  font-size: clamp(14px, 0.8vw + 12px, 16px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Layered background: gradient + subtle gold diagonal lines + faint scanlines (pure CSS) */
  background-image:
    linear-gradient(135deg, rgba(12,12,14,0.65) 0%, rgba(6,6,8,0.85) 60%, rgba(8,8,10,0.75) 100%), /* deep atmospheric layer */
    repeating-linear-gradient(135deg, rgba(212,175,55,0.25) 0 2px, transparent 2px 6px), /* gold diagonal cadence */
    linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0.92)); /* vignette */
  background-blend-mode: normal, overlay, normal;
  background-size: 100% 100%, 40px 40px, cover;
  min-height: 100%;
}

/* Section: Layout primitives */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  color: var(--text);
  transition: transform 0.2s ease, background 0.2s ease;
}
.card:hover { transform: translateY(-2px); }

/* Section: Structural elements styling targets */
html, body, header, nav, main, article, footer, aside { scroll-behavior: smooth; }

/* Header (hero) */
header {
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  text-align: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
header h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw + 1rem, 3.4rem);
  line-height: 1.05;
  letter-spacing: .2px;
  color: var(--text);
}
header p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 0.8vw + 0.9rem, 1.1rem);
}

/* Main content area */
main {
  padding: 2rem 1rem;
}
article { display: grid; gap: 1rem; justify-items: center; }

/* Image frame: aspect-ratio, glow, and frame border */
.image-frame {
  width: min(100%, 900px);
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(135deg, rgba(212,175,55,0.25), rgba(255,255,255,0.05));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  filter: saturate(1.05);
  transform: translateZ(0);
}
@media (prefers-reduced-motion: reduce) {
  .image-frame, .image-frame img { transition: none; }
}

/* Content helpers (glass panels) */
.content {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
  color: var(--text);
}
@supports not (backdrop-filter: blur(12px)) {
  .content {
    background: rgba(255, 255, 255, 0.14);
  }
}

/* Product ad sections (footer) */
.product-ad, .sponsored-page {
  display: block;
  padding: 0;
  margin: 0.5rem 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-align: center;
  box-shadow: var(--shadow);
}
.product-ad a, .sponsored-page a {
  display: block;
  padding: 1rem;
  color: var(--text);
  text-decoration: none;
}
.product-ad a:hover, .sponsored-page a:hover {
  text-decoration: underline;
  background: rgba(255,255,255,0.08);
}
.product-ad p, .sponsored-page p {
  margin: 0;
  font-weight: 600;
}
footer {
  padding: 1.5rem 1rem;
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  color: var(--muted);
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.75));
  border-top: 1px solid rgba(255,255,255,0.15);
}
footer p { color: var(--text); margin: 0; }

/* Links & Buttons (interactive) */
a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
a:hover, a:focus {
  text-decoration: underline;
  outline: none;
}
a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.75);
  border-radius: 6px;
}
button, .btn, .cta {
  font: inherit;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 0.75rem 1.1rem;
  background: linear-gradient(180deg, rgba(212,175,55,0.95), rgba(212,175,55,0.75));
  color: #1a1a1a;
  transition: transform 0.2s ease, background 0.2s ease;
}
button:hover, .btn:hover, .cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(212,175,55,1), rgba(212,175,55,0.85));
}
button:active, .btn:active, .cta:active {
  transform: translateY(0);
}
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.75);
  border-radius: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn--outline {
  background: transparent;
  border: 1px solid rgba(212,175,55,0.9);
  color: var(--text);
}
.btn--outline:hover {
  background: rgba(212,175,55,0.12);
}
.cta {
  padding-inline: 1.25rem;
  font-weight: 700;
  text-transform: none;
}
.tag {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(212,175,55,0.25);
  color: #fff;
  border: 1px solid rgba(212,175,55,0.6);
}

/* Typographic rhythm (scaling helpers) */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: .2px;
}
p { margin: 0.5em 0; }

/* Lists (ul, li) */
ul { margin: 0; padding: 0; list-style: none; }
li { margin: 0.25em 0; }

/* Content density helpers */
@media (max-width: 720px) {
  header { padding: 1.25rem; }
  .image-frame { width: 100%; aspect-ratio: 16 / 9; }
}

/* Sections: Light-mode optimization (WCAG legibility) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7fb;
    --bg-2: #ffffff;
    --text: #111319;
    --muted: #555b66;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-2: rgba(255, 255, 255, 0.98);
    --border: rgba(0, 0, 0, 0.15);
    --shadow: 0 6px 16px rgba(0,0,0,0.08);
    --focus: rgba(214, 160, 0, 0.9);
  }
  html, body { background: #f7f7fb; color: var(--text); }
  header {
    background: rgba(255, 255, 255, 0.88);
    border-bottom-color: rgba(0,0,0,0.08);
  }
  .card, .product-ad, .sponsored-page {
    background: rgba(255, 255, 255, 0.98);
  }
  a { color: #0a4bd8; }
}

/* Section: Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
  header, main, footer { box-shadow: none; }
  .image-frame { page-break-inside: avoid; }
}
