/* Root tokens: platinum/silver palette and accessibility-friendly surface values */
:root{
  --bg: #0b0f14;
  --bg-2: #141824;
  --text: #e9eef7;
  --muted: #a6b0be;
  --surface: rgba(255,255,255,.08);
  --surface-2: rgba(255,255,255,.14);
  --accent: #cbd6e2;
  --accent-2: #95a5b6;
  --focus: #7bd7ff;
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  --radius: 12px;
}

/* Base & layout helpers (mobile-first) */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #0b0f14 0%, #141824 60%, #0b0f14 100%);
  min-height: 100dvh;
  line-height: 1.55;
  position: relative;
  overflow-x: hidden;
}
*::selection { background: rgba(125,125,125,.25); }

/* Layered background: gradient + platinum pixel mosaic + subtle scanlines/noise (pure CSS) */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(0deg, rgba(210,225,235,.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(210,225,235,.25) 1px, transparent 1px);
  background-size: 20px 20px, 20px 20px;
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: .28;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: 0;
  background: repeating-linear-gradient(to bottom,
    rgba(0,0,0,.0) 0, rgba(0,0,0,.0) 28px,
    rgba(0,0,0,.04) 28px, rgba(0,0,0,.04) 29px);
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: .25;
}

/* Global container utilities (responsive grid) */
.container{ width: min(1100px, 92vw); margin-inline: auto; padding: 0 1rem; }
.grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Glassmorphism core (fallback-friendly) */
header, main, footer, aside {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: calc(var(--radius) * 1.1);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside { background: rgba(255,255,255,.12); }
}

/* Typography hierarchy */
header h1{ font-size: clamp(1.8rem, 2.6vw + 1rem, 3.4rem); line-height: 1.08; margin: 0 0 .4rem; letter-spacing: .2px; }
header .meta{ font-size: .92rem; color: var(--muted); margin-bottom: .5rem; }
h2{ font-size: clamp(1.4rem, 1.6vw + .5rem, 2.2rem); margin: .75rem 0 .4rem; }
h3{ font-size: clamp(1.15rem, 1.1vw + .6rem, 1.4rem); margin: .9rem 0 .35rem; }
p{ margin: .5rem 0 1rem; color: #eaeef5; }
blockquote{ margin: 1rem 0; padding: .75rem 1rem; border-left: 3px solid rgba(123,215,255,.6); background: rgba(255,255,255,.04); border-radius: 6px; }

/* Image framing */
.image-frame, .featured-image {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame{ aspect-ratio: 16/9; width: 100%; }
.image-frame img{ width: 100%; height: 100%; object-fit: cover; display: block; }

/* Standalone featured image fallback wrapper (HTML uses .featured-image) */
.featured-image{ width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); margin: .5rem 0 1rem; }
.featured-image img{ width: 100%; height: auto; display: block; }

/* Content wrapper used in article layout */
.content{ padding: .25rem 0 0; }

/* List styling for tips */
ul{ padding-left: 1.25rem; margin: .25rem 0 1rem; }
li{ margin: .3rem 0; }

/* .product-ad styling (footer blocks) */
.product-ad{ display: block; padding: .75rem; text-align: center; }
.product-ad a{ color: var(--text); text-decoration: none; display: block; padding: .4rem .6rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); transition: transform .2s ease, background .2s ease; }
.product-ad a:hover{ transform: translateY(-1px); background: rgba(255,255,255,.14); }
.product-ad a p{ margin: 0; font-weight: 600; }

/* Links & interactive controls (AA contrast + focus states) */
a{ color: var(--accent); text-decoration: none; outline: none; }
a:hover, a:focus{ text-decoration: underline; color: var(--accent-2); }
button, .btn, .cta{ font: inherit; cursor: pointer; padding: .6em .9em; border-radius: 8px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.18); color: #0b0b0b; display: inline-block; text-align: center; text-decoration: none;
  transition: transform .15s ease, background .2s ease, color .2s ease; }
button:hover, .btn:hover, .cta:hover{ transform: translateY(-1px); }
button:focus-visible, .btn:focus-visible, .cta:focus-visible{ outline: 3px solid var(--focus); outline-offset: 2px; }

/* Utility: cards and tags for compact UI */
.card{ background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: .9rem; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.tag{ display: inline-block; padding: .15em .5em; border-radius: 999px; font-size: .75rem; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); color: #0a0a0a; }

/* Layout primitives (centered content, responsive grids) */
.main-area{ padding: 1rem 0; }
.header-content{ padding: .75rem 0; }

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

/* Print styles (basic readability) */
@media print{
  body{ background: #fff; color: #000; }
  header, main, footer{ background: none; border: none; box-shadow: none; }
  a{ color: #000; text-decoration: underline; }
}
