/* Tokens & Theme */
:root {
  --bg: #0a0a0f;
  --bg-2: #11141a;
  --surface: rgba(255, 255, 255, 0.10);
  --surface-2: rgba(255, 255, 255, 0.18);
  --text: #e8eefc;
  --muted: #a6acbc;
  --accent: #4cc9f0;     /* cyber-cyan */
  --accent-2: #c6fffa;    /* silver-green tilt for contrast */
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 28px rgba(0,0,0,.55);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 2px solid #7bd7ff;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-2: rgba(255, 255, 255, 0.16);
  --print-black: #000;
  --print-white: #fff;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fb;
    --bg-2: #eef2f8;
    --surface: rgba(20, 20, 28, 0.08);
    --surface-2: rgba(20, 20, 28, 0.20);
    --text: #0b1020;
    --muted: #495067;
    --accent: #0056b3;
    --accent-2: #007a5e;
    --border: rgba(0,0,0,.25);
  }
}

/* Section: Base & Layout Helpers */
html, body {
  height: 100%;
}
html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { position: relative; }

header, nav, main, article, aside, footer {
  display: block;
}

/* Layered background: gradient + checkerboard + subtle noise (pure CSS) */
body {
  /* base surface gradient */
  background: linear-gradient(180deg, var(--bg), var(--bg-2) 60%, var(--bg) 100%);
  /* silver checkerboard overlay (subtle) */
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.08) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 0, 0 0, 0 0;
  min-height: 100%;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  /* noise overlay (subtle) */
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 2px 2px;
  opacity: 0.25;
  mix-blend-mode: overlay;
}

/* Container & grid utilities */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
}
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}
@supports not (backdrop-filter: blur(12px)) {
  .card { background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.25); }
}
.tag {
  display: inline-block;
  padding: .15em .5em;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text);
  background: rgba(76,201,240,.22);
  border: 1px solid rgba(76,201,240,.4);
}

/* Typography scale (fluid) */
h1, h2, h3 {
  margin: 0.25em 0;
  line-height: 1.15;
}
h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
  letter-spacing: .2px;
}
h2 {
  font-size: clamp(1.25rem, 2.5vw + .5rem, 2rem);
}
p {
  margin: 0 0 1rem;
  font-size: clamp(0.95rem, 1.4vw + .2rem, 1.15rem);
  line-height: 1.5;
  color: var(--text);
}
blockquote {
  margin: .75rem 0;
  padding: .75rem 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(0,0,0,.25);
  border-radius: 6px;
}
ul { padding-left: 1.25rem; margin: .5rem 0 1rem; }
li { margin: .25rem 0; }

/* Imagery styling */
.image-frame, .featured-image {
  display: block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 22px rgba(0,0,0,.5);
  background: #000;
}
.image-frame { aspect-ratio: 16/9; }
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transition: transform .4s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Content wrapper (as required selector) */
.content { padding: 1rem 0; }

/* Navigation/presentational blocks */
header {
  text-align: center;
  padding: 2rem 0 1rem;
}
header h1 { font-weight: 700; color: var(--text); text-shadow: 0 1px 0 rgba(0,0,0,.4); }
header .meta {
  color: var(--muted);
  font-size: .95rem;
  margin-top: .25rem;
}

/* Main layout */
main { padding: 1rem 0 2rem; }
article { display: block; }

/* Glass panels & surfaces */
.has-glass { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }

/* Product advertising / footer panels */
.product-ad {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: .5rem;
  border-radius: var(--radius-sm);
  margin: .5rem 0;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.25);
}
.product-ad a {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
  padding: .75rem 1rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
}
.product-ad a p { margin: 0; }

/* Interactive controls (buttons/links) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-weight: 600;
  transition: transform .15s ease, background .3s ease, border-color .3s ease;
}
.btn.primary {
  background: linear-gradient(135deg, rgba(76,201,240,.95), rgba(0,198,199,.95));
  border: 1px solid rgba(255,255,255,.75);
  color: #041018;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

a.btn { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Focus & accessibility */
:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
a:focus-visible, button:focus-visible {
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Layout utilities for responsive sections */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (min-width: 900px) {
  header { padding: 2.5rem 0 1.25rem; }
  main { padding: 2rem 0 2.5rem; }
}
@media print {
  body { background: var(--print-white); color: var(--print-black); }
  a { text-decoration: underline; }
}
