/* Base tokens (gray/indigo-inspired palette) */
:root {
  --bg: #0b0f14;
  --bg-2: #141824;
  --surface: rgba(18, 22, 36, 0.65);
  --surface-2: rgba(28, 34, 60, 0.65);
  --text: #eaf0ff;
  --muted: #aab6cc;
  --accent: #4c6fff;
  --accent-2: #8fa4ff;
  --card: rgba(18, 22, 38, 0.65);
  --outline: rgba(140, 160, 255, 0.5);
  --radius: 14px;
  --shadow: 0 10px 25px rgba(0,0,0,.28);
  --shadow-soft: 0 6px 18px rgba(0,0,0,.22);
  --focus: 2px solid #fff;
}

/* Section headers only: concise, production-ready layout */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 15% -10%, rgba(110,140,255,.14), transparent 40%),
              radial-gradient(circle at 90% 0%, rgba(80,100,200,.10), transparent 40%),
              linear-gradient(135deg, #0a0f14 0%, #111522 60%, #0a0f14 100%);
  background-attachment: fixed;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 4px 4px;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
  opacity: 0.6;
}

/* Layout helpers */
.container { width: min(1100px, 92%); margin: 0 auto; padding: 0 0.5rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--outline); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-soft); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tag { display: inline-block; padding: .25em .5em; font-size: .75rem; border-radius: 999px; background: rgba(76,111,255,.28); color: #eaffff; border: 1px solid rgba(140,160,255,.6); }

/* Core layout regions (must style these) */
html, body, header, nav, main, article, footer, aside {
  /* kept lean; individual element styles below */
}
header {
  padding: clamp(1.25rem, 4vw, 2.75rem) 1rem;
  text-align: center;
  margin: 1rem auto;
  max-width: 1100px;
  border-radius: 16px;
  background: rgba(14, 18, 32, 0.65);
  border: 1px solid rgba(140,160,255,.42);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
header h1 {
  margin: 0.25rem 0 0.5rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: .2px;
  color: #f1f5ff;
}
header .meta { color: var(--muted); font-size: clamp(.9rem, 1.2vw, 1.05rem); }

/* Navigation styling (accessible focus) */
nav { margin-top: .5rem; }
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .35rem .65rem;
  border-radius: 6px;
  border: 1px solid rgba(140,160,255,.45);
  background: rgba(255,255,255,.02);
}
nav a:hover, nav a:focus-visible { text-decoration: underline; outline: none; }

/* Main content */
main { padding: 1rem; }
article { max-width: 1100px; margin: 0 auto; padding: 0 0.5rem; }

/* Image framing (forward-compatible with .image-frame usage) */
.image-frame, .featured-image { border-radius: 12px; overflow: hidden; border: 1px solid rgba(140,160,255,.45); background: #11131b; }
.image-frame { aspect-ratio: 16 / 9; display: block; }
.image-frame img, .featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Typography scale and readability */
h2 { font-size: clamp(1.25rem, 2.6vw, 1.75rem); margin: .75rem 0 .5rem; color: #e9eeff; }
h3 { font-size: clamp(1.05rem, 2vw, 1.3rem); margin: .6rem 0; }
p, li { color: #e8edff; }
ul, ol { padding-left: 1.25rem; }
li { margin: .25rem 0; }

/* Blockquotes and emphasis for contrast on glass */
blockquote { margin: 1rem 0; padding: .5rem 1rem; border-left: 3px solid var(--accent); color: var(--muted); background: rgba(9,12,22,.4); border-radius: 6px; }

/* Footer blocks: glass panels for ads/sections */
footer { padding: 1rem; display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: stretch; }
.product-ad, .sponsored-page { background: rgba(18, 22, 38, 0.65); border: 1px solid rgba(140,160,255,.4); border-radius: 12px; padding: .75rem; text-align: center; box-shadow: var(--shadow-soft); }
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: inline-block; padding: .35rem .6rem; border-radius: 6px; border: 1px solid rgba(140,160,255,.6); }
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Link/button styles (WCAG AA focus visibility) */
a, button, .btn, .cta {
  outline: none;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
a:hover { text-decoration: underline; }

/* Buttons (solid and outline variants) */
.btn {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(140,160,255,.6);
  background: linear-gradient(to bottom, rgba(76,111,255,.95), rgba(60,90,255,.92));
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 6px 14px rgba(60,90,210,.6);
}
.btn:hover { transform: translateY(-1px); }
.btn.secondary {
  background: transparent;
  color: var(--accent-2);
  border: 1px solid rgba(140,160,255,.6);
  box-shadow: none;
}
.cta { cursor: pointer; }

/* Glass panel fallback for no-backdrop-filter support */
@supports not (backdrop-filter: blur(1px)) {
  .card, header, .product-ad, .sponsored-page, footer {
    background: rgba(18, 26, 46, 0.85);
    border: 1px solid rgba(140,160,255,.5);
  }
}

/* Layout responsiveness */
@media (min-width: 700px) {
  footer { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .container { padding: 0 1rem; }
  article { padding: 0 0.5rem; }
  header { text-align: left; padding: 2rem; }
  header h1 { font-size: clamp(2rem, 3vw + 1rem, 3.25rem); }
}

/* Print styles for readability */
@media print {
  body { background: white; color: black; }
  header, main, footer { background: none; box-shadow: none; border: none; }
  a, a:visited { text-decoration: underline; color: black; }
}
 
/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}