/* Palette & Layout Tokens */
:root {
  --bg: #0b0b14;
  --bg-2: #1a0f2e;
  --text: #e9e1ff;
  --muted: #c9b8f7;
  --accent: #ff3fa5;
  --accent-2: #c79bff;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 28px rgba(0,0,0,0.4);
  --focus: 0 0 0 3px rgba(255, 63, 160, 0.6);
  --radius: 14px;
}

/* Core reset & base typography */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

html {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  background: 
    linear-gradient(135deg, rgba(10,0,20,0.95), rgba(8,3,22,0.95) 60%, rgba(1,0,10,0.95)),
    radial-gradient(circle at 20% -10%, rgba(255,0,170,0.25) 0%, transparent 28%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 2px);
  background-blend-mode: screen, screen, overlay;
  min-height: 100%;
  padding: 0;
  margin: 0;
  color-scheme: dark;
  /* Respect prefers-reduced-motion for smoothness by default */
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(680px, 86vw, 1200px);
  margin-inline: auto;
  padding-inline: 1rem;
}

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

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

@supports not (backdrop-filter: blur(12px)) {
  .card,
  .panel {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  }
}

/* Glass panel fallback for broader support */
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

/* Typography scale */
h1, h2, h3 {
  margin: 0.25rem 0;
  line-height: 1.15;
}
h1 {
  font-size: clamp(1.75rem, 1rem + 4vw, 3rem);
  letter-spacing: .2px;
}
h2 {
  font-size: clamp(1.25rem, 0.9rem + 2vw, 1.75rem);
}
h3 {
  font-size: clamp(1rem, 0.8rem + 1.5vw, 1.25rem);
  color: var(--text);
}
p {
  font-size: clamp(0.95rem, 0.8rem + 0.4vw, 1.05rem);
  color: var(--text);
}
em { color: var(--accent-2); }

blockquote {
  margin: 1rem 0;
  padding: .75rem 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  color: var(--text);
}

/* Hero/intro elements */
header {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem 1rem;
  margin: 1rem auto;
  border-radius: var(--radius);
  width: min(100%, 1100px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

header h1 { color: var(--text); }

header .meta {
  color: var(--muted);
  font-size: clamp(0.75rem, 0.6rem + 0.6vw, 0.95rem);
  margin: .25rem 0 0.5rem;
}

/* Navigation & controls */
nav {
  margin-top: .5rem;
  display: inline-flex;
  gap: .5rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .5rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.15);
}
nav a:hover { text-decoration: underline; }

/* Images */
.image-frame,
.featured-image {
  display: block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
}
.image-frame {
  aspect-ratio: 16 / 9;
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Links, buttons, utilities */
a, button, .btn, .cta {
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border: none;
  font: inherit;
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.cta:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline-offset: 2px;
}
a:hover { text-decoration: underline; }

/* Button variants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #ff7bd6);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
}
.btn.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.6);
  color: var(--text);
}
.btn.ghost {
  background: transparent;
  border: 1px dashed rgba(255,255,255,0.5);
  color: var(--muted);
}
.cta { display:inline-flex; gap:.5rem; }

/* Lists */
ul { padding-left: 1.25rem; margin: 0.25rem 0 0.75rem; }
li { margin: .25rem 0; }

/* Glass panels for sections */
footer {
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.product-ad,
.sponsored-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  min-height: 64px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  text-align: center;
}
.product-ad a, .sponsored-page a {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
footer p { text-align: center; color: var(--muted); }

/* Layout wrappers for content areas */
.main-content { padding: 1rem; }

/* Optional / future-ready selectors */
html, body, header, nav, main, article, footer, aside {
  /* ensure all core structural elements participate in flow */
}
.content { padding: 1rem; }

/* Accessibility & motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { box-shadow: none; background: none; }
}
