:root {
  /* Palette: royal blue foundation with pastel pink accents */
  --bg: #0b1b4f;
  --bg-2: #1a2f7a;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(0, 0, 0, 0.08);
  --text: #eaf2ff;
  --muted: #cbd5e1;
  --accent: #ffb3c7;
  --accent-2: #e17bd5;

  --border: rgba(255, 255, 255, 0.25);
  --focus: #80b6ff;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  --radius: 12px;
  --radius-lg: 16px;
}

/* Base */
html, body {
  height: 100%;
}
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  background:
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 60%, var(--bg) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-block-size: 100%;
  color-scheme: dark;
}
img { max-width: 100%; display: block; }

@media (prefers-reduced-motion: reduce) {
  html, body { background-attachment: scroll; }
}

/* Layout primitives */
.container {
  width: 100%;
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
@supports not (backdrop-filter: blur(8px)) {
  .card { background: rgba(255,255,255,0.14); }
}
.tag {
  display: inline-block;
  padding: .15em .5em;
  border-radius: 999px;
  font-size: .75rem;
  color: #0b0b0b;
  background: rgba(255, 179, 199, 0.85);
  border: 1px solid rgba(255,255,255,.5);
}
header, main, footer, aside {
  display: block;
}
.content { padding: 1rem 0; }

/* Background texture and depth helpers (subtle) */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(transparent, transparent 60%, rgba(255,255,255,0.04)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: 0.25;
  z-index: -1;
}
.hero-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0.08), rgba(255,255,255,0) 40%);
  mix-blend-mode: overlay;
  pointer-events: none;
  border-radius: var(--radius);
  opacity: 0.6;
  display: none;
}
@media (min-width: 60em) {
  .hero-sheen { display: block; }
}

/* Glass panels (with fallback) */
.glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,0.92); border-color: rgba(0,0,0,0.15); color: #0d1020; }
}
header {
  text-align: center;
  padding: 1.75rem 1rem;
  margin: 1rem auto 0;
}
header h1 {
  font-size: clamp(1.6rem, 1.4rem + 2vw, 2.75rem);
  line-height: 1.12;
  margin: 0 0 .5rem;
  letter-spacing: .2px;
}
header .meta {
  font-size: 0.9rem;
  color: var(--muted);
}
nav {
  margin-top: .75rem;
}
nav a {
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  padding: .45rem .75rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform .15s ease;
}
nav a:hover { text-decoration: underline; transform: translateY(-1px); }

main { padding: 0 1rem; }
article { display: block; padding: 1rem; }

/* Image framing (supporting both .image-frame and legacy .featured-image) */
.image-frame, .featured-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
  margin: 1rem 0;
  background: #000;
}
.image-frame img, .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
  transition: transform .4s ease;
}
.image-frame:hover img, .featured-image:hover img {
  transform: scale(1.02);
}
@media (prefers-reduced-motion: reduce) {
  .image-frame img, .featured-image img { transition: none; transform: none; }
}

h1 + p { margin-top: .25rem; }

/* Typography */
h2 {
  font-size: clamp(1.25rem, 0.9rem + 2vw, 1.75rem);
  margin: .75rem 0 .5rem;
}
h3 { font-size: 1.05rem; margin: .75rem 0 .25rem; }
p { margin: .75rem 0; color: #eaf2ff; }

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

/* Content blocks and layout helpers */
.content { padding: 0; }

/* Links & buttons (interactive states) */
a, button, .btn, .cta {
  -webkit-tap-highlight-color: transparent;
  outline: none;
  text-decoration: none;
  color: inherit;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
a:hover, button:hover, .btn:hover, .cta:hover {
  text-decoration: underline;
}
.btn {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #231010;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, background-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn:hover { background: #ffd7e3; }
.btn.primary { background: var(--accent); color: #1b0a12; }
.btn.primary:hover { background: #ffd2e0; }

/* Outline variant for buttons/cta */
.btn-outline, .cta {
  display: inline-block;
  padding: .6rem .95rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.6);
  background: transparent;
  color: var(--text);
  font-weight: 600;
}
.btn-outline:hover, .cta:hover {
  background: rgba(255,255,255,.08);
}
.cta {
  color: var(--text);
  border-color: rgba(255,255,255,.6);
  background: rgba(0,0,0,.15);
}
.cta:hover { background: rgba(255,255,255,.08); }

/* Footer / Ad blocks */
footer { padding: 1rem; }
.product-ad, .sponsored-page {
  display: block;
  text-align: center;
  padding: .6rem;
  margin: .6rem 0;
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: inline-block; padding: .25rem 0; width: 100%; }

/* Print styles */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}
