/* Section: Tokens & Base */
:root {
  --bg: #0b1020;
  --bg-2: #0a0f2a;
  --surface: rgba(12, 16, 40, 0.6);
  --text: #eaf4ff;
  --muted: #aab6d8;
  --accent: #5b6aff;
  --accent-2: #7c8aff;
  --glass: rgba(18, 24, 60, 0.28);
  --border: rgba(120, 140, 255, 0.40);
  --focus: 0 0 0 3px rgba(100, 120, 255, 0.75);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  --radius: 14px;
  --radius-sm: 10px;
  --gap: 1rem;
}

/* Section: Global reset & layout */
* { box-sizing: border-box; }
html, body { height: 100%; }
html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  line-height: 1.55;
  font-size: clamp(14px, 0.9vw + 12px, 16px);
  background: 
    linear-gradient(135deg, rgba(9,12,30,.95) 0%, rgba(9,12,30,.92) 60%, rgba(9,12,30,.95) 100%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% -10%, rgba(60,0,180,.15), transparent 30%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { -webkit-tap-highlight-color: transparent; }

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

/* Section: Base components */
header, main, footer, aside { display: block; }

/* Section: Header & hero */
header { padding: 2rem 1rem; text-align: center; position: relative; }
header h1 { font-size: clamp(1.8rem, 3vw + 1rem, 3rem); margin: .25rem 0 .25rem; color: #eaf4ff; text-shadow: 0 0 12px rgba(90,110,255,.6); }
header .meta { color: var(--muted); font-size: clamp(.8rem, 0.5vw + .8rem, 1rem); margin-top: .25rem; }

/* Section: Content typography */
article { padding: 0; margin: 0 auto; }
h2 { font-size: clamp(1.25rem, 2vw + 1rem, 1.9rem); margin: .75rem 0; color: #e7f0ff; }
p { color: #dbe7ff; margin: .75rem 0; }
blockquote { margin: .75rem 0; padding: .5rem 1rem; border-left: 3px solid var(--accent); color: #e6f0ff; background: rgba(10,15,40,.4); border-radius: 6px; }
ul { padding-left: 1rem; margin: .75rem 0; }
ul li { margin: .25rem 0; padding-left: .5rem; color: #e5edff; }
ul li:before { content: "•"; color: var(--accent); display: inline-block; width: 1em; margin-left: -1em; }

/* Section: Image frames (required selectors) */
.image-frame, .featured-image { width: 100%; display: block; overflow: hidden; border-radius: 12px; border: 1px solid rgba(120,140,255,.4); background: #0b1020; }
.image-frame { aspect-ratio: 16/9; }
.featured-image { aspect-ratio: 16/9; }
.image-frame img, .featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Glass panels (with fallback) */
.glass, .content { background: rgba(18,24,60,0.28); border: 1px solid rgba(120,140,255,0.40); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 1rem; }
.content { padding: 1rem; }

/* Section: Product ad / footer blocks */
.product-ad { display: block; padding: 1rem; margin: 1rem 0; background: rgba(11,16,40,.6); border: 1px solid rgba(100,120,255,.45); border-radius: 12px; text-align: center; }
.product-ad a { color: var(--text); text-decoration: none; display: block; padding: .5rem; }
.product-ad a:hover { text-decoration: underline; }

/* Section: Link & button styles (interactive states) */
a, button, .btn, .cta { color: var(--text); text-decoration: none; border: none; background: transparent; cursor: pointer; }
a { color: var(--accent); }
a:hover, a:focus { text-decoration: underline; outline: none; }
a:focus-visible { outline: 0; box-shadow: var(--focus); border-radius: 4px; }

/* Primary button variant */
.btn { display: inline-block; padding: .75rem 1.25rem; border-radius: 999px; background: var(--accent); color: white; font-weight: 600; border: 1px solid rgba(120,140,255,.6); box-shadow: 0 6px 14px rgba(40,40,120,.4); transition: transform .2s ease, background .2s ease; }
.btn:hover { background: #7a8aff; transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(100,120,255,.75); }

/* Outline-like CTA variant */
.cta { padding: .6rem 1rem; border-radius: 999px; border: 1px solid var(--border); background: rgba(20,24,60,.5); font-weight: 600; }

/* Section: Misc helpers (cards, tags) */
.card { background: rgba(14,20,60,.55); border: 1px solid rgba(100,120,255,.4); border-radius: var(--radius-sm); padding: 1rem; }
.tag { display: inline-block; padding: .25em .6em; font-size: .75rem; border-radius: 999px; background: rgba(90,120,255,.25); color: #eaf0ff; border: 1px solid rgba(120,140,255,.5); }

/* Section: Layout refinements for larger screens */
@media (min-width: 700px) {
  .container { padding-inline: 2rem; }
  header { padding: 3rem 2rem; }
}

/* Section: Color scheme adapts to light mode */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7faff;
    --bg-2: #eef5ff;
    --text: #0b1220;
    --muted: #4b5563;
    --glass: rgba(255,255,255,.85);
    --border: rgba(30,60,180,.25);
  }
  html, body { background: linear-gradient(#fff, #f7faff); color: var(--text); }
  .image-frame { border-color: rgba(60,100,255,.6); }
  blockquote { background: rgba(12,20,60,.05); }
}

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

/* Section: Print styles */
@media print {
  html, body { background: white; color: black; }
  a { text-decoration: underline; }
}