/* Base tokens and system UI palette (pastel blue parchment + magenta accents) */
:root {
  --bg: #eaf4ff;
  --bg-2: #dbeaff;
  --bg-3: #c9dbf4;
  --text: #0b1020;
  --muted: #5a6b83;
  --accent: #e56cff;       /* magenta pastel */
  --accent-2: #6bd6ff;     /* pastel cyan for contrast */
  --glass: rgba(255,255,255,.08);
  --glass-2: rgba(255,255,255,.22);
  --stroke: rgba(255,255,255,.32);
  --shadow: 0 6px 20px rgba(0,0,0,.15);
  --ring: 0 0 0 3px rgba(229,108,255,.65);
  --radius: 14px;
  --radius-sm: 10px;
  --text-on-glass: #0b1020;
}

/* Reset-ish */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; padding: 0; color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
  background-color: var(--bg);
  /* Layered background: gradient + subtle noise/scanlines */
  background-image:
    linear-gradient(135deg, rgba(232,247,255,.95) 0%, rgba(232,246,255,.95) 60%, rgba(217,235,255,.95) 100%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.02) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.65), transparent 40%),
    radial-gradient(circle at 75% 60%, rgba(255,255,255,.25), transparent 28%);
  background-blend-mode: overlay, overlay, normal, normal;
  padding-block: 0;
  overflow-y: auto;
}

/* Layout helpers and typography scales (mobile-first) */
.container { max-width: clamp(640px, 90vw, 1100px); margin-inline: auto; padding: 1rem; }

/* Grid and common utility shells */
.grid { display: grid; gap: 1rem; }
.card { background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.tag { display: inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; background: rgba(229,108,255,.25); color: #fff; border: 1px solid rgba(229,108,255,.6); }

/* Glass panels with graceful fallback */
header, main, footer, aside, article { 
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside, article { background: rgba(255,255,255,.28); }
}

/* Header / hero pattern */
header { padding: 1.75rem 1rem; text-align: left; }
header h1 { font-size: clamp(1.6rem, 1.2rem + 2.2vw, 3rem); margin: .05rem 0 .25rem; font-weight: 700; letter-spacing: .2px; color: var(--text); }
header .meta { color: var(--muted); font-size: clamp(.85rem, .8vw + .6rem, 1rem); }

/* Simple nav styling with accessible focus */
nav { margin-top: .25rem; display: inline-flex; gap: .5rem; }
nav a { color: var(--accent); text-decoration: none; padding: .35rem .6rem; border-radius: 6px; border: 1px solid rgba(229,108,255,.45); background: rgba(229,108,255,.15); transition: transform .2s ease, background .2s ease; }
nav a:hover { text-decoration: underline; text-underline-offset: .2em; background: rgba(229,108,255,.25); }
nav a:focus-visible { outline: none; box-shadow: var(--ring); }

/* Main content scaffolding */
main { padding: 1rem 0; }
.featured-image { margin: 1rem 0 1.25rem; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.4); box-shadow: 0 8px 22px rgba(0,0,0,.15); }
.featured-image img { display: block; width: 100%; height: auto; object-fit: cover; }

/* Image-frame alternative (per spec) */
.image-frame, .image-frame img {
  border-radius: 12px;
  overflow: hidden;
}
.image-frame { aspect-ratio: 16/9; width: 100%; border: 1px solid rgba(255,255,255,.4); box-shadow: 0 6px 20px rgba(0,0,0,.15); }

/* Content blocks and typography inside main article */
article { display: block; }
h2 { font-size: clamp(1.25rem, 0.8vw + 1rem, 2rem); margin: .75rem 0 .5rem; color: var(--text); }
p { margin: 0 0 1rem; color: var(--text); }
section { margin: 0 0 1rem; padding: 0; }

/* Lists */
ul { padding-left: 1.25rem; margin: .25rem 0 1rem; }
li { margin: .25rem 0; }

/* Blockquote styling for mood */
blockquote { margin: .5rem 0 1rem; padding: .75rem 1rem; border-left: 4px solid var(--accent); background: rgba(229,108,255,.15); border-radius: 6px; color: var(--text); }

/* Links and buttons with accessible focus and hover states */
a, button, .btn, .cta { font: inherit; color: inherit; text-decoration: none; cursor: pointer; }
a { color: var(--accent); }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
.btn, .cta { display: inline-block; padding: .72rem 1.1rem; border-radius: 8px; border: 1px solid rgba(229,108,255,.8); background: var(--accent); color: #fff; font-weight: 600; transition: transform .2s ease, background .2s ease; }
.btn:hover, .cta:hover { background: #d64bd8; transform: translateY(-1px); }
.btn.secondary { background: transparent; color: var(--accent); border-color: rgba(229,108,255,.8); }
.btn:focus-visible, .cta:focus-visible { outline: 0; box-shadow: var(--ring); border-radius: 8px; }

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

/* Product ad / sponsored blocks in footer */
footer { display: grid; grid-template-columns: 1fr; gap: 1rem; padding-top: 1.5rem; }
.product-ad a, .sponsored-page a { display: block; padding: .85rem 1rem; border-radius: 10px; text-align: center; text-decoration: none; color: var(--text); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); transition: transform .2s ease, background .2s ease; }
.product-ad a:hover, .sponsored-page a:hover { transform: translateY(-1px); background: rgba(255,255,255,.14); }

/* Print styles: simple readability */
@media print {
  body { background: white; color: #000; }
  header, main, footer { background: white; border: none; box-shadow: none; border-radius: 0; }
  a { text-decoration: underline; }
}

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