/* Base tokens */
:root {
  --bg: #0b0f14;
  --bg-2: #141822;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --text: #e8f0ff;
  --muted: #a6b3c9;
  --accent: #4df0ff;
  --accent-2: #a6ffcc;
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 28px rgba(0,0,0,.45);
  --radius: 12px;
  --focus: 2px solid var(--accent);
}

/* Global reset and layout helpers */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif; line-height: 1.5; }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  /* Layered background: gradient + subtle scanlines/noise (pure CSS) */
  background:
    linear-gradient(135deg, rgba(8,12,20,0.95) 0%, rgba(18,22,34,0.95) 60%, rgba(6,9,14,0.95) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Accessibility: respect reduced motion preference for any transforms/animations */
  transition: background-color 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  :root, * { animation: none !important; transition: none !important; }
}

/* Structural panels (glass-like with fallback) */
header, main, article, aside, footer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* Fallback for environments without backdrop-filter */
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, article, aside, footer { background: rgba(255,255,255,0.14); }
}

.container { width: min(92vw, 1200px); margin-inline: auto; padding-inline: 0.75rem; }

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

/* Content and typography */
.content { color: var(--text); font-size: clamp(1rem, 0.95vw + 0.6rem, 1.125rem); line-height: 1.6; }
h1, h2, h3 { color: var(--text); margin: 0.25rem 0 0.5rem; }
h1 { font-size: clamp(2rem, 3vw + 1rem, 3.5rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.5rem, 2.5vw + .5rem, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1.6vw + .4rem, 1.4rem); font-weight: 600; }

/* Image framing (primary hero image) */
.image-frame, .featured-image {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.image-frame { aspect-ratio: 16/9; display: block; width: 100%; }
.image-frame img, .featured-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  /* subtle glow for depth on images */
  filter: saturate(1.02);
  outline: 1px solid rgba(255,255,255,.15);
}

/* Support for the provided class in HTML (.featured-image) */
.featured-image { border-radius: 12px; overflow: hidden; }

/* Content area sizing and alignment */
.main-content { padding-block: 0.75rem; }

/* Product ad panel */
.product-ad {
  display: block;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(255,255,255,.28);
  color: var(--text);
}
.product-ad h3 { margin: 0 0 0.5rem; font-size: 1.1rem; display: inline-block; }
.product-ad a { display: inline-block; padding: .5rem 0.75rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.14); color: var(--text); text-decoration: none; }
.product-ad a:hover { text-decoration: none; background: rgba(255,255,255,.22); }

/* Links and interactive controls */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
:focus-visible { outline: var(--focus); outline-offset: 2px; border-radius: 6px; }

/* Button variants */
.btn {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.18);
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: rgba(255,255,255,.25); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Outline variant for buttons */
.btn--outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.65);
}
.btn--outline:hover { background: rgba(255,255,255,.08); }

/* Call-to-action helper class for emphasis */
.cta {
  display: inline-block;
  padding: .6rem .9rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: rgba(0,0,0,0.18);
}
.cta:hover { text-decoration: underline; }

/* List styling */
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Decorative tags/badges */
.tag {
  display: inline-block;
  padding: .15em .5em;
  border-radius: 999px;
  font-size: .75rem;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(125, 255, 255, 0.15);
  color: var(--text);
}

/* Header/Meta tweaks to fit compact layout */
header { margin: 0 auto 1rem; padding: 1rem; text-align: left; }
header h1 { margin: 0 0 .25rem; font-weight: 700; }
header .meta { color: var(--muted); font-size: .95rem; margin-top: .25rem; }

/* Page wrappers and semantic sizing */
main { padding: 1rem 0; }
footer { padding: 1rem; margin-top: 1rem; }

/* Print styles (small but readable) */
@media print {
  body { background: #fff; color: #000; }
  header, main, article, aside, footer { background: transparent; border: none; box-shadow: none; }
  a { text-decoration: underline; }
}
