/* Palette & Layout Tokens */
:root{
  --bg: #e8f0ff;
  --bg-2: #d5eaff;
  --text: #0a0f1e;
  --muted: #5a6b86;
  --accent: #ff2e9a;
  --accent-2: #ff6bdc;
  --glass: rgba(255,255,255,0.16);
  --glass-2: rgba(255,255,255,0.08);
  --card-border: rgba(255,255,255,0.38);
  --shadow: 0 6px 18px rgba(0,0,0,.15);
  --radius: 14px;
  --container-max: clamp(320px, 90vw, 1100px);
}

/* Core resets & accessibility */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(135deg, rgba(170,210,255,.55), rgba(255,120,180,.15) 60%, rgba(170,210,255,.55)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0, rgba(255,255,255,.04) 1px, transparent 1px, transparent 2px);
  background-size: 100% 100%, 100% 2px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}

/* Layout primitives */
.container { max-width: var(--container-max); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--glass); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }

/* Glass panel fallback for environments without backdrop-filter */
@supports not (backdrop-filter: blur(6px)) {
  .card { background: rgba(255,255,255,0.92); }
}

/* Background details for depth & neon accents */
header, main, footer { position: relative; z-index: 1; }

/* Section typography & hero emphasis */
header { text-align: center; padding: 2rem 1rem 1rem; }
header h1 { font-size: clamp(1.75rem, 4vw + 1rem, 3rem); line-height: 1.12; margin: .25rem 0 .25rem; letter-spacing: .2px; color: var(--text); }
header .meta { color: var(--muted); font-size: clamp(0.9rem, 0.4vw + 0.8rem, 1.05rem); }
nav { margin-top: .5rem; }
nav a { color: var(--accent-2); text-decoration: none; font-weight: 600; padding: .25rem .5rem; border-radius: 6px; }
nav a:hover, nav a:focus-visible { text-decoration: underline; }

main { padding: 1rem 0 2rem; }
article { display: grid; gap: 1rem; padding: 0; margin: 0 auto; max-width: 860px; }

/* Image framing */
.image-frame { aspect-ratio: 16/9; width: 100%; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,.4); box-shadow: 0 8px 24px rgba(0,0,0,.15); background: #111; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.05); }

/* Content text & typography scales */
.content p { margin: 0.5rem 0 1rem; color: var(--muted); }
.content h2, .content h3 { margin: .75rem 0 0.5rem; color: var(--text); }
.content h2 { font-size: clamp(1.4rem, 0.8vw + 1.2rem, 2rem); }
.content h3 { font-size: clamp(1.0rem, 0.6vw + 0.9rem, 1.4rem); }

/* Lists & inline content */
ul { margin: 0.5rem 0 0.75rem 1.25rem; padding: 0; color: var(--muted); }
li { margin: 0.25rem 0; }

/* Blockquote styling */
blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }

/* Inline tag & utility visuals */
.tag { display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .8rem; background: rgba(255,255,255,.25); color: var(--text); border: 1px solid rgba(255,255,255,.75); }

/* Buttons & links (interactive states) */
a, button, .btn, .cta { cursor: pointer; text-decoration: none; color: inherit; }
a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }

/* Primary and outline buttons */
.btn { display: inline-block; padding: .65rem 1rem; border-radius: 8px; border: 1px solid rgba(0,0,0,.04); background: var(--accent); color: white; font-weight: 700; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; box-shadow: 0 6px 14px rgba(255,46,154,.25); }
.btn:hover { transform: translateY(-1px); background: #ff3a9a; }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn--outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); box-shadow: none; }
.btn--outline:hover { background: rgba(255,46,154,.08); }

/* Utility shells for content sections that resemble cards on the page */
section { margin: .5rem 0; }

/* Footer & ad panels */
footer { padding: 2rem 1rem; text-align: center; color: var(--muted); }
footer .product-ad, footer .sponsored-page { display: inline-block; margin: 0 .5rem; padding: .6rem 1rem; border-radius: 999px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35); }
footer p { margin: .75rem 0 0; }

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

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