/* Global tokens & helpers */
:root {
  --bg: #0b0f14;
  --bg-2: #14171d;
  --text: #e9e9e9;
  --muted: #b5bacc;
  --accent: #ff2b2b;
  --accent-2: #cbd5e1;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  --focus: #ffffff;
  --radius: 12px;
}

/* Base resets & mobile-first typography */
* { box-sizing: border-box; }
html, body { height: 100%; }
html, body, header, nav, main, article, aside, footer { /* structural targets */ }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100%;
  color: var(--text);
  background: 
    linear-gradient(to bottom right, rgba(12,0,0,.9), rgba(0,0,0,.9)),
    linear-gradient(#0b0f14 0%, #0b0f14 60%, #0a0f14 100%),
    repeating-linear-gradient(to bottom, rgba(255,0,0,.08) 0 2px, transparent 2px 4px);
  background-attachment: fixed;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}
img { max-width: 100%; display: block; height: auto; }

/* Layout containers */
.container {
  width: 100%;
  max-width: clamp(320px, 90vw, 1120px);
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn .4s ease both;
}
@supports not (backdrop-filter: blur(10px)) {
  .card { background: rgba(255,255,255,.15); }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Glass panel helpers */
.section-glass {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: calc(var(--radius) + 4px);
  padding: 1rem;
}
.tag {
  display: inline-block;
  padding: .25rem .5rem;
  font-size: .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.25);
  color: #fff;
  line-height: 1;
}

/* Section wrappers per selectors */

html, body, header, nav, main, article, footer, aside {
  /* ensure predictable box interactions across sections */
  min-width: 0;
}

/* Header & hero styling */
header {
  text-align: center;
  padding: 1.25rem 1rem 0.75rem;
}
header h1 {
  font-size: clamp(1.6rem, 2.5vw + 1rem, 2.9rem);
  line-height: 1.15;
  margin: 0.25rem 0 0.5rem;
  letter-spacing: .4px;
  color: var(--text);
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
nav {
  display: inline-flex;
  gap: .5rem;
  padding: .25rem 0 0;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  transition: transform .2s ease;
}
nav a:hover { text-decoration: underline; transform: translateY(-1px); }
nav a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Main content & image frame */
main { padding: 1rem 0 1.25rem; }
.image-frame {
  width: min(100%, 860px);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: inset 0 0 12px rgba(0,0,0,.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Article/content area (potential future content) */
.content { padding: .75rem 0; }

/* Footer & product ad blocks */
footer {
  padding: 1rem;
  margin-top: 1rem;
}
.product-ad,
.sponsored-page {
  display: block;
  text-align: center;
  margin: .75rem auto;
}
.product-ad a,
.sponsored-page a {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .6rem .95rem;
  border-radius: 8px;
  background: rgba(255,0,0,.28);
  border: 1px solid rgba(255,255,255,.4);
}
.product-ad a:hover,
.sponsored-page a:hover { background: rgba(255,0,0,.38); text-decoration: underline; }

/* Typography & links */
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Buttons (solid and outline variants) */
button,
a.btn,
a.cta {
  font: inherit;
  color: #fff;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.btn,
.cta {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.55);
  background: var(--accent);
  color: #fff;
  transition: transform .2s ease, background .2s ease;
}
.btn:hover,
.cta:hover { transform: translateY(-1px); background: #e51b1b; }
.btn:focus-visible,
.cta:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Images & visuals */
.image-frame { image-rendering: crisp-edges; }

/* Lists */
ul { margin: 0; padding: 0; list-style: none; }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { color: #00f; text-decoration: underline; }
  .image-frame { page-break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media (max-width: 600px) {
  header { padding-top: .75rem; }
  .image-frame { border-radius: 12px; }
}
