/* 1) Theme tokens */
:root{
  --bg: #0a0a0a;
  --bg-2: #141313;
  --text: #f7f7f7;
  --muted: #cbd5e1;
  --white: #ffffff;

  /* Mustard yellow palette for "future cyberpunk" vibe */
  --accent: #e3c23a;      /* mustard/yellow */
  --accent-2: #ffd76b;     /* lighter highlight */

  /* Glass & borders */
  --glass: rgba(255,255,255,0.08);
  --glass-2: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.25);
  --shadow: 0 8px 26px rgba(0,0,0,.40);

  /* Focus / interaction */
  --ring: 0 0 0 3px rgba(227, 197, 54, .70);
  --focus-offset: 2px;
}

/* 2) Layered background (gradient + subtle scanlines + leaf silhouette) */
/* Base page surface */
html, body {
  height: 100%;
}
html {
  font-size: 16px;
}
body {
  margin: 0;
  color: var(--text);
  background: 
    /* foreground gradient for depth */
    linear-gradient(135deg, rgba(24,24,24,.80) 0%, rgba(10,10,10,.95) 60%, rgba(14,14,14,.95) 100%),
    /* subtle mustard glow drift */
    linear-gradient(180deg, rgba(227,193,56,.08), rgba(227,193,56,.04) 60%, rgba(227,193,56,.08) 100%);
  /* pure CSS noise/scanline overlay (non-intrusive) */
  background-blend-mode: overlay;
  background-attachment: fixed;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* leaf silhouette pattern (stylized mustard leaves) */
  background-image:
    radial-gradient(circle at 12% 20%, rgba(227, 190, 48, .22) 0 6px, transparent 7px),
    radial-gradient(circle at 48% 40%, rgba(227, 190, 48, .18) 0 8px, transparent 9px),
    radial-gradient(circle at 78% 25%, rgba(227, 190, 48, .22) 0 6px, transparent 7px);
  background-size: 120px 60px, 120px 60px, 120px 60px;
  opacity: .25;
  mix-blend-mode: overlay;
  filter: saturate(1.1);
}

@media (prefers-color-scheme: light) {
  body {
    background: 
      linear-gradient(135deg, rgba(25,25,25,.85) 0%, rgba(50,50,50,.95) 60%, rgba(40,40,40,.98) 100%),
      linear-gradient(180deg, rgba(248, 232, 120, .08), rgba(248, 232, 120, .04) 60%, rgba(248, 232, 120, .08) 100%);
  }
  body::before {
    opacity: .15;
  }
}

/* Scanline-like overlay (pure CSS) for subtle horizontal lines */
body {
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,.15), rgba(0,0,0,.15)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0, rgba(255,255,255,.04) 1px, transparent 1px, transparent 4px),
    linear-gradient(135deg, rgba(227,193,56,.08), rgba(0,0,0,0) 60%);
  background-size: auto, auto, auto;
  background-blend-mode: overlay, overlay, normal;
}

/* 3) Base typography & helpers */
* { box-sizing: border-box; }

html, body, header, nav, main, article, footer, aside { display: block; }

body, h1, h2, h3, h4, h5, h6, p, ul, li, a, button {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}

/* Grid, cards, tags for layout primitives */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem;
  color: var(--text);
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(227, 180, 40, .25);
  color: #fff;
  border: 1px solid rgba(227,180,40,.5);
}

/* 4) Core layout primitives (structure) */
header, main, footer, aside {
  width: 100%;
}

header {
  padding: 2rem 1rem;
  display: grid;
  gap: .5rem;
  justify-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}
header h1 {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0;
  color: var(--text);
  letter-spacing: .2px;
}
header .meta {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}
header nav {
  display: inline-flex;
  gap: .5rem;
  margin-top: .25rem;
}
header nav a {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
  padding: .4rem .7rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.15);
}
header nav a:hover { text-decoration: underline; }

/* Hero / content panels (glass panels with backdrop-filter) */
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
  color: var(--text);
}
@supports not (backdrop-filter: blur(8px)) {
  .glass {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.25);
  }
}
main {
  padding: 1rem 0 2rem;
}
article {
  display: grid;
  gap: 1rem;
  align-items: start;
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
  background: #111;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.image-frame:hover img {
  transform: scale(1.03);
}
.content {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.6;
  color: #eaeaea;
}
h2, h3 {
  color: #fff;
  margin-top: .25rem;
  margin-bottom: .5rem;
  line-height: 1.25;
}
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.25rem); font-weight: 700; }

/* Lists: ensure accessible bullets and spacing */
ul { padding-left: 1.25rem; margin: .25rem 0 0; }
li { margin: .25rem 0; }

/* 5) Interactive elements (links, buttons) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  background: rgba(0,0,0,.15);
  padding: .55rem .85rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.28);
  display: inline-block;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
a:hover { text-decoration: underline; color: var(--accent-2); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  transform: translateY(-1px);
}
.btn, .cta {
  background: var(--accent);
  color: #111;
  font-weight: 700;
}
.btn:hover, .cta:hover {
  background: color-mix(in oklch, var(--accent) 70%, #000 30%);
}
.btn:active, .cta:active {
  transform: translateY(0);
  background: color-mix(in oklch, var(--accent) 60%, #000 40%);
}
.btn.outline, .cta.outline {
  background: transparent;
  border: 1px solid rgba(227, 182, 40, .8);
  color: #fff;
}
.btn.small { padding: .45rem .7rem; font-size: .9rem; }

/* 6) Product / ad blocks and footer layout */
footer {
  margin-top: 2rem;
  padding: 1rem 0 2rem;
  display: grid;
  gap: 1rem;
}
.product-ad, .sponsored-page {
  padding: .75rem;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  text-align: center;
}
.product-ad p, .sponsored-page p { margin: 0; font-weight: 600; }
footer p {
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
  margin: .5rem 0 0;
}
@media (min-width: 760px) {
  footer {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  .product-ad, .sponsored-page { display: flex; align-items: center; justify-content: center; }
  .product-ad p, .sponsored-page p { font-size: 1rem; }
}

/* 7) Print styles for readability */
@media print {
  body { background: #fff; color: #000; -webkit-print-color-adjust: exact; }
  header, nav, footer { display: block; }
  a, button { color: #000; text-decoration: underline; }
  .glass { background: #fff; border: none; box-shadow: none; }
  .image-frame { page-break-inside: avoid; }
}
