/* Base & Tokens */
:root{
  --bg: #0a1b15;
  --bg-2: #04140f;
  --text: #e8fff2;
  --muted: #b7f0d0;
  --accent: #4ce3ff; /* electric blue */
  --accent-2: #7cffb0; /* pastel green */
  --glass: rgba(255,255,255,.08);
  --glass-ops: rgba(255,255,255,.12);
}

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

html, body { height: 100%; }

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Inter", sans-serif;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(6,30,25,.9), rgba(4,20,12,.92)),
    radial-gradient(circle at 80% 20%, rgba(0,180,220,.15), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    #04140f;
  background-blend-mode: overlay, overlay, normal, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding: 0 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  border-radius: 999px;
  font-size: .75rem;
  color: #002b28;
  background: rgba(76, 227, 255, .75);
  border: 1px solid rgba(76, 227, 255, .95);
  line-height: 1;
}

/* Glass panels (with fallback) */
.glass {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.08); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}
@supports not (backdrop-filter: blur(12px)) and not (-webkit-backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.14); }
}

/* Header, Nav, Main, Footer */
header, nav, main, article, aside, footer {
  display: block;
}
header {
  padding: 1.25rem 0;
  text-align: center;
}
header h1 {
  margin: .25rem 0 .25rem;
  font-size: clamp(1.4rem, 1.2rem + 2vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: .2px;
}
header .meta {
  color: var(--muted);
  font-size: .92rem;
}
nav a {
  display: inline-block;
  padding: .5rem 1rem;
  margin-top: .5rem;
  border-radius: 999px;
  color: var(--text);
  border: 1px solid rgba(76,227,255,.6);
  text-decoration: none;
  background: rgba(0,0,0,.15);
}
main { padding: 0 0; }
article { padding: 0; }

/* Image frame styling (for the required selector) */
.image-frame {
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}

/* Content basics */
.content {
  max-width: 64ch;
  margin: 0 auto;
  padding: 0 1rem;
  color: var(--text);
}
h2 { font-size: clamp(1.25rem, 1.2vw + .8rem, 2rem); margin: .75rem 0 .5rem; color: #eafff0; }
p { margin: .6rem 0; color: #eafff5; }
blockquote {
  margin: .8rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
ul { padding-left: 1.25em; margin: .5rem 0; }
ul li { margin: .25rem 0; }

/* Product ad / aside styling in footer area */
.product-ad, .sponsored-page {
  margin: 0.5rem 0;
}
.product-ad a, .sponsored-page a {
  display: block;
  text-align: center;
  padding: .9rem 1rem;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(76,227,255,.6);
}
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Link styles & focus states for accessibility */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
}
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
a:focus-visible { text-decoration: underline; }

/* Button styles (solid and outline variants) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(76,227,255,.8);
  background: linear-gradient(135deg, rgba(76,227,255,.95), rgba(0,170,255,.95));
  color: #001b22;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn.secondary {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
  color: var(--text);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.btn:active { transform: translateY(0); }

/* Basic responsive typography helpers */
h1, h2, h3 { line-height: 1.15; }
p { line-height: 1.6; }

/* Print styles for readability */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .glass { background: #fff; color: #000; border: 1px solid #ccc; }
}

/* Accessibility helpers for motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transform: none !important; }
}