/* Tokens */
:root {
  --bg: #0b0f14;
  --bg-2: #14171d;
  --text: #e9eef6;
  --muted: #a7acb9;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.16);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 8px 28px rgba(0,0,0,.55);
  --accent: #a9b4bd;
  --accent-2: #d4dde7;
}

/* Section: Base resets & layout scaffolding */
*,
*::before,
*::after { box-sizing: border-box; }
html, body, header, nav, main, article, aside, footer { height: auto; }
html, body { height: 100%; }
html { font-size: 16px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Layered background: gradient + subtle scanlines/noise (pure CSS) */
html, body { margin: 0; }
body {
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(#0b0f14, #0b0f14),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Section: Layout helpers (container/grid/card/tag) */
.container {
  width: min(90%, 1100px);
  margin-inline: auto;
  padding: 0 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .15s ease, background .25s ease, border-color .25s ease;
}
.tag {
  display: inline-block;
  padding: .25rem .5rem;
  font-size: .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: var(--text);
}
ul { margin: 0; padding-left: 1.25rem; color: var(--muted); }
li { margin: .25rem 0; }

/* Section: Structural elements styling */
header, nav, main, article, aside, footer { padding: 0; margin: 0; }
header {
  padding: 1.25rem 1rem;
  text-align: center;
}
header h1 {
  font-size: clamp(1.6rem, 2.4vw + 1rem, 3.0rem);
  margin: .25rem 0;
  letter-spacing: .2px;
  color: var(--text);
}

/* Main content area */
main { padding: 1rem 0 0; }

/* Image frame styling (aspect-ratio, object-fit, glow) */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 22px rgba(0,0,0,.5);
  background: #0a0d12;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.02);
  transition: transform .4s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Content area (glass panel) */
.content {
  padding: 1rem;
  color: var(--text);
  text-wrap: pretty;
}
.content h2, .content h3, .content p { margin: .25rem 0; }

/* Section: Product ad / footer panels (glass panels) */
.product-ad,
.sponsored-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6rem .9rem;
  border-radius: 999px;
  margin: .4rem 0;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--text);
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
.product-ad:hover,
.sponsored-page:hover { transform: translateY(-1px); background: rgba(255,255,255,.12); }
.product-ad a, .sponsored-page a { color: inherit; text-decoration: none; }

/* Section: Links, CTA buttons, and form-like controls */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.08);
  color: var(--text);
  gap: .5rem;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
  transition: transform .15s ease, background .25s ease, border-color .25s ease;
}
.btn:hover, .cta:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.btn:focus-visible, .cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.btn.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.58);
}
.btn.primary {
  background: linear-gradient(135deg, rgba(120,170,210,.95), rgba(100,120,160,.95));
  border: none;
}
.btn.small { padding: .5rem .75rem; font-size: .92rem; }

/* Section: Utility helpers */
.container .header-spacer { height: 0.5rem; }

/* Section: Layout refinements for variants */
footer {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
}
footer .sponsorline { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }

/* Section: Thematic accent adjustments for accessibility */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6f8;
    --bg-2: #e9eef4;
    --text: #0a0d12;
    --muted: #475569;
    --surface: rgba(0,0,0,.08);
    --surface-2: rgba(0,0,0,.12);
    --border: rgba(0,0,0,.15);
    --accent: #4b5a66;
    --accent-2: #1e293b;
  }
  body {
    background-image:
      linear-gradient(#f4f6f8, #f4f6f8),
      repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
    color: var(--text);
  }
  .image-frame { border-color: rgba(0,0,0,.15); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
  .product-ad, .sponsored-page { background: rgba(0,0,0,.04); border: 1px solid rgba(0,0,0,.15); }
}

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

/* Section: Print styles (basic readability) */
@media print {
  body { background: white; color: black; }
  a { text-decoration: underline; color: black; }
}
