/* Base tokens and primitives */
:root {
  --bg: #0b1020;
  --bg-2: #0a1b2e;
  --text: #eaf5ff;
  --muted: #a8b8d8;
  --accent: #7bd6ff;
  --accent-2: #5bd7ff;
  --card: rgba(255, 255, 255, .08);
  --card-border: rgba(255, 255, 255, .25);
  --shadow: 0 8px 20px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: clamp(14px, 1.2vw + 12px, 18px); }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    linear-gradient(135deg, rgba(11,18,32,.95), rgba(11,18,32,.65) 60%, rgba(11,18,32,.95)),
    repeating-linear-gradient(0deg, rgba(123,214,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(90deg, rgba(123,214,255,.04) 0 1px, transparent 1px 2px),
    #071426;
  background-blend-mode: normal, overlay, overlay, normal;
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Layout helpers */
.container { max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; padding: 0 1rem; }
.grid { display: grid; grid-gap: 1rem; }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Global typography tweaks */
h1, h2, h3 { color: var(--text); margin: .5rem 0; line-height: 1.12; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4vw + .5rem, 3.5rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.6rem, 2.5vw + 1rem, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2vw + .5rem, 1.4rem); }

/* Section semantics */
header, main, article, footer, aside { display: block; }

/* Image frame styling (guaranteed selectors) */
.image-frame, .featured-image { border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); background: #0a1220; }
.image-frame { aspect-ratio: 16 / 9; display: block; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.featured-image img { width: 100%; height: auto; display: block; }

/* Glassy panels with graceful fallback */
.article, .product-ad, .card, .content { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* Backdrop-filter support fallback (no blur if not supported) */
@supports not (backdrop-filter: blur(8px)) {
  .article, .product-ad, .card, .content { background: rgba(255,255,255,.12); }
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .article, .product-ad, .card, .content { background: rgba(255,255,255,.08); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}

/* Header / hero presentation */
header { text-align: center; padding: clamp(1rem, 3vw, 2rem) 0; }
header h1 { margin: 0.25rem 0 0.5rem; font-size: clamp(1.75rem, 4vw + .5rem, 3.5rem); line-height: 1.08; }
header .meta { color: var(--muted); font-size: 0.92rem; }

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

/* Content tweaks (content class for flexibility) */
.content { padding: 0.75rem 0; color: var(--text); }

/* Image frame depth & glow for emphasis */
.image-frame, .featured-image { outline: 0; }
.image-frame { box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.image-frame img, .featured-image img { display: block; }

/* Lists and prose readability */
ul, ol { padding-left: 1.25rem; margin: .5rem 0 1rem; }
li { margin: .25rem 0; }
p { margin: .5rem 0 1rem; }

/* Links and buttons (interactive states) */
a, button, .btn, .cta { color: var(--text); text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 4px; border-radius: 4px; }
button, .btn, .cta { background: rgba(123,214,255,.75); border: 1px solid rgba(255,255,255,.65); border-radius: 999px; padding: .58rem 1rem; font-weight: 600; }
.btn { background: linear-gradient(135deg, rgba(123,214,255,.95), rgba(120,180,255,.85)); color: #041a2e; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.btn--outline { background: transparent; color: var(--text); border-color: rgba(123,214,255,.85); }

/* Footer and inline sections (ads / badges) */
footer { padding: 1rem 0; text-align: center; color: var(--muted); }
.product-ad, .sponsored-page { display: inline-block; margin: .25rem; padding: .5rem 1rem; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.25); }
.product-ad a, .sponsored-page a { color: var(--text); }

/* Accessibility helpers for focus visibility on interactive elements within the layout */
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }

/* Print-friendly tweaks (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
  .image-frame, .product-ad { box-shadow: none; border: 1px solid #000; }
}
