/* Theme Tokens */
:root {
  --bg: #0a0f1a;
  --bg-2: #11172a;
  --text: #eaf4ff;
  --muted: #b9c7e6;
  --accent: #69d6ff;       /* sky blue */
  --accent-2: #e88fb8;     /* powder rose */
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.28);
  --glass-strong: rgba(255, 255, 255, 0.22);
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0,0,0,.28);
  --focus: 2px solid #fff;
  --focus-offset: 4px;
}

/* Base layout & background */
html, body { height: 100%; }
html, body {
  margin: 0;
  padding: 0;
}
body {
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue";
  line-height: 1.55;
  background-color: var(--bg);
  /* Layered background: gradient + subtle noise/scanline */
  background-image:
    radial-gradient(circle at 20% -10%, rgba(102,195,255,0.16) 0 25%, transparent 40%),
    radial-gradient(circle at 85% 0%, rgba(232,136,184,0.18) 0 30%, transparent 40%),
    linear-gradient(135deg, rgba(6,10,25,0.95) 0%, rgba(12,18,40,0.95) 60%, rgba(8,6,20,0.95) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  background-blend-mode: screen, screen, normal, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-font-feature-settings: "kern" 1;
  -moz-font-feature-settings: "kern";
  font-synthesis-weight: none;
}
@media (prefers-color-scheme: light) {
  body { color: #0b1220; }
}
:focus { outline: none; }

/* Layout helpers (utility-like) */
.container {
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tag {
  display: inline-block;
  padding: .2em .6em;
  border-radius: 999px;
  font-size: .75rem;
  color: #021020;
  background: rgba(105, 214, 255, 0.28);
  border: 1px solid rgba(105,214,255,.55);
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Header, main, article, aside, footer styling */
header, nav, main, article, aside, footer {
  display: block;
}
header {
  padding: 1.25rem;
}
header h1 {
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  line-height: 1.08;
  margin: 0 0 .25rem;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}
header .meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: .5rem;
}
nav {
  display: flex;
  gap: .5rem;
  align-items: center;
}
nav a {
  display: inline-block;
  padding: .5rem .75rem;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  background: rgba(105,214,255,0.18);
  border: 1px solid rgba(105,214,255,.45);
}
nav a:hover, nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}
main { padding: 1rem; }
article { max-width: 72ch; }

/* Image frame styling */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.image-frame:hover { transform: translateY(-1px); transition: transform .25s ease; }

/* Content area (glass panels) */
.content {
  padding: 1rem;
}
.backdrop {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .backdrop { background: rgba(255,255,255,0.15); }
}

/* Product ad section in footer */
.product-ad {
  display: block;
  padding: .75rem;
  text-align: center;
  border-radius: 12px;
  background: rgba(105,214,255,0.14);
  border: 1px solid rgba(105,214,255,.3);
  color: var(--text);
}
.product-ad a { color: var(--text); text-decoration: none; font-weight: 600; display: inline-block; padding: .25rem .5rem; }
.product-ad a:hover { text-decoration: underline; }

/* CTA + button/link typography */
a, button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  letter-spacing: .2px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-decoration-color: var(--accent); outline: none; }

/* Primary and secondary button styles */
.btn {
  display: inline-block;
  padding: .75rem 1.25rem;
  border: 1px solid rgba(105,214,255,.6);
  background: rgba(105,214,255,.28);
  color: #041327;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}
.btn.primary {
  background: var(--accent);
  color: #041327;
  border: 1px solid rgba(105,214,255,.65);
}
.btn.primary:hover { background: #5bd3ff; }
.btn.outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.btn.ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
}
.cta {
  display: inline-block;
  padding: .65rem 1rem;
  border: 1px solid rgba(105,214,255,.6);
  background: rgba(105,214,255,.25);
  color: var(--text);
  text-decoration: none;
}
.cta:hover { transform: translateY(-1px); }

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

/* Print styles */
@media print {
  body { background: #fff; color: #000; }
  header, nav, main, article, aside, footer { background: transparent; color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* Accessibility: high-contrast focus ring for keyboard nav */
:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Responsive helpers for content density */
@media (min-width: 768px) {
  .container { padding: 0 1.25rem; }
}
@media (min-width: 1000px) {
  article { column-count: 1; }
}

/* Minor: layout tweaks for footer to appear as a compact grid on wide screens */
footer {
  padding: 1rem;
  display: grid;
  gap: .75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  footer { grid-template-columns: repeat(3, 1fr); align-items: start; }
}
footer .product-ad { padding: .5rem; }

/* Ensure selectors listed are covered */
html, body, header, nav, main, article, footer, aside { box-sizing: border-box; }
.image-frame, .image-frame img { display: block; }