/* Theme & tokens */
:root{
  --bg: #0a1020;
  --bg-2: #1a1f3a;
  --bg-3: #2b1e50;

  --text: #eaf2ff;
  --muted: #b8c4f5;
  --accent: #a8b6ff;      /* pastel lilac */
  --accent-2: #6bd6ff;    /* pastel blue */
  --surface: rgba(255,255,255,.08);
  --surface-2: rgba(255,255,255,.14);
  --border: rgba(255,255,255,.25);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --focus: 3px solid var(--accent-2);
}

/* Reset & base */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif; font-size: clamp(14px, 1.6vw, 17px); color: var(--text); background: #000; }

/* Layered background: gradient + pastel nebula hints + subtle noise/scanlines */
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20% 0%, rgba(120,190,255,.25), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(180,120,255,.25), transparent 40%),
    linear-gradient(135deg, #0a1020 0%, #1a1233 60%, #2a1340 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, normal, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Subtle entrance fade for content (GPU-friendly) */
  opacity: 1;
}

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

/* 1. Global typography tweaks (fluid headings) */
h1 { font-size: clamp(1.75rem, 3vw + 1rem, 3rem); line-height: 1.1; margin: 0.25rem 0 0.5rem; font-weight: 700; letter-spacing: .2px; }
p { margin: 0 0 1rem; color: var(--muted); }
a { color: inherit; text-decoration: none; }

/* 2. Structural elements (semantic targeting) */
header, nav, main, article, aside, footer { display: block; }
header { padding: .9rem 1rem; margin: 1rem auto; border-radius: 14px; max-width: calc(100% - 2rem); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
header h1 { text-align: center; color: var(--text); margin: 0.25rem 0 0.25rem; }

/* 3. Navigation styling (accessible focus) */
nav { text-align: center; margin-top: .25rem; }
nav a { padding: .25rem .6rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: var(--text); }
nav a:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

/* 4. Main content & media framing */
main { padding: 0 1rem 1.5rem; }
.image-frame { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 10px 28px rgba(0,0,0,.25); background: #000;
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 5. Glass panels (frosted glass) with fallbacks */
.surface {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: .75rem;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.no-backdrop .surface {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.4);
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}

/* 6. Cards, grids, and utilities */
.grid { display: grid; gap: 1rem; }
.card { padding: 1rem; border-radius: 12px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25); box-shadow: var(--shadow);
}
.tag { display: inline-block; padding: .25rem .5rem; font-size: .75rem; border-radius: 999px;
  background: rgba(106,168,255,.25); border: 1px solid rgba(170,190,255,.5); color: #eaffff;
}

/* 7. Product ad sections in footer */
footer { padding: 1rem; display: grid; gap: .75rem; justify-items: center; align-items: center; }
.product-ad, .sponsored-page { width: min(100%, 900px); padding: .75rem; border-radius: 12px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); text-align: center;
}
.product-ad a, .sponsored-page a { display: block; padding: .5rem; color: var(--text); text-decoration: none; }
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* 8. Form controls (future-proofing for inputs) */
input, button { font: inherit; color: inherit; background: transparent; border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px; padding: .5rem 0.75rem; outline: none; }
button, .btn, .cta { cursor: pointer; padding: .65rem 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.4);
  background: linear-gradient(to right, rgba(120,180,255,.25), rgba(170,160,255,.25)); color: var(--text);
  transition: transform .2s ease, background .2s ease;
}
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); }
button:focus-visible, .btn:focus-visible, .cta:focus-visible, a:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

/* 9. Accessibility & motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .image-frame { will-change: auto; }
}
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}

/* 10. Minor helpers */
ul, li { margin: 0; padding: 0; list-style: none; }
li { line-height: 1.4; }

/* 11. Print-safe fallback for glass/shadow on legacy printers */
.no-print { display: none; } /* if needed to hide sections in print */
