:root {
  --bg: #f5ecd9;
  --bg-2: #efe8ff;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.15);
  --text: #0b0b0b;
  --muted: #5a5a65;
  --accent: #b59cff;
  --accent-2: #e3d6ff;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(0,0,0,.12);
  --gap: 1rem;
  --focus: 2px solid var(--accent);
  --focus-offset: 2px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body, header, nav, main, article, footer, aside {
  min-height: 0;
}

html, body {
  height: 100%;
}

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.4;
  font-size: clamp(14px, 1.6vw, 18px);
}

body {
  margin: 0;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(181, 138, 255, 0.08), rgba(255,255,255,0.04) 60%), 
    linear-gradient(to bottom, #f5ecd9 0%, #efe6ff 60%, #f5ecd9 100%);
  background-blend-mode: overlay;
  background-image:
    linear-gradient(135deg, rgba(172, 140, 240, 0.08), rgba(238, 223, 210, 0.08)),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.03) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 90vw, 1100px);
  padding: 0 1rem;
  margin-inline: auto;
}

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

.card {
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@supports not (backdrop-filter: blur(10px)) {
  .card { background: rgba(255,255,255,.18); }
}

/* Glass panels baseline (used for header/footer content blocks) */
.glass {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: calc(var(--radius) * 1.1);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.20); }
}

/* Typography scale (hero hierarchy) */
h1, h2, h3 {
  margin: 0 0 .5rem;
  line-height: 1.15;
  font-weight: 700;
  color: var(--text);
}
h1 { font-size: clamp(1.6rem, 3.6vw, 2.75rem); letter-spacing: .2px; color: var(--accent-2); }
h2 { font-size: clamp(1.25rem, 2.4vw, 2rem); color: var(--text); }
h3 { font-size: clamp(1.05rem, 1.9vw, 1.5rem); color: #1b1b1b; }

/* Content helpers */
.content { padding: 0.75rem 0; color: var(--text); }

/* Image framing and visuals */
.image-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
  background: #000;
  aspect-ratio: 16/9;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.02);
}
.featured-image { margin: 1rem 0 1.25rem; }

/* Links and buttons (interaction states) */
a, button, .btn, .cta {
  color: #0b0b0b;
  text-decoration: none;
  display: inline-block;
  padding: .6em 1em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.18);
  transition: transform .15s ease, background .2s ease, color .2s ease;
  font-weight: 600;
}
a:hover, a:focus-visible, button:hover, .btn:hover, .cta:hover {
  text-decoration: underline;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 0;
  outline: none;
  box-shadow: 0 0 0 3px rgba(181, 140, 255, 0.4);
  transform: translateY(-0.5px);
}
.btn {
  background: linear-gradient(135deg, rgba(213, 172, 255, 0.95), rgba(179, 137, 255, 0.85));
  color: #0a0a0a;
  border: 1px solid rgba(255,255,255,.6);
}
.btn.primary { background: linear-gradient(135deg, var(--accent), #936bff); color: #111; }
.btn.ghost, .cta { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.4); }

/* Lists and chips */
ul { margin: .5rem 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: .15em .6em;
  border-radius: 999px;
  font-size: .8rem;
  background: rgba(181, 156, 255, 0.25);
  border: 1px solid rgba(181, 156, 255, 0.6);
  color: #2a1b4d;
}

/* Layout blocks per required selectors */
header {
  padding: 1.75rem 1rem;
  display: grid;
  justify-items: center;
  gap: .75rem;
  margin: 1rem auto;
  width: min(1100px, 92%);
}
header h1 { text-align: center; margin-bottom: .25rem; color: var(--accent-2); }
header nav { display: flex; gap: .5rem; align-items: center; justify-content: center; }

/* Main and article styling (glass feel) */
main { padding: 1rem 0; }
article { display: block; }

footer {
  padding: 1rem 0;
  margin-top: 2rem;
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}
.product-ad, .sponsored-page {
  padding: .75rem 1rem;
  text-align: center;
}
footer p { margin: .5rem 0 0; text-align: center; color: var(--muted); }

/* Responsive refinements */
@media (min-width: 720px) {
  header { padding: 2rem; }
  main { padding: 1.25rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Print styles for readability */
@media print {
  body { background: #fff; color: #000; }
  a, a:visited { color: #0000EE; text-decoration: underline; }
  .glass, .card { background: #fff; border: 1px solid #ddd; box-shadow: none; }
}
