/* Base tokens */
:root {
  --bg: #0a0f1a;
  --bg-2: #0b1b2f;
  --text: #e9fbff;
  --muted: #a5c6d9;
  --accent: #7bd0ff;
  --accent-2: #a6e0ff;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --focus: 3px solid rgba(123, 208, 255, 0.9);
}

/* Reset + helpers */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(9,12,25,0.95) 0%, rgba(6,12,26,0.95) 60%, rgba(9,12,25,0.95) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 2px);
  background-blend-mode: overlay;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color-scheme: dark;
}
img { max-width: 100%; display: block; }

/* Layout helpers */
.container { width: 100%; max-width: clamp(640px, 90vw, 1200px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }

/* Glass panels (with backdrop-filter as default; fallback via color) */
.glass, .panel, header, footer { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.glass { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }

/* Header / hero styling */
header {
  padding: clamp(14px, 4vw, 28px);
  text-align: center;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, rgba(0,0,0,0.18), rgba(0,0,0,0.08) 60%), transparent;
  border-bottom: 1px solid rgba(255,255,255,0.25);
}
header h1 {
  margin: 0 0 .25rem;
  font-size: clamp(1.6rem, 1.4rem + 2vw, 3rem);
  line-height: 1.15;
}
header .meta {
  margin: 0;
  font-size: clamp(0.9rem, 0.4vw + 0.9rem, 1.05rem);
  color: var(--muted);
}
nav {
  margin-top: .75rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .35rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(123, 208, 255, 0.6);
  transition: transform .2s ease, background-color .2s ease;
}
nav a:hover { background: rgba(123,208,255,0.15); transform: translateY(-1px); }
nav a:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* Hero image frame */
.image-frame, .featured-image {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  background: #000;
}
.image-frame img, .featured-image img {
  width: 100%; height: auto; display: block; object-fit: cover;
}
@media (min-width: 640px) {
  .image-frame, .featured-image { aspect-ratio: 16 / 9; }
}
main { padding: 1rem 0 2rem; }

/* Content typography and structure */
.content { padding: 0.5rem 0 0; }
h2, h3 { margin: 1.2rem 0 0.6rem; line-height: 1.25; color: var(--text); }
p { margin: 0.6rem 0; color: rgba(233,251,255,0.95); }
ul { padding-left: 1.25rem; margin: 0.6rem 0; color: rgba(233,251,255,0.95); }
li { margin: 0.25rem 0; }

/* Quotes and emphasis */
blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid rgba(123,208,255,0.75);
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  color: var(--text);
}
blockquote footer { font-size: .9em; color: var(--muted); }

/* Links and CTAs */
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; }
.btn, .cta { display: inline-block; font-weight: 600; border-radius: 999px; padding: .75em 1.25em; border: 1px solid rgba(123,208,255,0.9); cursor: pointer; text-align: center; transition: transform .2s ease, background-color .2s ease, color .2s ease; }
.btn { background: linear-gradient(to bottom right, #7bd0ff, #4aaee8); color: #001018; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid rgba(123,208,255,0.9); outline-offset: 2px; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid rgba(123,208,255,0.9); }
.btn-outline:hover { background: rgba(123,208,255,0.15); }

/* Utility components */
.tag {
  display: inline-block;
  padding: 0.15em 0.5em;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid rgba(123,208,255,0.6);
  background: rgba(123,208,255,0.15);
  color: #eafaff;
}
ul ul { margin-left: 1rem; }

/* Footer / product ads */
footer {
  padding: clamp(12px, 4vw, 20px);
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: stretch;
  border-top: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.08);
}
.product-ad, .sponsored-page {
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform .2s ease;
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; }
.product-ad:hover, .sponsored-page:hover { transform: translateY(-2px); }

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

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