/* Root tokens */
:root{
  --bg: #0a0f14;
  --bg-2: #0b141a;
  --text: #eafff2;
  --muted: #b6e6d1;
  --accent: #7df1c0;        /* pastel jade */
  --accent-2: #c3fbd7;      /* lighter jade for links/accents */
  --glass: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.25);
  --shadow: 0 8px 28px rgba(0,0,0,.28);
  --focus: rgba(127,255,210,.95);
  --radius: 12px;
}

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

html, body { height: 100%; }

html { font-size: 16px; }

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
  background-color: var(--bg);
  /* Layered background: gradient + soft pastel rings + subtle scanlines */
  background-image:
    radial-gradient(circle at 60% -10%, rgba(125, 210, 170, .28) 0 180px, transparent 181px),
    radial-gradient(circle at 20% 20%, rgba(255, 246, 170, .25) 0 200px, transparent 201px),
    linear-gradient(135deg, rgba(0,0,0,.50) 0%, rgba(0,0,0,.20) 60%, rgba(0,0,0,.50) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, normal, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

body::before {
  /* subtle orbit-like noise/texture overlay (pure CSS) */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(110,255,200,.08) 0 60px, transparent 61px),
    radial-gradient(circle at 60% 40%, rgba(110,255,200,.04) 0 120px, transparent 121px);
  background-size: 120px 120px, 180px 180px;
  mix-blend-mode: screen;
  opacity: .9;
  filter: saturate(1.05);
}

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

/* Utilities & layout primitives */
.container {
  width: 100%;
  max-width: clamp(680px, 86vw, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
}

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

.card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 0.9rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transition: transform .15s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-1px); }

.tag {
  display: inline-block;
  padding: .15em .6em;
  border-radius: 999px;
  font-size: .75rem;
  line-height: 1;
  background: rgba(125, 240, 180, .22);
  color: var(--text);
  border: 1px solid rgba(125, 240, 180, .45);
}

/* Typography scale (fluid) */
h1, h2, h3, h4 { margin: .25rem 0; font-weight: 700; letter-spacing: .2px; }
h1 { font-size: clamp(1.6rem, 1.2rem + 3vw, 3rem); line-height: 1.08; color: var(--text); }
h2 { font-size: clamp(1.25rem, 0.9vw + 1rem, 1.75rem); }
h3 { font-size: clamp(1.05rem, 0.7vw + .95rem, 1.25rem); }
p { margin: 0 0 1rem; color: var(--muted); }

/* Image framing (supports .image-frame and .featured-image surround) */
.image-frame {
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.featured-image { border-radius: 12px; overflow:hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 6px 20px rgba(0,0,0,.25); }

/* Link and button styling (focus/hover accessibility) */
a, button, .btn, .cta {
  color: var(--accent-2);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
a:hover, a:focus { text-decoration: underline; color: #a6ffd8; outline: none; }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.btn, .cta {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
  background: linear-gradient(135deg, rgba(92, 255, 188, .95), rgba(178, 255, 208, .95));
  color: #041b12;
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid rgba(126, 255, 210, .95); outline-offset: 2px; }
.btn.secondary {
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.25);
}
.cta { text-transform: none; }

.ghost { background: transparent; border-color: rgba(255,255,255,.25); color: var(--text); }

/* Header / navigation */
header {
  padding: 1.25rem 0;
}
header h1 { margin: 0 0 .25rem; font-weight: 800; font-size: clamp(1.6rem, 1.2rem + 2.5vw, 3rem); }
header .meta { color: var(--muted); font-size: .9rem; }

/* Main content */
main { padding: 1rem 0 2rem; }

/* Article content: glass panels for readability on dark bg */
article { padding: 1rem; }

/* Footer + ads blocks */
footer { padding: 1rem 0 2rem; }
.product-ad, .sponsored-page { margin: .5rem 0; padding: .65rem 1rem; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.25); display: inline-block; }
.product-ad a, .sponsored-page a { color: #eafff2; text-decoration: none; }
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
  .glass { background: #fff; color: #000; border-color: #ccc; }
}

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

/* Small-screen adjustments */
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .image-frame { width: 100%; }
}