/* Section: Tokens */
:root {
  --glass-alpha: 0.14;
  --bg: #0b0e1a;
  --bg-2: #0a1020;
  --text: #eaf4ff;
  --muted: #a8b6e8;
  --accent: #FF6A00;      /* Sunset orange */
  --accent-2: #4169E1;     /* Royal blue */
  --card: rgba(255,255,255,0.12);
  --card-border: rgba(255,255,255,0.28);
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  --radius: 14px;
  --focus: 2px solid rgba(65,105,225,.95);
  --text-contrast: #eaf4ff;
  --chip: rgba(65,105,225,.25);
}

/* Section: Base & Layout Helpers */
* { box-sizing: border-box; }

/* Typography & root layout */
html, body { height: 100%; }
html, body { margin: 0; padding: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; color: var(--text); font-size: clamp(14px, 0.5vw + 12px, 16px); line-height: 1.5; background: #0b0e1a; }

/* Layered background: gradient + subtle film/noise via CSS only */
body {
  background: linear-gradient(135deg, #0b0e1a 0%, #0a1020 60%, #0a1020 100%), 
              linear-gradient(to bottom right, rgba(255,106,0,.08), rgba(65,105,225,.08));
  background-blend-mode: normal, overlay;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* subtle scanlines */
  background-image: linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px),
                    linear-gradient(to right, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 100% 3px, 3px 100%;
  opacity: .6;
  mix-blend-mode: overlay;
}

/* Section: Global helpers */
.container { width: 100%; max-width: clamp(320px, 92vw, 1100px); margin-inline: auto; padding-inline: 1rem; }

/* Section: Glass panels (with accessible fallback) */
:root { --glass-alpha: 0.14; }
header, main, footer { z-index: 1; }

/* Header (glass panel) */
header {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem auto;
  max-width: 1100px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
header h1 {
  font-size: clamp(1.6rem, 1.2vw + 1.4rem, 3rem);
  margin: 0 0 .25rem;
  line-height: 1.08;
  color: var(--text-contrast);
  text-shadow: 0 0 8px rgba(65,105,225,.9);
}
header .meta { color: var(--muted); font-size: 0.8rem; margin-top: .25rem; }

/* Nav styling */
nav { margin-top: .25rem; }
nav a {
  color: var(--accent-2);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 6px;
  display: inline-block;
}
nav a:hover, nav a:focus-visible { text-decoration: underline; }
nav a:focus-visible { outline: 2px solid rgba(65,105,225,.95); outline-offset: 2px; }

/* Main content area */
main { padding: 1rem 0; }

/* Article content */
article { padding: 0 0 1rem; }

/* Feature image wrapper (image-frame compatibility) */
.featured-image { border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); box-shadow: 0 10px 22px rgba(0,0,0,.25); margin: 1rem 0; }

/* Optional image-frame utility (kept for selectors) */
.image-frame { aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Typography hierarchy */
h2 { font-size: clamp(1.4rem, 1vw + 1rem, 2rem); margin: .75rem 0 .5rem; color: var(--text-contrast); }
h3 { font-size: clamp(1.05rem, .8vw + .8rem, 1.25rem); margin: .75rem 0 .35rem; color: #e2eaff; }
p { margin: 0 0 1rem; color: #e9f4ff; }

/* Lists & blocks */
ul { margin: .25rem 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }
blockquote { margin: 1rem 0; padding: .75rem 1rem; border-left: 3px solid var(--accent-2); background: rgba(65,105,225,.08); border-radius: 6px; color: #e8f0ff; }

/* Footer / ad blocks */
footer { padding: 1rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; align-items: start; }
.product-ad, .sponsored-page { padding: .75rem; text-align: center; border-radius: 12px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); }
footer p { grid-column: 1 / -1; text-align: center; color: var(--muted); margin: 0.75rem 0 0; }

/* Utility tokens */
.tag { display:inline-block; padding: .15rem .5rem; font-size: .75rem; border-radius: 999px; background: rgba(65,105,225,.25); color: #e6f0ff; }

/* Buttons & links (interactive elements) */
.btn, button, a.btn, .cta {
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
}
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  padding:.6rem 1rem; border-radius:999px;
  border:1px solid rgba(65,105,225,.8);
  background: var(--accent-2);
  color:#fff; cursor: pointer;
  transition: transform .15s ease, background .15s;
}
.btn:hover { transform: translateY(-1px); background: #315bd0; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid rgba(65,105,225,.95); outline-offset: 2px; }

/* Outline variant for emphasis */
.btn-outline {
  background: transparent;
  border:1px solid rgba(65,105,225,.8);
  color: var(--text);
  padding: .6rem 1rem;
}
.btn-outline:hover { background: rgba(65,105,225,.15); }

/* Link treatment with accessible focus */
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid rgba(65,105,225,.95); outline-offset: 2px; }

/* Glass fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(12px)) {
  header { background: rgba(255,255,255,.25); backdrop-filter: none; }
  .glass { background: rgba(255,255,255,.25); }
}

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

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

/* Section: minor content width control (content container) */
.content { max-width: 60ch; }

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