/* Base tokens */
:root{
  --bg: #0b0f14;          /* obsidian */
  --bg-2: #141923;
  --surface: rgba(255,255,255,.08);      /* glass surface */
  --surface-2: rgba(255,255,255,.12);    /* stronger glass edge */
  --text: #e8f0f6; 
  --muted: #a9b4c2;
  --accent: #cbd8e2;        /* silver-ish */
  --accent-2: #8ea7bd;      /* cooler silver hint */
  --outline: rgba(255,255,255,.45);
  --shadow: 0 6px 20px rgba(0,0,0,.28);
  --radius: 14px;
  --focus: 3px solid rgba(120,180,255,.95);
}

/* Layout reset & background */
html, body {
  height: 100%;
}
* { box-sizing: border-box; }
html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
}
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 60%, var(--bg) 100%);
  min-height: 100%;
  position: relative;
  overflow-x: hidden;
}
body::before {
  /* Subtle scanline / noise layer (pure CSS) */
  content:"";
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% 0%, rgba(120,160,180,.08), transparent 40%);
  mix-blend-mode: overlay;
  opacity: .25;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}

/* Global helpers (structure) */
html, body, header, nav, main, article, footer, aside { outline-color: transparent; }
.image-frame { display: block; width: 100%; height: auto; }
.image-frame, .image-frame img { will-change: transform; }

/* Containers & layout utilities */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid { display: grid; gap: 1rem; }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display:inline-block;
  padding:.25em .5em;
  border-radius:999px;
  font-size:.75rem;
  color: var(--text);
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
}

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

/* Hero / typography */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .5rem;
  padding: 1rem;
  margin: 1rem auto;
  max-width: clamp(320px, 90vw, 1100px);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
header h1 {
  font-size: clamp(1.75rem, 1.6rem + 2vw, 3rem);
  line-height: 1.15;
  margin: 0.25rem 0;
  letter-spacing: .2px;
}
header nav a {
  color: var(--text);
  text-decoration: none;
  padding: .35rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
}
header nav a:hover, header nav a:focus-visible {
  text-decoration: underline;
  outline: none;
  color: var(--accent-2);
}
main { padding: 1rem; }
article { display: block; }

/* Image frame specifics */
.image-frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
  transform: scale(1);
  transition: transform .5s ease;
}
.image-frame:hover img { transform: scale(1.05); }

/* Content styling (generic text) */
.content {
  color: var(--muted);
  line-height: 1.6;
  font-size: clamp(0.95rem, 0.9vw + 0.9rem, 1.1rem);
}
.content h2, .content h3 { color: var(--text); margin-top: .75rem; }

/* Links & controls (a, button, .btn, .cta) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  font: inherit;
}
a { cursor: pointer; }
a:hover { text-decoration: underline; }
button { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); padding: .5rem .8rem; border-radius: 8px; color: var(--text); cursor: pointer; }
.btn, .cta {
  display: inline-block;
  padding: .55rem .95rem;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.4);
  background: linear-gradient(to bottom right, rgba(255,255,255,.18), rgba(255,255,255,.08));
  color: var(--text);
  font-weight: 600;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); background: rgba(255,255,255,.24); }
.btn:focus-visible, .cta:focus-visible { outline: 3px solid rgba(120,180,255,.95); outline-offset: 2px; }

/* Focus accessibility for links */
a:focus-visible { outline: 3px solid rgba(120,180,255,.95); outline-offset: 2px; }

/* Utility states */
ul, li { margin: 0; padding: 0; list-style: none; }
li + li { margin-top: .25rem; }

/* Footer & sections (product ads) */
footer {
  padding: 1rem;
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}
.product-ad, .sponsored-page {
  padding: .9rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.25);
}
.product-ad a, .sponsored-page a {
  display: block;
  text-align: center;
}
.product-ad p, .sponsored-page p {
  margin: 0;
  font-weight: 600;
}
footer p { text-align: center; color: var(--muted); }

/* Print readability */
@media print {
  body { background: white; color: black; }
  a { text-decoration: underline; color: black; }
  header, footer { background: transparent; border: none; }
}
@media (min-width: 700px) {
  main { padding: 1.25rem 0; }
  .grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}