/* Base palette & utilities */
:root {
  --bg: #0a0f1e;
  --bg-2: #0b1a3a;
  --surface: rgba(255,255,255,.08);
  --surface-2: rgba(255,255,255,.14);
  --border: rgba(255,255,255,.28);
  --text: #eaf3ff;
  --muted: #b9c6e6;
  --accent: #4f6bff;
  --accent-2: #87b0ff;
  --shadow: 0 6px 20px rgba(0,0,0,.25);
}

html, body, header, nav, main, article, footer, aside {}

/* Layout & background (layered gradient + indigo dot pattern) */
html, body {
  height: 100%;
}
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.6;
  background:
    linear-gradient(135deg, rgba(12,18,42,.95), rgba(4,16,40,.95)),
    radial-gradient(circle at 20px 20px, rgba(90,120,255,.25) 2px, transparent 2px) 0 0 / 40px 40px,
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Glassy surfaces */
article, .product-ad, header {
  background: rgba(255,255,255,.04);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.featured-image, .image-frame {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.04);
  box-shadow: inset 0 0 12px rgba(0,0,0,.25);
}
.image-frame { aspect-ratio: 16/9; }

/* Image handling (frame + image) */
.image-frame img, .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Structural layout */
.container { width: 100%; max-width: clamp(720px, 90vw, 1100px); margin: 0 auto; padding: 0 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .9rem; box-shadow: 0 6px 14px rgba(0,0,0,.15); }
.tag { display:inline-block; padding:.25rem .5rem; border-radius:999px; background: rgba(90,120,255,.25); border:1px solid rgba(120,170,255,.6); color:#e8f0ff; font-size:.75rem; }

/* Typography & headings */
h1, h2, h3 { margin: 0 0 .5rem; color: #eaf3ff; }
h1 { font-size: clamp(1.75rem, 4vw + .5rem, 3.5rem); line-height: 1.08; font-weight: 800; letter-spacing: .2px; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
h2 { font-size: clamp(1.4rem, 2vw + 1rem, 2.2rem); margin-top: .8rem; }
h3 { font-size: clamp(1.05rem, 1.6vw + .8rem, 1.3rem); margin-top: .9rem; }

/* Content & text rhythm */
main { padding: 1rem; }
article { max-width: 980px; margin: 0 auto; padding: 1rem; }

/* Paragraphs & lists */
p { font-size: clamp(1rem, .8vw + .9rem, 1.125rem); color: #e6f0ff; margin: .6rem 0; }
ul { margin: .6rem 0 1rem 1.1rem; padding: 0; }
li { margin: .25rem 0; }
blockquote { margin: .75rem 0; padding: .6rem 1rem; border-left: 3px solid var(--accent); color: #d9e6ff; background: rgba(255,255,255,.04); }

/* Footer & product ad (glass panel) */
footer { padding: 1rem; text-align: center; }
.product-ad { padding: .9rem; margin: .5rem 0; border-radius: 12px; border:1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.product-ad h3 { margin: 0 0 .25rem; font-size: 1.05rem; }

/* Links & buttons (accessibility) */
a, button, .btn, .cta {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
a:hover { text-decoration: underline; color: var(--accent-2); }
.btn, .cta {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: linear-gradient(#4f6bff, #355efe);
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1;
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.4);
}
.btn:hover, .cta:hover { transform: translateY(-1px); filter: brightness(1.02); }

/* Focus states (WCAG AA-ish) */
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: transparent;
}
a:focus-visible { text-decoration: underline; }

/* Images callouts (handle both classes for compatibility) */
.image-frame, .featured-image { display: block; }

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

/* Print */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
  .image-frame, .featured-image { border: none; box-shadow: none; }
  article { background: none; border: none; }
}