/* Theme tokens */
:root{
  --bg: #0b0f14;
  --bg-2: #141722;
  --text: #e9e5ff;
  --muted: #b8b2c7;
  --accent: #8e5aff;
  --accent-2: #5e3bd3;
  --panel: rgba(255,255,255,.08);
  --panel-strong: rgba(255,255,255,.14);
  --border: rgba(255,255,255,.25);
  --shadow: 0 8px 24px rgba(0,0,0,.28);
  --focus: 2px solid var(--accent);
}

/* Reset & base */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.5;
  /* Layered background: gradient + subtle grid scanlines to evoke gray grid paper */
  background-image:
    linear-gradient(#0e111a, #0e111a),
    linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 100% 100%, 24px 100%, 100% 24px;
  background-position: 0 0, 0 0, 0 0;
  background-blend-mode: overlay, overlay, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Subtle motion surface */
  will-change: transform;
}

/* Motion preference */
@media (prefers-reduced-motion: reduce){
  html, body { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

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

/* Glass panel aesthetics for structural regions */
header, main, article, aside, footer {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) and not (-webkit-backdrop-filter: blur(12px)) {
  header, main, article, aside, footer { background: rgba(255,255,255,.15); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* Typography scale (fluid) */
h1 { font-size: clamp(1.8rem, 2.8vw + 1rem, 3.5rem); line-height: 1.08; margin: .25rem 0 0.5rem; font-weight: 700; }
header h1 { font-size: clamp(2rem, 4vw + 1rem, 4rem); }
article h1 { font-size: clamp(1.6rem, 2.5vw + 1rem, 3rem); }
p { color: var(--muted); font-size: clamp(1rem, 0.8vw + .9rem, 1.125rem); margin: 0 0 1rem; }
.meta { font-size: .9rem; color: #d9d2ea; opacity: .9; margin: .25rem 0 0; }

/* Featured image frame (supporting selector) */
.image-frame {
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15), 0 6px 18px rgba(0,0,0,.28);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Content and text blocks */
.content { color: var(--text); line-height: 1.6; padding: .25rem 0 1rem; }
ul, ol { margin: .5rem 0 1rem 1.15rem; color: var(--muted); }
li { margin: .25rem 0; }

/* Product ad area */
.product-ad { display: grid; gap: .5rem; text-align: left; padding: .75rem; }
.product-ad h3 { margin: 0; font-size: 1.05rem; }
.product-ad a { text-decoration: none; display: block; color: var(--text); padding: .5rem 0; }
.product-ad a:hover { text-decoration: underline; }

/* Link, button, CTA styling (interactive states) */
a, button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
a:focus-visible { outline: 3px solid color-m-mix(in srgb, var(--accent), white 0%); outline-offset: 2px; }

button, .btn, .cta {
  font: inherit; font-weight: 600;
  border-radius: 8px; border: 1px solid transparent;
  padding: .65rem 1rem; line-height: 1.1; display: inline-block;
  text-decoration: none; color: #fff; background: var(--accent);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn { background: var(--accent); }
.btn:hover { background: shade(var(--accent) 20%); } /* simple hover hint (fallback) */
.btn:active { transform: translateY(1px) scale(.99); }
.btn-outline, .cta { background: transparent; color: var(--text); border: 1px solid rgba(142,90,255,.8); }
.btn-outline:hover, .cta:hover { background: rgba(142,90,255,.15); }
.btn:focus-visible, .cta:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Lists visuals (cohesive with theme) */
ul, ol { padding-left: 1.1rem; }

/* Utility & minimal layout helpers */
.card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: .9rem; }

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

/* Accessibility defaults for focus (extra robust) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Structural element styling (ensuring selectors exist per requirement) */
html, body, header, nav, main, article, aside, footer { scroll-behavior: smooth; }
nav { display: block; }

/* Page framing helpers (to work with potential content) */
.main-wrap { padding: 1rem; }

/* End of stylesheet */