/* Section: Tokens & Theme */
:root {
  --bg: #040b1a;
  --bg-2: #0a1740;
  --bg-3: #001033;
  --text: #e9f6ff;
  --muted: #a8b8d9;
  --accent: #3bd2ff;
  --accent-2: #7df9ff;
  --card: rgba(255,255,255,0.08);
  --card-2: rgba(255,255,255,0.12);
  --glass-border: rgba(255,255,255,0.25);
  --focus: #8bdfff;
  --shadow: 0 6px 20px rgba(0,0,0,.25);
}

/* Section: Global Layout & Background */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: 
    linear-gradient(120deg, rgba(3,7,20,.95) 0%, rgba(6,12,28,.95) 60%, rgba(4,8,24,.95) 100%),
    radial-gradient(circle at 20% 10%, rgba(59,210,255,.15), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(0,100,255,.15), transparent 40%);
  background-blend-mode: normal, overlay, overlay;
  min-height: 100%;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  /* Subtle scanline / snowfall texture */
  background-image: linear-gradient(to bottom, rgba(0,0,0,0) 0 96%, rgba(0,0,0,.04) 96% 100%);
  background-size: 100% 2px;
  mix-blend-mode: overlay;
  opacity: .25;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}

/* Section: Layout primitives */
.container { width: min(100%, 1100px); margin: 0 auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Section: Glass panels (with fallback) */
.glass {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,0.22); }
}

/* Section: Image frame */
.image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Content blocks & typography */
.content { color: var(--text); font-size: clamp(1rem, 2.2vw, 1.125rem); line-height: 1.6; }
p { color: var(--muted); margin: .9em 0; }
h1, h2, h3 { color: var(--text); margin: .25em 0; line-height: 1.15; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.25rem); color: #eaf7ff; }

/* Section: Lists & tags */
ul { margin: .75em 0 1em; padding-left: 1.25em; }
li { margin: .5em 0; }
.tag {
  display:inline-flex; align-items:center; gap:.4em;
  padding:.25em .6em; border-radius:999px;
  font-size:.75rem; font-weight:600;
  color:#eaffff;
  background: rgba(59,210,255,.18);
  border:1px solid rgba(59,210,255,.6);
}

/* Section: Interactive controls (links, buttons) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  border: 0;
  background: none;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
a:hover, a:focus { text-decoration: underline; color: var(--accent); }
.btn {
  display:inline-flex; align-items:center; justify-content:center;
  padding:.725rem 1rem; border-radius:999px;
  font-weight:700; font-size:.92rem;
  border:1px solid rgba(59,210,255,.8);
  color:#001018;
  background: linear-gradient(135deg, rgba(59,210,255,.95), rgba(125,255,255,.85));
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
  transition: transform .15s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,0,0,.28); }
.btn.secondary {
  background: rgba(255,255,255,.08);
  color: var(--text);
  border:1px solid rgba(255,255,255,.25);
}
.btn:active { transform: translateY(0); }

/* Section: Header / Hero styling */
header {
  padding: 1.25rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
header h1 { margin: .25rem 0 .25rem; font-weight: 800; }
header .meta { color: var(--muted); font-size: .95rem; margin-bottom: .25rem; }
nav { margin-top: .5rem; display: inline-flex; gap: .5rem; }

/* Section: Page scaffolding */
main { padding: 1rem; position: relative; z-index: 1; }
article { max-width: 60rem; margin: 0 auto; }

/* Section: Footer & ads */
footer { padding: 1.25rem; color: var(--muted); }
.product-ad, .sponsored-page { display: inline-block; width: auto; margin: .25rem; }
.product-ad p, .sponsored-page p { margin:0; padding:.5rem 0; color:#eaffff; }

/* Section: Print styles */
@media print {
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
  .glass { background: rgba(255,255,255,.95); border:1px solid #ccc; }
}
  
/* Section: Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}