/* Token Palette */
:root{
  --bg: #0b111a;
  --bg-2: #0f1620;
  --surface: rgba(12, 28, 48, 0.72);
  --text: #eaffff;
  --muted: #9bdcff;
  --accent: #39FF14;      /* neon green */
  --accent-2: #5ec9ff;     /* sky blue */
  --border: rgba(180, 240, 255, 0.35);
  --radius: 14px;
  --shadow: 0 10px 28px rgba(0,0,0,.45);
}

/* Section: Base & Helpers */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark light; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.6;
  color: var(--text);
  min-height: 100dvh;
  background: 
    linear-gradient(135deg, rgba(2,6,23,0.92), rgba(4,12,24,0.92) 60%, rgba(3,7,15,0.95)),
    radial-gradient(circle at 20% 15%, rgba(57,255,20,0.08), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }

/* Section: Glass panel (frosted) */
.glass {
  background: rgba(8, 19, 38, 0.24);
  border: 1px solid rgba(180, 240, 255, 0.40);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .glass { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}
/* Fallback for no backdrop-filter: */
@supports not (backdrop-filter: blur(8px)) {
  .glass {
    background: rgba(8, 19, 38, 0.34);
  }
}

/* Section: Layout utilities */
.container {
  width: 100%;
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  color: var(--text);
  background: rgba(0,0,0,.15);
}

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

/* Compatibility wrapper for legacy markup around images */
.featured-image { width: 100%; }

/* Section: Core content elements */
header, nav, main, article, aside, footer { display: block; }

/* Section: Typography & hero intent */
header {
  padding: 1.75rem 1rem;
  text-align: center;
}
header h1 {
  margin: 0.25rem 0 0.5rem;
  font-size: clamp(1.8rem, 4vw + 0.5rem, 3.6rem);
  line-height: 1.08;
  font-weight: 800;
  color: var(--text);
  letter-spacing: .4px;
}
header .meta {
  margin: 0.25rem auto 0;
  font-size: clamp(0.9rem, 0.6vw + 0.6rem, 1.05rem);
  color: var(--muted);
}

/* Main content container & article styling */
main {
  padding: 0.75rem 1rem 2rem;
}
article { 
  margin: 0 auto;
  max-width: clamp(640px, 90vw, 1100px);
}
article h2 {
  font-size: clamp(1.4rem, 2.5vw + 0.8rem, 2.4rem);
  margin: 1.25rem 0 .5rem;
  color: var(--text);
}
article p { margin: 0.5rem 0 1rem; color: rgba(235, 245, 255, 0.95); }
article ul { padding-left: 1.25rem; margin: 0.5rem 0 1rem; color: var(--text); }
article li { margin: .25rem 0; }

/* Blockquote style for atmospheric quotes */
article blockquote {
  margin: 1rem 0;
  padding: .75rem 1rem;
  border-left: 4px solid var(--accent-2);
  color: var(--text);
  background: rgba(0,0,0,0.15);
  border-radius: 6px;
}

/* Section: Links, CTAs & forms (no external fonts) */
a, button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  text-decoration: none;
  padding: .65rem 1rem;
  display: inline-block;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
a:hover, button:hover, .btn:hover, .cta:hover { text-decoration: underline; color: var(--accent-2); background: rgba(95, 215, 255, 0.22); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(62, 168, 255, 0.45);
  outline-offset: 2px;
}
a:focus-visible { border-color: rgba(93, 188, 255, 0.9); }

/* Section: Product Ad blocks in footer */
.product-ad {
  display: block;
  margin: 1rem 0;
  padding: 0.75rem;
  border-radius: 12px;
  text-align: center;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(180, 240, 255, 0.4);
}
.product-ad a { color: var(--text); text-decoration: none; font-weight: 700; }

/* Footer styling */
footer {
  padding: 1.25rem;
  color: var(--muted);
}
footer p { margin: .5rem 0; color: var(--muted); }

/* Section: Content helpers (for potential .content usage) */
.content { max-width: 64ch; }

/* Section: Persistent dark-mode fallback for light preference */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7fbff;
    --bg-2: #eef6ff;
    --surface: rgba(255,255,255,.92);
    --text: #0b1220;
    --muted: #4b5b73;
    --accent: #0a9d1b;
    --accent-2: #0b63d8;
    --border: rgba(15,31,64,.15);
  }
  body {
    background: #f7fbff;
    color: var(--text);
  }
  .glass {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,.08);
  }
  a, button, .btn, .cta { color: var(--text); }
}

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