/* Tokens & Theme */
:root {
  --bg: #0a0f14;
  --bg-2: rgba(255,255,255,.065);
  --text: #f7f7f7;
  --muted: #a7a7a7;
  --accent: #ff2a2a;
  --accent-2: #ffd6d6;
  --card: rgba(255,255,255,.08);
  --card-border: rgba(255,255,255,.22);
  --shadow: 0 8px 28px rgba(0,0,0,.5);
  --focus: 0 0 0 3px rgba(255,0,0,.45);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7f7;
    --bg-2: rgba(0,0,0,.04);
    --text: #0b0b0b;
    --muted: #555;
    --card: rgba(255,255,255,.92);
    --card-border: rgba(0,0,0,.15);
  }
}

/* Global resets & typography */
html, body { height: 100%; }
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 1px, transparent 1px 4px),
    linear-gradient(to bottom, rgba(0,0,0,.65), rgba(0,0,0,.75));
  background-blend-mode: overlay, normal;
  background-size: 60px 60px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layered background (additional subtle carbon/scanline vibe) */
html, body {
  background-image:
    linear-gradient(135deg, rgba(255,255,255,.05) 0, rgba(255,255,255,.03) 50%, rgba(0,0,0,0) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.65)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, normal;
  background-size: 60px 60px, 100% 100%, 2px 2px;
  min-height: 100vh;
}

/* Layout primitives */
.container { width: 100%; max-width: clamp(720px, 90vw, 1200px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; padding: 0.75rem; }

/* Section wrappers */
header, nav, main, aside, article, footer { display: block; }
header { padding-block: 1rem; text-align: center; }
header h1 { font-size: clamp(1.6rem, 2.8vw + 1rem, 2.8rem); margin: 0; letter-spacing: .2px; }

/* Hero image frame (glass panel) */
.image-frame { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  display: grid; place-items: center;
  transition: transform .3s ease;
}
.image-frame:hover { transform: translateY(-2px); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
@supports not (backdrop-filter: blur(8px)) {
  .image-frame { background: rgba(255,255,255,.22); }
}

/* Content glass panel (fallback for .content) */
.content {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@supports not (backdrop-filter: blur(8px)) {
  .content { background: rgba(255,255,255,.20); }
}

/* Product ad blocks in footer */
.product-ad, .sponsored-page { display: inline-block; margin: .25rem; }
.product-ad a, .sponsored-page a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .6rem 1rem; border-radius: 999px;
  color: var(--text); text-decoration: none;
  border: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,0,0,.15));
  transition: transform .2s ease, background .2s ease;
}
.product-ad a:hover, .sponsored-page a:hover { transform: translateY(-1px); }
.product-ad a:focus-visible, .sponsored-page a:focus-visible { outline: 3px solid #ff8a8a; outline-offset: 2px; }

/* Footer text & layout */
footer { padding-block: .75rem; text-align: center; }
footer p { color: var(--muted); font-size: .875rem; margin: .25rem 0; }

/* Basic link/button styles & accessibility */
a, button, .btn, .cta { cursor: pointer; color: var(--text); text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid #ff6b6b; outline-offset: 2px; border-radius: 4px; }
button { background: transparent; border: 0; padding: 0; font: inherit; }

/* Buttons / CTAs */
.btn, .cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .62rem . nine; /* placeholder to be readable in minified; corrected below */
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Correct button padding rule (fix stray placeholder) */
.btn, .cta { padding: .58rem 1rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,0,0,.28)); color: #fff;
  text-shadow: none; transition: transform .2s ease, background .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); }

/* Primary vs outline helpers */
.btn.primary { background: linear-gradient(135deg, #ff2a2a, #e00000); border-color: rgba(255,255,255,.4); }
.btn.ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); color: var(--text); }

/* Typography helpers */
ul { padding: 0; margin: 0; list-style: none; }
li { margin: 0.25rem 0; }

/* Utility: dark/light contrast tweaks for text over glass */
@media (prefers-color-scheme: light) {
  .image-frame { border-color: rgba(0,0,0,.15); }
}

/* Responsive layout helpers */
@media (min-width: 768px) {
  main { padding: 2rem 0; }
  .container { padding: 0 1rem; }
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

/* Print styles */
@media print {
  body { color: #000; background: #fff; }
  .image-frame { page-break-inside: avoid; }
}