:root {
  --bg: #2b1f0c;
  --bg-2: #1a2a11;
  --text: #eaffd9;
  --muted: #a8e0a0;
  --accent: #39ff8a;
  --accent-2: #7fffaf;
  --panel: rgba(15, 40, 20, 0.28);
  --panel-2: rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(60,28,12,.95) 0%, rgba(18,12,6,.95) 60%, rgba(22,30,14,.95) 100%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  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;
  color-scheme: dark;
}

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

.grid { display: grid; gap: 1rem; }

.card {
  padding: .75rem;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(0,0,0,.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  color: var(--text);
}

a, button, .btn, .cta {
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  color: inherit;
  transition: transform .15s ease, background-color .2s ease, color .2s ease;
}

/* Glass panels with sensible fallback */
header, main, article, footer, aside {
  background: rgba(20, 60, 40, 0.18);
  border: 1px solid rgba(110, 255, 180, 0.28);
  border-radius: 14px;
  padding: 1rem;
  margin: .75rem 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(0,0,0,.20);
  color: var(--text);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, article, footer, aside {
    background: rgba(15, 40, 24, 0.75);
    border-color: rgba(80, 140, 80, 0.5);
  }
}

.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.25);
  background: rgba(0,0,0,.25);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 6px 20px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform .4s ease;
}
.image-frame:hover img { transform: scale(1.05); }

/* Typography */
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.15; }
p { margin: 0 0 1rem; color: var(--text); }

/* Headings and hero hierarchy */
header h1 {
  font-size: clamp(1.75rem, 3vw + 1rem, 2.75rem);
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--text);
}
header nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: .5rem;
}
header nav a {
  color: var(--accent-2);
  padding: .25rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(110,255,180,.4);
  background: rgba(0,0,0,.15);
}
header nav a:hover { text-decoration: underline; color: #d9ffd5; }

/* Core actions (solid and outline) */
.btn, .cta, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .72rem 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.25);
  background: rgba(57,255,138,.92);
  color: #062a13;
  font-weight: 700;
  text-transform: none;
}
.btn:hover, .cta:hover, button:hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
}
.btn:focus-visible, .cta:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn { background: rgba(57,255,138,.95); color: #062a13; }
.btn:hover { background: rgba(57,255,138,1); }
.btn--outline, .cta {
  background: transparent;
  border: 1px solid rgba(57,255,138,.75);
  color: var(--text);
}
.btn--outline:hover { background: rgba(57,255,138,.15); }

/* Links with accessible underlines on hover/focus */
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: #b7ffc8; }

/* Content areas and utility helpers */
.content { padding: .5rem 0; }

/* Product ad blocks in footer */
.product-ad, .sponsored-page {
  display: block;
  padding: .75rem;
  border-radius: 12px;
  text-align: center;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(110,255,180,.5);
}
.product-ad a, .sponsored-page a { color: var(--text); }

/* Lists and tags as utilities */
ul { padding-left: 1.25rem; }
li { margin-block: .25rem; }

/* Tag styling utility */
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  border: 1px solid rgba(57,255,138,.7);
  background: rgba(57,255,138,.25);
  color: #eafff1;
}

/* Layout helpers */
.main, main { display: block; padding: 1rem 0; }

/* Responsive grid utilities (auto-fit) */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }

/* Print styles for basic readability */
@media print {
  body { background: #fff; color: #000; }
  header, main, article, footer { page-break-inside: avoid; background: #fff; border: 0; box-shadow: none; }
  a { color: #000; text-decoration: underline; }
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; transform: none !important; }
}