/* Theme Tokens */
:root {
  --bg: #0b0f14;
  --bg-2: #141722;
  --text: #e7eaf3;
  --muted: #aab4c8;
  --accent: #6af0ff;
  --accent-2: #c58cff;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-2: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 10px 28px rgba(0,0,0,.45);
  --shadow-soft: 0 2px 6px rgba(0,0,0,.25);
  --radius: 12px;
}

/* Global & Layout */
html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-synthesis: none; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.55;
  background:
    linear-gradient(to bottom right, rgba(25,28,36,.92), rgba(10,12,18,.92)),
    linear-gradient(#0b0f14 0, #0b0f14 100%);
  background-blend-mode: normal, overlay;
  /* Subtle glassy ready-to-overlay pattern via layered gradients (scanlines) */
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,.03), rgba(255,255,255,.03)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Pewter snowfall pattern (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* two speckle layers for a light pewter snowfall look */
  background-image:
    radial-gradient(circle at 2px 2px, rgba(255,255,255,.45) 1px, transparent 2px),
    radial-gradient(circle at 18px 40px, rgba(200,210,230,.25) 2px, transparent 3px);
  background-size: 12px 12px, 48px 48px;
  opacity: .25;
  mix-blend-mode: screen;
  animation: snow 60s linear infinite;
}
@keyframes snow {
  0% { transform: translateY(0); background-position: 0 0, 0 0; }
  100% { transform: translateY(-20px); background-position: 0 60px, 0 60px; }
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}

/* Glass panels (with fallback) */
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.18); backdrop-filter: none; }
}

.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  padding-inline: 1rem;
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* Header / Hero */
header {
  margin: 1rem auto 0;
  padding: 1rem;
}
header .hero {
  display: grid;
  gap: .5rem;
}
header h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.04;
  margin: 0;
  font-weight: 800;
  letter-spacing: .2px;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
header .meta {
  color: var(--muted);
  font-size: clamp(.9rem, 1.4vw, 1.05rem);
  margin: 0;
}
header .cta-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .25rem;
}
header a, header button {
  text-decoration: none;
}
header .left-cta { }
header .right-cta { }

/* Main content & Article */
main {
  padding: 1rem 0 2rem;
}
article {
  display: grid;
  gap: 1rem;
}
.featured-image {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.image-frame {
  aspect-ratio: 16/9;
  width: 100%;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
h2 {
  font-size: clamp(1.4rem, 3.5vw, 2.25rem);
  margin: .25rem 0 0.25rem;
}
p {
  color: var(--text);
  margin: .5rem 0;
}
blockquote {
  margin: .75rem 0;
  padding: .75rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(0,0,0,.15);
  border-radius: 6px;
  color: #eaf2ff;
  quotes: "“" "”";
}
ul {
  padding-left: 1.25rem;
  margin: .5rem 0;
}
li { margin: .25rem 0; }

/* Product Ad / Footer sections behaving as glass panels */
.product-ad, .sponsored-page {
  margin: .5rem 0;
  padding: .9rem 1rem;
}
.product-ad a, .sponsored-page a {
  display: block;
  padding: .75rem 1rem;
  border-radius: 10px;
  color: var(--text);
}
.product-ad { background: rgba(0,0,0,.25); border: 1px solid var(--border); text-align: center; }
.sponsored-page { background: rgba(0,0,0,.22); border: 1px solid var(--border); text-align: center; }

/* Links & Buttons */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 4px; border-radius: 4px; }

/* Button variants */
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: center;
  text-decoration: none;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:active, .cta:active { transform: translateY(0); }
.btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn--solid {
  background: linear-gradient(135deg, rgba(106,240,255,.95), rgba(196,140,255,.95));
  border: 1px solid rgba(255,255,255,.9);
  color: #041019;
}
.btn--outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--text);
}
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--text);
}

/* Utilities (grid / card) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  padding: 1rem;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.card h3 { margin: .25rem 0 0.5rem; font-size: 1.05rem; }

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

/* Accessibility helpers */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

/* Typography scale on small devices */
@media (max-width: 640px) {
  header { padding: .75rem; }
  .grid { grid-template-columns: 1fr; }
  h1 { font-size: 2.25rem; }
}

/* Print-friendly */
@media print {
  body { background: white; color: black; }
  a { text-decoration: underline; }
}
