/* Section: Theme & Variables */
:root{
  --bg: #041f1a;
  --bg-2: #06241f;
  --text: #eafff6;
  --muted: #b9f3e4;
  --accent: #2ee6cd;
  --accent-2: #27d0b3;
  --panel: rgba(255,255,255,.08);
  --panel-strong: rgba(255,255,255,.18);
  --border: rgba(255,255,255,.28);
  --shadow: 0 6px 16px rgba(0,0,0,.28);
  --radius: 14px;
  --focus: 2px solid #fff;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --grid-gap: 1rem;
}

/* Section: Global Reset & Layered Background */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: var(--font); }
body {
  margin: 0;
  color: var(--text);
  min-height: 100dvh;
  background:
    radial-gradient(circle at 10% 0, rgba(46,230,205,.25) 0%, transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(46,230,205,.15) 0%, transparent 40%),
    linear-gradient(135deg, rgba(2,8,16,.95), rgba(6,28,23,.95) 60%, rgba(0,0,0,.0) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.15), rgba(0,0,0,.25) 40%, rgba(0,0,0,.15) 100%);
  background-blend-mode: screen, screen, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* Subtle scanline noise (pure CSS) */
  background-image:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.025) 0, rgba(0,0,0,.025) 2px, transparent 2px, transparent 4px);
  mix-blend-mode: overlay;
  opacity: .25;
  z-index: 0;
}
#root { isolation: isolate; }

/* Section: Layout Primitives */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
  position: relative;
  z-index: 1;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--grid-gap);
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tag {
  display: inline-block;
  padding: .15em .6em;
  font-size: .8rem;
  border-radius: 999px;
  background: rgba(46,230,205,.22);
  color: #041f1a;
  border: 1px solid rgba(46,230,205,.55);
  margin-right: .5em;
}

/* Section: Typography & Elements */
h1, h2, h3 { margin: .2rem 0 .6rem; line-height: 1.15; }
h1 { font-size: clamp(1.75rem, 2.6vw + 1rem, 3rem); font-weight: 800; letter-spacing: .2px; color: var(--text); }
p { font-size: clamp(1rem, .25vw + .95rem, 1.25rem); line-height: 1.5; color: var(--muted); }

/* Section: Glass Panels (fallback-friendly) */
header, nav, main, article, aside, footer {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius);
  padding: 1rem;
  margin: .5rem 0;
  backdrop-filter: saturate(1.15) blur(10px);
  -webkit-backdrop-filter: saturate(1.15) blur(10px);
}
@supports not (backdrop-filter: blur(8px)) {
  header, nav, main, article, aside, footer { background: rgba(255,255,255,.14); }
}
/* Ensure high contrast text on glass */
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
}
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
}
a:focus-visible, a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, .btn, .cta {
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(46,230,205,.25);
  padding: .65rem 1rem;
  font-weight: 600;
  transition: transform .15s ease, background .15s ease;
}
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
button:hover, .btn:hover, .cta:hover {
  transform: translateY(-1px);
  background: rgba(46,230,205,.35);
}
.btn.outline {
  background: transparent;
  border: 1px solid rgba(46,230,205,.9);
  color: var(--text);
}
.btn:active, .cta:active {
  transform: translateY(0);
  opacity: .95;
}
a.btn { display: inline-flex; align-items: center; justify-content: center; }

/* Section: Image Frame */
.image-frame {
  aspect-ratio: 16/9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.32);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  background: rgba(255,255,255,.04);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Section: Content Area (for potential .content use) */
.content { padding: .5rem 0 0; }

/* Section: Product Ad & Extras */
.product-ad {
  display: inline-block;
  padding: .5rem .75rem;
  border-radius: 10px;
  background: rgba(46,230,205,.22);
  border: 1px solid rgba(46,230,205,.6);
  text-align: center;
  margin: .25rem;
}
.product-ad a { color: var(--text); text-decoration: none; display: block; padding: .25rem 0; }
.product-ad a:hover { text-decoration: underline; }

/* Section: Misc UI Helpers (utility selectors) */
ul, li { margin: 0; padding: 0; list-style: none; }
ul { display: flex; gap: .6rem; flex-wrap: wrap; }
li { display: inline-block; }

/* Section: Header / Nav / Main / Article / Footer Layout */
header { display: block; text-align: center; padding: 1rem 1rem; margin: 0 auto 0.5rem; max-width: 1100px; }
nav { display: inline-flex; gap: .5rem; justify-content: center; margin-top: .5rem; }
main { padding: .5rem 0; }
article { display: block; padding: .5rem; }
footer { padding: .75rem; text-align: center; }

/* Section: Print Styles (basic readability) */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  header, nav, main, article, aside, footer { background: #fff; border: none; border-radius: 0; padding: 0.25rem; }
  a { text-decoration: underline; color: #000; }
}
