/* Tokens & Theme */
:root {
  --bg: #1b0f2b;
  --bg-2: #2a184a;
  --surface: rgba(255,255,255,.08);
  --text: #f6f2ff;
  --muted: #c9b8e6;
  --accent: #c6b6f9;
  --accent-2: #8b7bd6;
  --border: rgba(255,255,255,.25);
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  --focus: #97a3ff;
  --link: #e9d9ff;
  --card: rgba(255,255,255,.08);
  --chip: rgba(255,255,255,.18);
  --glow: 0 0 0 rgba(0,0,0,0);
}

/* Layout, Background & Typography */
html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
body {
  margin: 0;
  color: var(--text);
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.5;
  min-height: 100%;
  background: 
    radial-gradient(circle at 15% 10%, rgba(198,178,255,.25), transparent 40%),
    radial-gradient(circle at 85% 0%, rgba(120,90,230,.20), transparent 40%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 60%, #120a1a 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(255,255,255,.03) 0 1px, transparent 1px 2px);
  background-attachment: fixed, fixed, fixed, scroll, scroll;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light;
  overflow-y: auto;
}
img { max-width: 100%; display: block; height: auto; }

/* Containers & Grids */
.container { max-width: clamp(320px, 86vw, 1120px); margin-inline: auto; padding-inline: 1rem; padding-block: 0.75rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 0.9rem; box-shadow: var(--shadow); }

/* Glass panels (frosted glass) */
.glass {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports not (backdrop-filter: blur(10px)) {
  .glass { background: rgba(255,255,255,.14); }
}

/* Shapes for imagery */
.image-frame { aspect-ratio: 16/9; width: 100%; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); box-shadow: inset 0 0 0 2px rgba(255,255,255,.04), 0 6px 18px rgba(0,0,0,.25); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content blocks & text */
.content { padding: 1rem; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.22); }

/* Lists & inline helpers */
ul, li { margin: 0.25rem 0; padding-left: 1.25rem; }
li { line-height: 1.5; }
.tag { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3); }

/* Typography tuning (h1-h2) */
header { padding: 2rem 0 1rem; text-align: center; }
header h1 { font-size: clamp(1.8rem, 2.4vw + 1rem, 3.25rem); line-height: 1.08; margin: 0 0 .4rem; letter-spacing: .2px; }
header .meta { font-size: .92rem; color: var(--muted); opacity: .95; }

/* Navigation & links */
nav { margin-top: .5rem; display: inline-flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
a, button, .btn, .cta { color: var(--text); text-decoration: none; border-radius: 8px; border: 1px solid transparent; padding: .56rem .92rem; background: transparent; cursor: pointer; font-weight: 600; transition: transform .15s ease, background .2s ease, border-color .2s ease; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Buttons (variants) */
.btn { background: rgba(198,182,249,.12); border-color: rgba(198,182,249,.35); color: #fff; }
.btn.primary { background: var(--accent); border-color: rgba(255,255,255,.25); color: #0b0820; }
.btn.outline { background: transparent; border-color: rgba(255,255,255,.4); color: var(--text); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Links & CTAs with accessibility in mind */
.cta { font-weight:700; }

/* Header, main, aside, footer sizing for content flow */
header, main, footer, aside { display: block; }

/* Main content flow & article styling */
main { padding: 1rem 0 2rem; }
article { display: block; }

/* Footer & ads styling (glass panels where appropriate) */
footer { padding: 1.25rem 0; text-align: center; color: var(--muted); }
.product-ad { display: inline-block; width: auto; padding: .75rem 1rem; margin: .25rem; }
.product-ad a { text-decoration: none; color: inherit; }

/* Typography helpers for readability on glassy surfaces */
p { margin: .75rem 0; color: #f3f0ff; }
strong { color: #fff; }

/* Responsive helpers */
@media (max-width: 720px) {
  header { padding: 1.5rem 0; }
  .grid { grid-template-columns: 1fr; }
  .image-frame { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Print styles (basic readability) */
@media print {
  body { background: white; color: black; }
  header, nav, main, footer { display: block; }
  a { color: #000; text-decoration: underline; }
}