/* Section: Base tokens */
:root {
  --bg: #f3f0fb;
  --bg-2: #e8e0ff;
  --text: #0b1020;
  --muted: #5c5a80;
  --accent: #4169e1;      /* royal blue */
  --accent-2: #7aa1ff;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.28);
  --shadow: 0 6px 18px rgba(0,0,0,.08);
}

/* Section: Reset & global typography */
* { box-sizing: border-box; }
html, body { height: 100%; }
html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(65,105,225,.12), rgba(122,137,255,.12) 60%, rgba(120,60,200,.12) 100%), /* subtle royal lilac tint */
    linear-gradient(#f7f3ff, #efeaff 60%, #f7f3ff),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.03) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, normal, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  line-height: 1.5;
}
a { text-decoration: none; color: var(--accent); }
a:hover, a:focus { text-decoration: underline; }

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

/* Section: Structural elements */
html, body, header, nav, main, article, aside, footer { }

/* Section: Header */
header { padding: 1rem 0 0.5rem; }
header h1 {
  font-size: clamp(1.75rem, 0.9rem + 3.2vw, 3rem);
  line-height: 1.15;
  margin: 0 0 .25rem;
  font-weight: 700;
  letter-spacing: .2px;
}
header .meta { font-size: .92rem; color: var(--muted); }

/* Section: Main content area */
main { padding: 0 0 1rem; }

/* Section: Article (glass panel) */
article {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  article { background: rgba(255,255,255,.92); border-color: rgba(0,0,0,.12); }
}
.featured-image { display: grid; justify-items: center; padding: .25rem 0 .5rem; }
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: inset 0 0 12px rgba(0,0,0,.04), 0 6px 14px rgba(0,0,0,.15);
  background: #000;
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Support for the HTML example's alternate image container */
.featured-image img { width: 100%; height: auto; display: block; }

/* Section: Content helpers (generic) */
.content { padding: 0; }

/* Section: Product ad (footer area within page) */
.product-ad {
  display: block;
  padding: .75rem;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow);
}
.product-ad h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.product-ad a {
  color: var(--accent);
  display: inline-block;
  padding: .4rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(65,105,225,.4);
  background: rgba(65,105,225,.15);
  transition: transform .2s ease, background .2s ease;
}
.product-ad a:hover { background: rgba(65,105,225,.25); text-decoration: none; transform: translateY(-1px); }

/* Section: List & typography helpers */
ul, li { margin: 0 0 .5rem; padding: 0 0 0 1.25rem; }
li { list-style: disc; }

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

/* Card and tag utilities */
.card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: .75rem; box-shadow: var(--shadow); }
.tag { font-size: .75rem; padding: .15rem .5rem; border-radius: 999px; background: rgba(65,105,225,.18); color: #0b0b1a; display: inline-block; }

/* Section: Interactive elements (buttons & links) */
button, .btn, .cta { cursor: pointer; }
a, button, .btn, .cta { -webkit-tap-highlight-color: transparent; }

/* Buttons: primary/solid + outline variants via class usage */
.btn, .cta {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(65,105,225,.5);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); background: #2d58e2; }
.btn:active, .cta:active { transform: translateY(0); }

/* Focus styles for accessibility */
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

/* Section: Navigation (basic placeholder styling) */
nav { padding: .5rem 0; }

/* Section: Typography helpers for responsive rhythm */
h2 { font-size: clamp(1.25rem, 0.9rem + 2vw, 2rem); margin: .25rem 0 0.5rem; line-height: 1.25; }
h3 { font-size: clamp(1.1rem, 0.8rem + 1.6vw, 1.5rem); margin: .75rem 0 .25rem; }

/* Section: Print */
@media print {
  body { background: white; color: black; }
  a { text-decoration: underline; color: black; }
  article { background: white; border: 1px solid #ccc; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}