/* Base tokens */
:root{
  --bg: #0a1020;
  --bg-2: #0a1b2a;
  --text: #e7ffef;
  --muted: #9bdcaa;
  --accent: #00ff9a;
  --accent-2: #1ee8a5;
  --glass: rgba(8, 18, 40, 0.22);
  --glass-2: rgba(8, 18, 40, 0.28);
  --border: rgba(80, 230, 180, 0.38);
  --shadow: 0 8px 20px rgba(0,0,0,.35);
  --btn: #0b57f2;
  --btn-ghost: rgba(0, 255, 140, 0.25);
  --focus: rgba(0, 255, 140, 0.95);
  --card-radius: 12px;
  --gap: 1rem;
}

/* Reset + layout primitives */
html, body { height: 100%; }
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }

/* Layered, responsive background: gradient + diagonal lines + subtle noise hint */
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  line-height: 1.55;
  min-height: 100dvh;
  background-color: var(--bg);
  background-image:
    linear-gradient(135deg, rgba(0,255,140,.08) 0%, rgba(0,180,255,.08) 40%, rgba(0,0,0,0) 40%),
    linear-gradient(#0a1020 0 100%),
    repeating-linear-gradient(-45deg, rgba(0,180,255,.08) 0 2px, transparent 2px 8px);
  background-blend-mode: overlay, normal, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-attachment: fixed;
}

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

/* Header / hero */
header { padding: 1.75rem 0 0.75rem; text-align: center; }
header h1 {
  font-size: clamp(1.75rem, 1.8rem + 2.2vw, 3rem);
  line-height: 1.15;
  margin: .25rem 0 0;
  font-weight: 700;
  color: #ccffda;
  letter-spacing: .4px;
}
main { display: grid; place-items: center; padding: 1rem 0 2rem; }

/* Media: image frame with aspect ratio and glow */
.image-frame {
  width: min(100%, 720px);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 210, 0.28);
  box-shadow: 0 8px 28px rgba(0,0,0,.45);
  background: #000;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(1.05) contrast(1.02);
  transform: translateZ(0);
}

/* Glass panels (fallback included) */
.glass { /* generic for sections that should feel frosted */
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: var(--glass-2); }
}

/* Footer layout: product-ad + sponsor + copyright */
footer { padding: .75rem 0 1.25rem; text-align: center; display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 700px){
  footer { grid-template-columns: repeat(2, 1fr); justify-items: center; }
}
.product-ad p, .sponsored-page p { margin: 0; }

/* Typography helpers */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(0,255,140,.75); }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* Buttons & CTAs */
.btn, .cta { display: inline-block; padding: .75rem 1.1rem; border-radius: 10px; border: 1px solid rgba(0,255,140,.65);
  background: rgba(0,255,140,.35); color: #00140b; text-decoration: none; font-weight: 600; cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); background: rgba(0,255,140,.48); }
.btn:active, .cta:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn.primary { background: var(--btn); color: white; border-color: rgba(0,0,0,.15); }
.btn.ghost { background: transparent; border-color: rgba(0,255,140,.8); color: var(--text); }

/* Card and tag utilities */
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.card {
  background: rgba(8, 20, 40, 0.22);
  border: 1px solid rgba(80, 230, 180, 0.38);
  border-radius: var(--card-radius);
  padding: .9rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.tag {
  display: inline-block; padding: .15rem .6rem; border-radius: 999px;
  font-size: .75rem; line-height: 1; color: #032914;
  background: rgba(0,255,140,.25); border: 1px solid rgba(0,255,140,.55);
}

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

/* Content wrapper (if used) */
.content { padding: 0; margin: 0; }

/* Form controls (present or future) */
input, button, select, textarea {
  font: inherit; color: inherit;
}
input, button { border-radius: 8px; border: 1px solid rgba(0,255,140,.5); padding: .5rem .75rem; }

/* Print-friendly (basic) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .image-frame { will-change: transform; }
}

/* Light-mode adjustment (improve legibility when user prefers light) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5faff;
    --bg-2: #e8f0fb;
    --text: #0b1b2b;
    --muted: #345;
    --glass: rgba(255,255,255,.78);
    --glass-2: rgba(255,255,255,.9);
    --border: rgba(0,0,0,.15);
    --shadow: 0 6px 18px rgba(0,0,0,.08);
  }
  body { background-color: var(--bg); color: var(--text); }
  header h1 { color: #063b21; }
  .glass { border-color: rgba(0,0,0,.08); }
}
