/* Root tokens (mint + royal blue palette) */
:root {
  --bg: #0b1020;
  --bg-2: #0a1a2b;
  --text: #eaffff;
  --muted: #87f5d1;
  --accent: #4169e1;     /* royal blue */
  --accent-2: #2ee0c9;    /* mint-cyan accent */
  --card: rgba(14, 22, 40, 0.72);
  --border: rgba(110, 170, 240, 0.55);
  --shadow: 0 8px 28px rgba(0,0,0,.28);
  --focus: rgba(255,255,255,0.9);
  --focus-outline: 2px solid #ffffff;
  --radius: 14px;
}

/* Base + layout reset */
* { 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; }
body {
  margin: 0;
  color: var(--text);
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.55;
  background: linear-gradient(135deg, rgba(6,10,20,0.85), rgba(6,10,20,0.65) 60%, rgba(2,6,18,0.85)),
              #0b1020;
  background-attachment: fixed;
  background-blend-mode: normal;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  isolation: isolate;
  position: relative;
  /* Layered background intensity for future cyberpunk vibe */
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* Subtle scanline texture (pure CSS) */
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255,255,255,0.04) 0px,
    rgba(255,255,255,0.04) 1px,
    transparent 1px,
    transparent 2px
  );
  mix-blend-mode: overlay;
  opacity: 0.25;
}
*, *::before, *::after { box-sizing: border-box; }

/* Layout helpers (utility classes) */
.container {
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.15s ease, background 0.3s ease;
}
@supports not (backdrop-filter: blur(10px)) {
  .card { background: rgba(13,20,40,0.92); backdrop-filter: none; }
}
.tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #061018;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 1px solid rgba(255,255,255,.35);
  line-height: 1;
}

/* Structural elements (must style these) */
html, body, header, nav, main, article, footer, aside {
  /* ensure they participate in the layering */
}
header, footer, main, article {
  position: relative;
  z-index: 1;
}
header {
  padding: 1.25rem;
  padding-block: 1.25rem;
  display: grid;
  gap: 0.75rem;
  align-items: start;
  border-bottom: 1px solid rgba(65,105,225,.32);
  background: linear-gradient(to right, rgba(6,10,20,.75), rgba(6,10,20,.55));
  border-radius: 16px;
  margin: 1rem auto;
  max-width: clamp(320px, 90vw, 1100px);
  overflow: hidden;
}
header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(0,0,0,.5);
}
header .meta {
  margin: 0;
  color: #bfe3e9;
  font-size: 0.9rem;
  opacity: 0.95;
}
nav {
  display: inline-flex;
  gap: 0.5rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(130,170,240,.6);
  background: rgba(65,105,225,.25);
  transition: transform .15s ease, background .3s ease;
}
nav a:hover { background: rgba(65,105,225,.38); transform: translateY(-1px); }
nav a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 999px;
}
main {
  padding: 1rem;
}
article {
  margin: 0 auto;
  max-width: 900px;
  padding: 1rem;
  display: grid;
  gap: 1rem;
  border-radius: 16px;
  background: rgba(12, 22, 40, 0.6);
  border: 1px solid rgba(120, 180, 240, 0.45);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
article h2 { margin: 0; font-size: clamp(1.4rem, 3.6vw, 2rem); color: var(--text); }
article h3 { font-size: 1.1rem; margin: .5rem 0 0.25rem; color: var(--text); }
article p { margin: 0.25rem 0 0.75rem; color: #eaffff; }
article ul, article ol { margin: 0.5rem 0 0.75rem 1.25rem; color: #eaffff; }
article li { margin: 0.25rem 0; }

/* Imagery framing (image-frame) */
.image-frame {
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(66, 245, 220, 0.6);
  box-shadow: 0 0 16px rgba(0, 255, 200, 0.25) inset;
  background: #000;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  image-rendering: auto;
  filter: saturate(1.05);
}
@media (max-width: 700px) {
  .image-frame { border-radius: 10px; }
}

/* Footer / product ad areas */
footer { padding: 1rem; margin-top: 1rem; display: grid; gap: 0.75rem; place-items: center; }
.product-ad, .sponsored-page {
  width: min(420px, 92%);
  display: block;
  text-align: center;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(18, 28, 46, 0.72);
  border: 1px solid rgba(110, 170, 240, 0.5);
  box-shadow: var(--shadow);
}
.product-ad a, .sponsored-page a {
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  width: 100%;
}
footer p { color: #cfeef7; font-size: 0.9rem; text-align: center; margin: 0; }

/* Links & buttons (interactive states) */
a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color .2s ease, text-decoration .2s ease;
}
a:hover, a:focus { text-decoration: underline; color: var(--accent); outline: none; }
a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

/* Buttons (solid + outline) */
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: linear-gradient(135deg, var(--accent), #1c4bd1);
  color: white;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  transition: transform .15s ease, background .3s ease;
}
.btn:hover { transform: translateY(-1px); background: linear-gradient(135deg, #4a6ee6, #1c4bd1); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(130,180,240,.8);
}
.btn--outline:hover { background: rgba(130,180,240,.15); }

.cta { font-weight: 700; letter-spacing: .2px; }

/* Typography tuning for readability on glass backdrop */
h1, h2, h3, p, li { text-rendering: optimizeLegibility; }

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

/* Print styles (basic readability) */
@media print {
  body { background: white; color: black; }
  header, main, footer { background: transparent; box-shadow: none; }
  a { color: black; text-decoration: underline; }
}
