:root {
  /* Palette: cyan + gray, layered for accessibility and contrast */
  --bg: #0b111a;
  --bg-2: #0a1620;
  --bg-3: #0e2a34;
  --text: #e9fbff;
  --muted: #a9b9c9;
  --accent: #14e6ff;
  --accent-2: #7feaff;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glow: rgba(0, 255, 255, 0.25);
}

html, body {
  height: 100%;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial;
  font-size: clamp(14px, 1.2vw + 12px, 18px);
  line-height: 1.6;
  background: 
    linear-gradient(135deg, rgba(6,18,28,.88), rgba(4,12,20,.92) 60%, rgba(6,12,20,.95)),
    linear-gradient(to bottom right, rgba(0, 255, 255, .04), rgba(0,0,0,.08)),
    repeating-linear-gradient(0deg, rgba(0,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
}

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

/* Layout containers */
.container {
  width: 100%;
  max-width: clamp(720px, 82vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}

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

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Glass panels with fallback if backdrop-filter unsupported */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.16); }
}

/* Typography helpers */
h1, h2, h3 {
  line-height: 1.25;
  margin: .4em 0 .6em;
  color: var(--text);
}
h1 { font-size: clamp(1.4rem, 2.6vw + 0.6rem, 2.6rem); }
h2 { font-size: clamp(1.1rem, 1.6vw + .4rem, 1.6rem); }
h3 { font-size: clamp(0.95rem, 1.2vw + .3rem, 1.15rem); }

p { margin: 0 0 1rem; color: var(--text); }
ul, ol { margin: 0 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; color: var(--text); }

/* Image framing and behavior */
.image-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1rem auto;
  display: block;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}
.featured-image { display: grid; place-items: center; padding: .5rem 0; }
.featured-image img { width: 100%; height: auto; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); }

/* Utility and content helpers (supporting selectors listed) */
.content { color: var(--muted); }
.product-ad { text-align: center; padding: .75rem; border-radius: 10px; }
.product-ad a { color: var(--text); text-decoration: none; display: inline-block; padding: .5rem 1rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.35); background: rgba(0,255,255,.18); }
.product-ad a:hover, .product-ad a:focus-visible { text-decoration: underline; outline: none; }

/* Link and button styling with accessibility */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  padding: .55em 1em;
  display: inline-block;
  cursor: pointer;
}
a { color: var(--accent); }
a:hover { text-decoration: underline; color: var(--accent-2); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Button variants */
.btn {
  background: var(--accent);
  color: #041419;
  border: none;
}
.btn.secondary {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.35);
  color: var(--text);
}
.cta {
  background: linear-gradient(135deg, rgba(20,230,255,.9), rgba(0,180,200,.9));
  border: 1px solid rgba(255,255,255,.45);
}
.btn:focus-visible, .cta:focus-visible { outline: 2px solid #9cf; outline-offset: 2px; }

/* Focus states for accessibility */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Layout helpers for common sections */
header, main, footer {
  width: min(100%, 1100px);
  margin: 1rem auto;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
}
nav { margin-top: .25rem; }
nav a { color: var(--accent); padding: .25rem .5rem; border-radius: 6px; border: 1px solid rgba(0,255,255,.25); }

/* Sectioned content via semantic elements */
main { padding: 0; }
article { padding: 0; }

/* Image caption helper (if used) */
 figcaption { font-size: .9rem; color: var(--muted); }

/* Focus-visible underline for links in any state */
a:focus-visible { text-decoration: underline; }

/* Print styles: readability in print */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  header, main, footer, nav { background: none; border: none; box-shadow: none; }
  a { color: #000; text-decoration: underline; }
}
  
/* Reduced motion: respect user preference */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}