/* Layout & Theme: Future cyberpunk, glassy, high-contrast */

:root{
  --bg: #0b1a3a;
  --bg-2: #0a1b4f;
  --text: #e8f0ff;
  --muted: #a6b6d6;
  --accent: #00ffff; /* ultraviolet cyan */
  --accent-2: #a400ff; /* ultraviolet violet */
  --glass: rgba(255,255,255,.08);
  --glass-strong: rgba(255,255,255,.14);
  --glass-border: rgba(255,255,255,.28);
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  --radius: 12px;
}

html, body, header, nav, main, article, aside, footer {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  line-height: 1.6;
  background-image:
    radial-gradient(circle at 2px 2px, rgba(0, 200, 255, .25) 2px, transparent 3px),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 60%, var(--bg) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-size: 22px 22px, 100% 100%, auto;
  background-blend-mode: overlay, normal, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  min-height: 100%;
}

/* Subtle polka dots (co cobalt overlay) on a gradient base */
body {
  background-position: 0 0, 0 0, 0 0;
  background-attachment: fixed;
  color-scheme: dark;
}

/* Dark glass panels with fallback */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass {
    background: rgba(255,255,255,.92);
    color: #041020;
  }
}

/* Global typography & utilities */
.container {
  width: 100%;
  max-width: clamp(680px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: rgba(18, 26, 60, 0.42);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .25s ease, background .25s ease;
}
.card:hover { transform: translateY(-2px); background: rgba(18,26,60,0.55); }

.tag {
  display:inline-block;
  padding: .25em .6em;
  border-radius: 999px;
  font-size: .75rem;
  border: 1px solid rgba(255,255,255,.32);
  background: rgba(0,0,0,.25);
  color: #eaffff;
}

.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: inset 0 0 12px rgba(0,0,0,.25);
  margin: 1rem 0;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Layout element selectors to satisfy requirements */
html { }
body { }
header { text-align: center; padding: 2.25rem 1rem 1rem; }
nav { display: none; }
main { padding: 0 0 2rem; }
article { padding: 0 0 2rem; }

/* Content article styles */
h1, h2, h3 { margin: .75rem 0 .25rem; font-weight: 700; letter-spacing: .2px; }
h1 { font-size: clamp(1.75rem, 2.5vw + 1rem, 4rem); line-height: 1.05; color: #fff; text-shadow: 0 6px 24px rgba(0,0,0,.45); }
h2 { font-size: clamp(1.25rem, 1.6vw + 1rem, 2.5rem); color: #eaffff; }
h3 { font-size: clamp(1.05rem, 1vw + .9rem, 1.4rem); color: #eaffff; }
p { color: #eaf3ff; margin: .6rem 0 1rem; }

/* Lists */
ul { padding-left: 1.25rem; margin: .75rem 0; }
li { margin: .35rem 0; }

/* Content container for article text (when used) */
.content {
  font-size: clamp(1rem, 0.4vw + 0.92rem, 1.125rem);
  line-height: 1.6;
  color: var(--text);
}

/* Buttons & links (a, button, .btn, .cta) */
a, button, .btn, .cta {
  color: #fff;
  text-decoration: none;
  outline: none;
  transition: all .2s ease;
}
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.btn {
  display: inline-block;
  padding: .6em 1.1em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.25);
  color: #fff;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); background: rgba(0,0,0,.35); }
.btn.primary {
  background: linear-gradient(135deg, rgba(0,210,255,.95), rgba(170,0,255,.95));
  border: none;
  box-shadow: inset 0 0 6px rgba(255,255,255,.15);
}
.btn.outline {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.4);
}
.cta { padding: .5em 1em; border-radius: 999px; }

/* Section-specific (product ad) styles */
.product-ad {
  padding: .9rem 1rem;
  margin: .5rem 0;
}
.product-ad a {
  display: block;
  padding: .5rem 0;
  color: #fff;
}
.sponsored-page {
  padding: .9rem 1rem;
  margin: .5rem 0;
}
.sponsored-page a { display: block; padding: .5rem 0; color: #fff; }

/* Footer & sections */
footer {
  padding: 2rem 1rem;
  border-top: 1px solid rgba(255,255,255,.15);
  background: rgba(2,6,23,.6);
}
footer p { margin: .25rem 0; color: var(--muted); }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { padding: 0; }
  a { text-decoration: underline; }
}

/* Responsive & motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}

/* Accessibility helpers (contrast) */
@media (prefers-color-scheme: light) {
  :root { --text: #0a1220; --muted: #485067; }
  .glass { background: rgba(255,255,255,.92); color: #041020; }
}
