/* Section: Tokens & Base */
:root {
  --bg: #ffffff;
  --bg-2: #f6f0ff;
  --text: #0b0b0f;
  --muted: #5a5a6a;
  --accent: #ff0bd6;
  --accent-2: #c400d4;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-2: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 2px 8px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
  background:
    /* Gradient layer: clean white to soft lilac */
    linear-gradient(135deg, #ffffff 0%, #f9f7ff 60%, #f3f1ff 100%),
    /* Subtle noise/scanline layer (pure CSS) */
    repeating-linear-gradient(to bottom, rgba(0,0,0,.02) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }

section, article, header, nav, main, aside, footer { display: block; }

/* Section: Layout primitives */
.container {
  width: min(1200px, 92vw);
  margin-inline: auto;
  padding-inline: 0.75rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.image-frame, .image-frame img { border-radius: 12px; border: 1px solid rgba(255,255,255,.4); overflow: hidden; }
.image-frame { background: rgba(255,255,255,.15); box-shadow: var(--shadow-soft); }

/* Section: Glass panels with fallbacks */
[data-support="no-backdrop"] .image-frame,
[data-support="no-backdrop"] .content {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.08);
  backdrop-filter: none;
}
.content {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  :root { --glass: rgba(255,255,255,.14); }
  .content { background: rgba(255,255,255,.92); border: 1px solid rgba(0,0,0,.08); }
}

/* Section: Typography scales (fluid) */
h1, h2, h3 { margin: 0.25rem 0; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(1.75rem, 2vw + 1.25rem, 3.5rem); line-height: 1.04; }
h2 { font-size: clamp(1.25rem, 0.8vw + 1rem, 2rem); }
p { font-size: clamp(1rem, 0.5vw + 0.9rem, 1.15rem); margin: 0 0 0.75rem; color: var(--text); }
blockquote { margin: 0.75rem 0; padding-left: 0.75rem; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }

/* Section: Page structure styling */
header {
  padding: 1rem;
  position: relative;
  z-index: 1;
  border-bottom: 1px solid rgba(0,0,0,.05);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
}
header h1 { font-size: clamp(1.6rem, 2vw + 1rem, 2.6rem); margin: 0 0 0.25rem; letter-spacing: .2px; }
header .meta { font-size: clamp(0.8rem, 0.5vw + .8rem, 0.95rem); color: var(--muted); }

/* Main content flow with glass panels for readability on glass background */
main { padding: 1rem 0; }
article { max-width: 860px; margin: 0 auto; padding: 0 0.5rem; }
.featured-image { display: block; margin: 1rem auto 1.25rem; max-width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.6); box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.featured-image img { width: 100%; height: auto; display: block; object-fit: cover; aspect-ratio: 16 / 9; }

/* Section: Specific selectors per requirements */
html, body, header, nav, main, article, footer, aside { /* semantic blocks are styled above; this block ensures baseline rules exist if missing in HTML */ }
.content, .product-ad, a, button, .btn, .cta, ul, li, .image-frame, .image-frame img, .container, .grid, .card, .tag {
  text-rendering: optimizeLegibility;
}

/* Section: Interactive elements */
a, button, .btn, .cta {
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 0.62rem 1rem;
  display: inline-block;
  cursor: pointer;
  background: var(--accent);
  outline: none;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
a:hover, button:hover, .btn:hover, .cta:hover { text-decoration: underline; transform: translateY(-1px); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
a { background: transparent; color: var(--accent); padding: .25rem 0.5rem; border-radius: 6px; }
a:hover { color: #e90bd6; text-decoration: underline; }

/* Section: Utility components */
.tag {
  font-size: .75rem;
  padding: .25em .6em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.6);
  background: rgba(255,0,230,.18);
  color: #fff;
  display: inline-block;
}
footer { padding: 1rem; text-align: center; color: var(--muted); }

/* Section: Product ad styling inside footer */
.product-ad {
  display: grid;
  gap: .5rem;
  justify-items: center;
  align-items: center;
  padding: 0.75rem;
  margin: 0 auto 0.75rem;
  max-width: 720px;
  text-align: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.product-ad h3 { margin: .25rem 0; font-size: 1.05rem; }
.product-ad a { display: inline-block; padding: .6rem 1rem; border-radius: 8px; background: var(--accent); color: #fff; text-decoration: none; border: 1px solid rgba(255,0,230,.6); }

/* Section: Print styles (simple readability) */
@media print {
  body { background: #fff; color: #000; }
  .content { background: transparent; border: none; padding: 0; }
  a, button { color: #000; text-decoration: underline; }
  .product-ad { display: none; }
}

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