/* Base & Tokens */
:root {
  --bg: 0 0 0;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 6px 18px rgba(0,0,0,0.35);
  --text: #eef0ff;
  --muted: #c8baff;
  --accent: #ff8a3d;
  --accent-2: #b889ff;
  --radius: 14px;
  --gap: 1rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --grad-a: rgba(130, 70, 210, 0.95);
  --grad-b: rgba(255, 120, 60, 0.95);
}
* { box-sizing: border-box; }
html, body, header, nav, main, article, footer, aside { height: auto; }
html, body { height: 100%; }
html { line-height: 1.15; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background: 
    linear-gradient(135deg, var(--grad-a) 0%, var(--grad-b) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: clamp(640px, 86vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: 0.25em 0.5em;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
}

/* Glass Panels (fallback included) */
.glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255,255,255, 0.28);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.no-backdrop { background: rgba(255,255,255,0.12); }

/* Sections & Core Elements */
html, body, header, nav, main, article, footer, aside {
  scroll-behavior: smooth;
}
header {
  padding: 1.75rem 1rem;
  text-align: center;
}
header h1 {
  margin: 0.25rem 0 0.5rem;
  font-weight: 700;
  font-size: clamp(1.6rem, 2.2vw + 1rem, 2.6rem);
  line-height: 1.15;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.8rem, 0.8vw + 0.7rem, 1rem);
}
nav {
  margin-top: 0.5rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(0,0,0,0.15);
  transition: transform 0.2s ease, background 0.2s ease;
}
nav a:hover { background: rgba(0,0,0,0.25); transform: translateY(-1px); }
nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Main content & Article styling */
main { padding: 1rem 0 2rem; }
article {
  margin: 0 auto;
  max-width: clamp(640px, 84vw, 980px);
  padding: 1rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  article { background: rgba(255,255,255,0.14); }
}
.featured-image {
  margin: 0 0 1rem;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
h2 {
  font-size: clamp(1.3rem, 1.2vw + 1.2rem, 1.9rem);
  margin: 0.25rem 0 0.5rem;
}
p { font-size: clamp(1rem, 0.9vw + 0.9rem, 1.125rem); margin: 0.5rem 0 1rem; }

/* Lists & content styling */
ul { padding-left: 1.25rem; margin: 0.5rem 0 1rem; }
li { margin: 0.25rem 0; }

/* Content helper (as a hook for potential .content usage) */
.content {
  padding: 0.5rem 0;
  max-width: 860px;
  margin: 0 auto;
}
.content p { margin: 0.5rem 0; }

/* Links & typography accessibility */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
}
a:focus-visible, a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Buttons (solid & outline variants) */
.btn, .cta {
  display: inline-block;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.34);
  background: rgba(255,255,255,0.18);
  color: #0b0b0f;
  font-weight: 600;
  text-shadow: none;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); background: rgba(255,255,255,0.28); }
.btn:active, .cta:active { transform: translateY(0); opacity: 0.95; }
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.6);
  color: var(--text);
}
.btn:focus-visible, .cta:focus-visible, .btn-outline:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn + .btn { margin-left: 0.5rem; }

/* Product Ad / Aside styling in footer */
.product-ad, .sponsored-page {
  padding: 0.75rem 1rem;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
  margin: 0.25rem 0;
}
.product-ad a, .sponsored-page a { display: block; color: var(--text); text-decoration: none; }
.product-ad:hover, .sponsored-page:hover { background: rgba(255,255,255,0.14); }

footer {
  padding: 1rem;
  text-align: center;
}
@media (min-width: 720px) {
  header { padding: 2rem 1rem; }
  main { padding: 2rem 0 3rem; }
}
@media print {
  body { background: white; color: black; }
  a { text-decoration: underline; }
}
