/* Palette & Theme Tokens (CSS Variables) */
:root {
  /* Theme: dark cyber with blue/cosmic accents */
  --bg: #0a1220;
  --bg-2: #0b1a2f;
  --bg-3: #0a0f1e;
  --surface: rgba(18, 28, 60, 0.72);
  --surface-2: rgba(18, 28, 60, 0.48);
  --text: #e9f2ff;
  --muted: #a9b9d6;
  --accent: #4ea7ff;        /* main cosmic blue */
  --accent-2: #8bd5ff;       /* secondary glow */
  --ring: #7bd0ff;
  --card: rgba(20, 30, 60, 0.78);
  --shadow: 0 8px 28px rgba(0,0,0,.45);
  --radius: 14px;
  --cs-gap: 1rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Light-mode tweaks for better legibility (prefers-color-scheme) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8ff;
    --bg-2: #e9f0ff;
    --bg-3: #eef5ff;
    --surface: rgba(255, 255, 255, 0.98);
    --surface-2: rgba(255, 255, 255, 0.92);
    --text: #0b1020;
    --muted: #495f87;
    --accent: #1a4ed8;
    --accent-2: #2f6ef2;
    --ring: #1a4ed8;
    --card: rgba(255, 255, 255, 0.95);
  }
  body { background-attachment: fixed; }
  .glass { backdrop-filter: saturate(110%) blur(10px); }
}

/* ---------------------------------------------
   Global Base
---------------------------------------------- */
html, body { height: 100%; }
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
html, body { margin: 0; padding: 0; color: var(--text); background: transparent; }

/* Layered, fluid background (gradient + subtle noise/scanline) */
body {
  min-height: 100dvh;
  font-family: var(--font);
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(circle at 20% -10%, rgba(78,167,255,.15), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(0,140,255,.12), transparent 40%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 60%, var(--bg-3) 100%);
  background-attachment: fixed;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* Pure CSS "noise" + "scanlines" layer */
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  mix-blend-mode: overlay;
  opacity: .55;
  transform: translateZ(0);
  animation: none;
}

/* Layout primitives */
.container { width: 100%; max-width: clamp(680px, 90vw, 1120px); margin-inline: auto; padding-block: 1rem; padding-inline: 1rem; }
.grid { display: grid; gap: var(--cs-gap); }

/* Basic structure */
header, main, footer, aside, article { padding: 0; }

/* ---------------------------------------------
   Glass panels (with fallback)
   - Backdrop-filter powered glass panels
   - Fallback: solid translucent with higher opacity
---------------------------------------------- */
.glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255,255,255, 0.25);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(110%);
  -webkit-backdrop-filter: blur(12px) saturate(110%);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.4); }
}
@media (prefers-color-scheme: light) {
  .glass { background: rgba(255,255,255,0.92); border-color: rgba(0,0,0,0.08); }
}

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

/* ---------------------------------------------
   Core page typography & headings
---------------------------------------------- */
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.15; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(1.75rem, 4vw + 1rem, 3.5rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.75rem); margin-top: .5rem; }
p { margin: 0 0 1rem; color: var(--muted); font-size: clamp(0.95rem, 0.8vw + 0.95rem, 1.15rem); }

/* Links & emphasis accessibility */
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent); }
a:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------
   CTAs, buttons, links variants
---------------------------------------------- */
button, .btn, .cta { font: inherit; cursor: pointer; padding: .65rem 1rem; border-radius: 10px; border: 1px solid transparent; background: var(--accent); color: #001a2b; transition: transform .2s ease, background .2s ease, color .2s ease; display: inline-block; text-align: center; }
button[disabled], .btn[disabled], .cta[disabled] { opacity: .5; cursor: not-allowed; }
button:hover, .btn:hover, .cta:hover { background: color-mix(in oklab, var(--accent) 90%, black 10%); transform: translateY(-1px); }
button:active, .btn:active, .cta:active { transform: translateY(0); }
button:focus-visible, .btn:focus-visible, .cta:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* Outline variants */
.btn.secondary { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.35); }
.btn.secondary:hover { background: rgba(255,255,255,.08); }

/* ---------------------------------------------
   Content & sections
---------------------------------------------- */
.content { padding: 0.75rem 0 0; }

/* Product/ad style in footer */
.product-ad {
  display: grid; place-items: center;
  padding: .75rem; border-radius: 12px;
  border: 1px solid rgba(124, 154, 225, .45);
  background: rgba(15, 23, 42, 0.6);
  margin: 0.75rem 0;
  text-align: center;
  overflow: hidden;
}
.product-ad a { color: var(--text); text-decoration: none; display: block; padding: .5rem 0; }
.product-ad a:hover { text-decoration: underline; }

/* Simple list styling for ul/li with accessible contrast */
ul { margin: .75rem 0 1rem 1.25rem; color: var(--muted); }
li { margin: .25rem 0; }

/* Utility tags (for potential chips) */
.tag { display: inline-block; padding: .25rem .5rem; border-radius: 999px; font-size: .75rem; background: rgba(0,0,0,.25); color: #eaf6ff; border: 1px solid rgba(110,170,255,.4); }

/* ---------------------------------------------
   Print styles (basic readability)
---------------------------------------------- */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .glass { background: #fff; border: 1px solid #ccc; }
  .image-frame { page-break-inside: avoid; }
}

/* ---------------------------------------------
   Layout helpers
---------------------------------------------- */
.header, .footer { width: 100%; }

/* nav placeholder (not used in provided HTML, but kept for completeness) */
nav { display: none; }

/* Section wrappers for coherence with selectors list */
main { display: block; }

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

/* ---------------------------------------------
   Base element styling to honor selectors
---------------------------------------------- */
html, body, header, nav, main, article, footer, aside {
  /* Ensure they respond to layout defaults; no extra styling here to keep specificity lean. */
}

.container, .grid, .card, .tag {
  /* provide minimal defaults if these utilities are used elsewhere */
}
.container { padding-inline: 0; }

/* End of stylesheet */