/* 1. Tokens (palette) */
:root{
  --bg: #04060a;
  --bg-2: #0a0f1a;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.25);
  --text: #eaf2ff;
  --muted: #b8c6ff;
  --accent: #a78bfa;      /* soft lilac */
  --accent-2: #2fe58a;     /* iridescent green */
  --shadow: 0 8px 28px rgba(0,0,0,.25);
  --radius: 14px;
  --radius-sm: 10px;
}

/* 2. Base & layout (mobile-first) */
* { box-sizing: border-box; }
html, body { height: 100%; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.6;
  background:
    linear-gradient(135deg, rgba(0,255,140,.20) 0%, rgba(120,240,170,.10) 40%, rgba(80,60,180,.0) 70%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    linear-gradient(180deg, rgba(5,8,15,.95), rgba(5,8,15,.75) 60%, rgba(5,8,15,.92)),
    var(--bg);
  background-blend-mode: normal, overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* 3. Structural elements (glass panels & surfaces) */
header, nav, main, aside, article, footer {
  display: block;
}

header {
  text-align: center;
  padding: 2rem 1rem;
  margin: 0 auto;
  border-bottom: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-radius: 0 0 14px 14px;
  max-width: min(980px, 92vw);
  margin-inline: auto;
}
header h1 {
  font-size: clamp(1.4rem, 1.2rem + 2.2vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 .5rem;
  letter-spacing: .2px;
  color: #f6fbff;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
header .meta {
  font-size: clamp(0.8rem, 0.4vw + 0.8rem, 1rem);
  color: var(--muted);
}

/* 4. Content container & utilities */
.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}
.grid { display: grid; gap: 1rem; }

.card, main, article {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  color: var(--text);
}
.card a { color: inherit; text-decoration: none; }

/* 5. Image framing (support both provided and fallbacks) */
.image-frame, .featured-image {
  width: 100%;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  margin: 0 auto 1rem;
}
.image-frame {
  aspect-ratio: 16 / 9;
}
.image-frame img, .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 6. Product ad & actions (buttons/links) */
.product-ad {
  display: inline-block;
  padding: .6rem .95rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.12);
  margin: .25rem;
}
.product-ad a { color: var(--text); text-decoration: none; }
.product-ad a:hover, .product-ad a:focus { text-decoration: underline; }

/* CTA & link/button styling */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
  transition: transform .15s ease, background .25s ease, border-color .25s ease;
}
a:hover, a:focus { text-decoration: underline; text-underline-offset: 2px; }
button, .btn, .cta {
  cursor: pointer;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.4);
  padding: .65rem 1rem;
  border-radius: 999px;
  font: inherit;
}
.btn { display: inline-block; }
.btn:hover, .cta:hover, .btn:focus-visible, .cta:focus-visible {
  transform: translateY(-1px);
}
.btn.primary {
  background: linear-gradient(135deg, rgba(0,255,140,.9), rgba(60,200,160,.9));
  border-color: rgba(255,255,255,.7);
}
.btn.outline {
  background: transparent;
  border-color: rgba(176,210,255,.6);
  color: var(--text);
}
:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 6px;
}

/* 7. Typography & content styling */
main {
  padding: 1.25rem 0;
}
article {
  max-width: 720px;
  margin: 0 auto;
}
article h2, article h3 {
  color: #f0f6ff;
}
article p, article li {
  color: #eaf1ff;
  margin: .5rem 0;
}
article blockquote {
  margin: .75rem 0;
  padding: .5rem 1rem;
  border-left: 3px solid var(--accent-2);
  background: rgba(0,0,0,.08);
  border-radius: 6px;
}
ul { margin: .5rem 0 1rem 1.1rem; padding: 0; }
li { margin: .25rem 0; }

/* 8. Responsive helpers (auto-fit grids) */
@media (min-width: 640px) {
  .container { padding-inline: 1.25rem; }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  article { padding: 1.5rem; }
}

/* 9. Accessibility & motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { animation: none !important; transition: none !important; }
}

/* 10. Print (basic readability) */
@media print {
  body { color: #000; background: #fff; }
  thead, tr, td, th { display: table-cell; }
}
