/* Base tokens */
:root{
  --bg: #2b1a55;            /* deep lavender */
  --bg-2: #7a5bd3;          /* lavender glow */
  --text: #e9f0ff;           /* high-contrast on dark glass */
  --muted: #cbdcff;          /* secondary text */
  --accent: #1ee6d4;         /* bright turquoise */
  --accent-2: #14cbd3;       /* secondary turquoise */
  --surface: rgba(255,255,255,.08);
  --surface-2: rgba(255,255,255,.12);
}

/* Global / Layout resets */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
  /* Layered lavender leather vibe: gradient + subtle scanlines (pure CSS) */
  background-image:
    linear-gradient(135deg, rgba(122, 60, 210, 0.95) 0%, rgba(42, 12, 70, 0.95) 60%, rgba(60, 20, 60, 0.95) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 2px, transparent 2px 4px);
  background-blend-mode: overlay;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 0;
  margin: 0;
}

/* Sections / structure styling (section headers for clarity) */
header, nav, main, article, aside, footer {
  display: block;
}
header { padding: 2rem 1rem 1rem; text-align: center; }
main { padding: 1rem 0 2rem; }
footer { padding: 2rem 1rem; display: grid; gap: 0.75rem; justify-items: center; color: var(--muted); }

/* Hero heading and meta */
header h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0.25rem 0 0.25rem;
  font-weight: 700;
  letter-spacing: .2px;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.8rem, 1.6vw, 0.95rem);
}

/* Container / grid utilities */
.container {
  width: min(100%, 1200px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: .95rem;
  /* subtle, GPU-friendly entrance */
  transform: translateZ(0);
}

/* Content wrapper */
.content { padding: 1rem; }

/* Image frame styling (and compatibility with .featured-image in markup) */
.image-frame,
.featured-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow:
    inset 0 0 12px rgba(0,0,0,.25),
    0 6px 20px rgba(0,0,0,.25);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* subtle glow to pop on dark bg */
  filter: saturate(1.05);
  transform: translateZ(0);
}

/* Glass panels (frosted glass) with fallback */
.glass-panel,
.product-ad,
.sponsored-page,
footer { /* ensure panels inside footer have glass feel when used */ }
.glass-panel {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem;
}
@supports not (backdrop-filter: blur(10px)) {
  .glass-panel {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.4);
  }
}

/* Links & buttons (interactive states) */
a, button, .btn, .cta {
  font: inherit;
  color: var(--text);
  text-decoration: none;
}
a:hover, a:focus { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn {
  display: inline-block;
  padding: .75rem 1.25rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #001a14;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s;
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.4);
}
.btn:hover { transform: translateY(-1px); background: #18d6cc; }
.btn:active { transform: translateY(0); }

.cta { padding: .75rem 1.25rem; border-radius: 999px; }

/* List styling (ul/ol) for accessibility defaults */
ul, ol { padding: 0 0 0 1.25rem; margin: .25rem 0; }
li { margin: .25rem 0; }

/* Typography rhythm */
h2, h3 {
  margin: .75rem 0 .25rem;
  line-height: 1.25;
}
h2 { font-size: clamp(1.4rem, 3.5vw, 2.25rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2.8vw, 1.4rem); font-weight: 700; }

/* Print readability */
@media print {
  body { background: #fff; color: #000; }
  header, nav, main, footer { page-break-inside: avoid; }
  a { text-decoration: underline; }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Specific componentized tweaks for hero feel */
header {
  background: rgba(0,0,0,.0);
}
header h1 { color: #f6faff; text-shadow: 0 1px 0 rgba(0,0,0,.25); }

/* Footer layout tweaks for sections present in HTML */
footer { display: grid; gap: .75rem; align-items: center; text-align: center; }

/* Minor responsive helpers for content density on narrow viewports */
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  header { padding: 1.25rem 0; }
  .container { padding-inline: .75rem; }
}
