/* Base Tokens */
:root{
  --bg: #0a0a14;
  --bg-2: #1b0f2a;
  --text: #ffffff;
  --muted: #cbd5e1;
  --accent: #a78bfa;
  --accent-2: #7c3aed;
  --glass: rgba(255,255,255,0.08);
  --glass-2: rgba(255,255,255,0.12);
  --border: rgba(255,255,255,0.28);
  --focus: #ffffff;
  --shadow: 0 8px 28px rgba(0,0,0,.4);
}

/* Section: Reset & Global */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  line-height: 1.6;
  background: linear-gradient(135deg, rgba(40,0,60,0.9) 0%, rgba(0,0,0,0.9) 60%), 
              #0a0a14;
  background-image:
    linear-gradient(135deg, rgba(40,0,60,0.9) 0%, rgba(0,0,0,0.9) 60%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% 0%, rgba(125,0,255,0.25), transparent 40%);
  background-blend-mode: overlay, overlay, normal;
  min-height: 100%;
  position: relative;
  isolation: isolate;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  opacity: 0.25;
  z-index: 0;
  mix-blend-mode: overlay;
}

/* Section: Layout primitives */
.container{
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
  z-index: 1;
}
.grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card{
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@media (prefers-reduced-motion: reduce){
  .card { transition: none; }
}
.content{ padding: 0.75rem; color: #fff; }

/* Section: Structural elements */
html, body, header, nav, main, article, footer, aside {
  /* ensure these exist and can receive styles cleanly */
}
header, main, footer, aside { position: relative; }

/* Section: Typography & headings */
h1, h2{
  margin: 0 0 0.4rem;
  line-height: 1.25;
}
h1{
  font-size: clamp(1.8rem, 2.5vw + 1rem, 3rem);
  font-weight: 700;
  letter-spacing: .2px;
}
h2{
  font-size: clamp(1.1rem, 1.8vw + 0.8rem, 1.8rem);
  font-weight: 700;
  color: #fff;
}
p{ color: var(--muted); margin: 0.4rem 0 1rem; }

/* Section: Visual assets (image-frame) */
.image-frame,
.featured-image{
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  background: #111;
  box-shadow: 0 8px 22px rgba(0,0,0,.4);
}
.image-frame{ aspect-ratio: 16 / 9; }
.featured-image{ aspect-ratio: 16 / 9; }
.image-frame img,
.featured-image img{ width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Content controls / links */
a, button, .btn, .cta{
  font-family: inherit;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a{ color: #fff; }
a:hover, a:focus{ text-decoration: underline; }
:focus-visible{
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(167,139,250,.25);
  border-radius: 6px;
}
.btn{
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.46);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  line-height: 1;
  transition: transform .15s ease, box-shadow .2s ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,0,0,.35); }
.btn:focus-visible{ outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 4px rgba(167,139,250,.25); }
.btn.outline{
  background: transparent;
  border: 1px solid rgba(167,139,250,.9);
  color: #fff;
}
.btn.secondary{
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
}
.cta{ padding: .6rem 1rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.4); }

/* Section: Lists */
ul{ padding-inline-start: 1.25rem; margin: 0.6rem 0 1rem; color: var(--muted); }
li{ margin: .25rem 0; }

/* Section: Utility components */
.tag{
  display:inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(167,139,250,.25);
  border: 1px solid rgba(167,139,250,.7);
  color: #fff;
}
.product-ad{
  padding: .75rem;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  text-align: center;
}
.product-ad a{ display: block; padding: .5rem 0; font-weight: 600; color: #fff; }
.sponsored-page{ margin-top: .5rem; }

/* Section: Layout helpers (non-intrusive) */
.main, main { display: block; padding: 1rem 0; }
header{ padding: 1.25rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }

/* Section: Accessibility & contrast tweaks for glass layers */
.simple-glass{
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

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

/* Section: Responsive helpers */
@media (max-width: 700px){
  header{ padding: .75rem 0; }
  .container{ padding-inline: .5rem; }
  h1{ font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
} 

