:root {
  --bg: #04101d;
  --bg-2: #081e2b;
  --text: #eaffff;
  --muted: #a6d9e5;
  --accent: #14f5d9;
  --accent-2: #0bd1c9;
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.25);
  --radius: 14px;
  --shadow: 0 6px 18px rgba(0,0,0,.25);
  --focus: 2px solid var(--accent-2);
}
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

/* Layered background: gradient + subtle scanlines + soft nebula hint */
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 255, 200, 0.08), transparent 40%),
    linear-gradient(135deg, rgba(2, 12, 28, 0.95), rgba(1, 6, 18, 0.92) 60%, rgba(1,6,18,0.95)),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 2px, transparent 2px 4px);
  background-blend-mode: overlay, normal, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}
@supports (background-blend-mode: overlay) {
  /* no-op; ensures composite rendering remains crisp on modern devices */
}
@media (prefers-color-scheme: light) {
  body { color: #0a1b1f; background: #f7fbfe; }
  :root { --text: #0a1b1f; --muted: #495056; }
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(720px, 82vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@supports not (backdrop-filter: blur(8px)) {
  .card { background: rgba(255,255,255,.12); }
}
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.content { padding: .75rem; color: var(--text); }

/* Typography scaling (fluid) */
h1, h2, h3 {
  margin: .25rem 0;
  line-height: 1.15;
}
h1 { font-size: clamp(1.6rem, 1.5rem + 2.5vw, 2.6rem); }
h2 { font-size: clamp(1.25rem, 0.9rem + 1.5vw, 2rem); }
h3 { font-size: clamp(1.05rem, 0.8rem + 1vw, 1.4rem); }

p { margin: .6rem 0; }

ul, ol { margin: .5rem 0 1rem 1.25rem; padding: 0; }

/* Glassy surface abstractions for sections in header/main/footer */
header, nav, main, article, aside, footer {
  padding-block: .75rem;
}

/* Header hero styling */
header {
  text-align: center;
  padding: 1.25rem 0 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
  background: rgba(2, 8, 18, 0.35);
}
header h1 { margin: 0.25rem 0 0.25rem; font-weight: 700; color: var(--text); }
header .meta { font-size: 0.92rem; color: var(--muted); margin-top: .25rem; }

/* Nav as compact pill row (glass-ish) */
nav {
  display: inline-flex;
  gap: .5rem;
  padding: .25rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.25);
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .4rem .75rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
nav a:hover { text-decoration: underline; }
a, button, .btn, .cta {
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
  transition: transform .15s ease, background .25s ease, color .25s ease;
}
a:hover { text-decoration: underline; }
.btn, .cta, button {
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(3, 15, 20, 0.8);
  color: var(--text);
}
.btn.primary {
  background: rgba(20,245,217,0.95);
  color: #002019;
  border-color: rgba(20,245,217,.95);
}
.btn.secondary {
  background: rgba(0,0,0,.0);
  color: var(--text);
  border-color: rgba(0,255,255,.6);
}
.btn:focus-visible, .cta:focus-visible, button:focus-visible, a:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  text-decoration: underline;
  border-radius: 6px;
}
a:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* Main content and article styling with glass panels */
main { padding: 1rem 0; }
article { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius); padding: 1rem; margin: 0 auto; }

/* Subtle interior blocks for content sections */
.block { margin: .75rem 0; padding: .75rem; border-radius: 10px; background: rgba(0,0,0,.15); border: 1px solid rgba(255,255,255,.15); }

/* Product ad blocks in footer / cards */
.product-ad, .sponsored-page {
  display: inline-block;
  width: calc(50% - 0.5rem);
  margin: .25rem;
  padding: .75rem 1rem;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  text-align: center;
  min-width: 240px;
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; }

/* Footer styling for high-contrast, glass finish */
footer {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  background: rgba(3,8,18,.5);
  border-top: 1px solid rgba(255,255,255,.15);
}
footer p { margin: .25rem 0; color: var(--text); }

/* Utilities for typography and spacing on small screens */
@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; }
  .product-ad, .sponsored-page { width: 100%; min-width: 0; }
  article { padding: .75rem; }
  header { padding: .75rem 0; }
}
@media (min-width: 860px) {
  .container { padding-inline: 2rem; }
}

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