/* Layout base */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: 
    linear-gradient(135deg, rgba(174,150,210,.25) 0%, rgba(223,206,184,.15) 60%, rgba(174,150,210,.25) 100%),
    linear-gradient(#0a0a12, #0b0a12 60%, #191427);
  background-blend-mode: overlay;
  position: relative;
  isolation: isolate;
}
html { color-scheme: light; }

/* Tokens & colors */
:root{
  --bg: #0a0a14;
  --bg-2: #efe5d5;
  --text: #f8f4ff;
  --muted: #d5c4d5;
  --accent: #e8d4b3;
  --accent-2: #cbb39a;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 6px 18px rgba(0,0,0,.25);
  --focus: #b3a6ff;
  --link: #d9c6ff;
  --link-strong: #f1e1ff;
  --glow: 0 0 18px rgba(180,170,140,.6);
}

/* Background noise/scanline (pure CSS) */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 6px 6px, 6px 6px;
  mix-blend-mode: overlay;
  z-index: 0;
}

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

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

/* Layout helpers & utilities */
.container{
  width: 100%;
  max-width: clamp(640px, 90vw, 1120px);
  margin-inline: auto;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}
.grid{ display: grid; gap: 1rem; }
.card{ background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; box-shadow: var(--shadow); }

/* Base elements (structure) */
header, nav, main, article, aside, footer {
  display: block;
}
header{
  padding: 1.75rem 1rem;
  text-align: center;
}
main{ padding: 1rem 0; }
footer{ padding: 1rem 1rem; text-align: center; }

/* Hero typography */
h1, h2, h3{ margin: 0 0 0.5rem; font-weight: 700; color: var(--text); }
h1{ font-size: clamp(1.75rem, 1.8rem + 2vw, 3.25rem); line-height: 1.15; letter-spacing: .2px; }
h2{ font-size: clamp(1.25rem, 1.25rem + 1.5vw, 2rem); }
h3{ font-size: clamp(1rem, 0.9rem + .8vw, 1.25rem); }

/* Content blocks */
.content{ background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; backdrop-filter: blur(12px) saturate(120%); -webkit-backdrop-filter: blur(12px); }

/* Media: image frames (selectors to style) */
.image-frame, .featured-image { border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); display: block; }
.image-frame{ aspect-ratio: 16 / 9; }
.image-frame img, .featured-image img{ width: 100%; height: 100%; object-fit: cover; display: block; }

/* Image-frame glow/fallback border on non-blur-capable browsers */
.image-frame{ box-shadow: 0 6px 16px rgba(0,0,0,.25); }

/* Content elements used by selectors */
.product-ad{ display: inline-block; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: .75rem 1rem; text-align: left; margin: .5rem 0; }
.product-ad h3{ margin:0 0 .25rem; font-size: 1.05rem; }
.product-ad a{ color: var(--link-strong); text-decoration: none; }
.product-ad a:hover,.product-ad a:focus-visible{ text-decoration: underline; text-underline-offset: 2px; }

/* Navigation placeholders (presentational) */
nav{ display: block; }

/* Links & buttons (interactive) */
a, button, .btn, .cta{ font-family: inherit; color: var(--text); text-decoration: none; cursor: pointer; outline: none; }
a{ color: var(--link); }
a:hover{ text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible{ outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* Button variants */
.btn{ display: inline-flex; align-items: center; justify-content: center; padding: .65rem 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); font-weight: 700; background: rgba(255,255,255,.08); transition: transform .2s ease, background-color .2s ease, color .2s ease; }
.btn--solid{ background: var(--accent); color: #2b1b0e; border-color: rgba(0,0,0,.08); }
.btn--outline{ background: rgba(255,255,255,.12); color: var(--text); border: 1px solid rgba(255,255,255,.6); }
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }

/* Utility: tags */
.tag{ display:inline-block; padding:.15rem .4rem; border-radius:999px; font-size:.75rem; background: rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.4); }

/* Typography: fluid readability */
html, body, h1, h2, h3, p, ul{ line-height: 1.4; }
p{ margin: 0 0 1rem; color: var(--text); }

/* Layout helpers for responsiveness */
@media (min-width: 640px){
  .grid{ grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (min-width: 900px){
  header{ padding: 2rem 1rem; }
  .container{ padding: 0 1.25rem; }
}
footer .container{ display: flex; justify-content: center; gap: 1rem; align-items: center; }

/* Neon-glow accent for hero (subtle) */
header h1{ text-shadow: 0 2px 0 rgba(0,0,0,.2); }

/* Accessibility quick contrast checks for text over glass: ensure strong contrast on base text color over translucent surfaces */
@media (prefers-color-scheme: light){
  :root{ --text: #f8f6ff; }
}
