/* Palette & Layout Tokens */
:root {
  --bg: #0a1020;
  --bg-2: #1b3a8a;
  --text: #eaf6ff;
  --muted: #a6b8d4;
  --accent: #63c5ff;
  --accent-2: #b7e0ff;
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.28);
  --card-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

/* Global / Base (Mobile-first) */
html, body {
  height: 100%;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(9,12,40,.95) 0%, rgba(18,40,120,.95) 60%, rgba(170, 210, 255, .25) 100%), 
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100svh;
  text-rendering: optimizeLegibility;
}

/* Layered background: subtle scanlines + glow */
html::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 20% -10%, rgba(120,180,230,.25), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(80,150,255,.15), transparent 40%);
  filter: saturate(110%);
  z-index: -1;
}
body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  padding: 1rem;
}
@media (min-width: 48rem) {
  body { padding: 1.25rem 2rem; }
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  /* Glass panels with backdrop blur where supported */
}
@supports not (backdrop-filter: blur(8px)) {
  /* Fallback handled below via .glass class adjustments if used */
}
@media (prefers-reduced-motion: reduce) {
  html, body, header, main, article, footer { transition: none !important; animation: none !important; }
}

/* Layout utilities */
.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(28rem, 100%), 1fr));
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--card-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); }

/* Section elements (must style) */
html, body, header, nav, main, article, footer, aside {
  /* generic layout roles styled as glassy panels for depth */
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  padding: 0.75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin: 0.25rem 0;
}
header, main, footer, aside {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.32);
}
header { padding: 1.25rem 1rem; text-align: center; }
main { padding: 1rem; }
article { max-width: 72rem; margin: 0 auto; }
footer { padding: 1rem; text-align: center; }

/* Hero / Typography */
h1 {
  font-size: clamp(1.75rem, 4vw + 0.5rem, 3rem);
  line-height: 1.15;
  margin: 0 0 0.5rem;
  letter-spacing: .2px;
}
.meta {
  color: var(--muted);
  font-size: clamp(0.9rem, 1vw + 0.8rem, 1.05rem);
  margin: 0;
}
h2 {
  font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.25rem);
  margin: 1rem 0 .5rem;
}
p {
  color: color-mix(in oklab, black 50%, white 50%);
  font-size: clamp(1rem, 1.4vw + 0.5rem, 1.125rem);
  line-height: 1.6;
  margin: 0.5rem 0 1rem;
}
blockquote {
  margin: .75rem 0;
  padding: .75rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text);
  background: rgba(0,0,0,.08);
  border-radius: 6px;
}
.image-frame, .image-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.featured-image { border-radius: 12px; overflow: hidden; }

/* Links & Buttons (interaction) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
a:hover, a:focus {
  text-decoration: underline;
  color: var(--accent-2);
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.btn {
  display: inline-block;
  padding: .6em .95em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(to bottom, rgba(99,197,255,.95), rgba(60,130,200,.95));
  color: #00101a;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(180,210,255,.6);
}
.cta { composes: .btn; }

/* Image frame (optional utility) */
.image-frame {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

/* Glass panel fallback (no backdrop-filter) */
@supports not (backdrop-filter: blur(8px)) {
  header, main, article, footer, aside {
    background: rgba(255,255,255, 0.12);
  }
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  header, main, article, footer, aside {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

/* Print */
@media print {
  body { background: #fff; color: #000; padding: 0; }
  header, main, footer { background: transparent; border: none; box-shadow: none; }
}

/* Section helpers (utility) */
ul { padding-left: 1.25rem; margin: 0.25rem 0 1rem; }
li { margin: .25rem 0; }

/* Accessibility: prefers reduced motion already respected above; additional tweak */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
