/* Token palette */
:root {
  --bg: #0b0f14;           /* deep space */
  --bg-2: #141a22;          /* cyber base */
  --text: #e8e6f0;           /* high-contrast text */
  --muted: #c6b8c5;          /* secondary text */
  --rose: #f2cce0;            /* powder rose primary tint */
  --rose-2: #e89bc4;          /* rosy accent tint */
  --accent: #e85d17;           /* burnt orange */
  --accent-2: #ff7a2b;         /* vibrant burnt orange */
  --surface: rgba(255, 255, 255, 0.08); /* frosted glass base */
  --surface-2: rgba(0,0,0,0.28);         /* shadowed glass fallback */
  --border: rgba(255,255,255,0.25);
  --focus: #8bdcff;
}

/* Section: Reset & base */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue"; color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  /* Layered background: gradient + glow + hint of powder rose/orange hues */
  background:
    radial-gradient(circle at 15% -5%, rgba(242, 204, 224, 0.28), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(232, 93, 23, 0.28), transparent 40%),
    linear-gradient(135deg, #0b0f14 0%, #141a22 40%, #0b0f14 100%);
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

/* Subtle scanline/noise texture (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 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: 2px 2px, 2px 2px;
  mix-blend-mode: overlay;
}

/* Section: Layout helpers */
.container {
  width: 100%;
  max-width: clamp(720px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
  position: relative;
  z-index: 1;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  transition: transform .2s ease, background .3s ease;
}
.card:focus-within { outline: none; transform: translateY(-1px); }

/* Section: Typography & headings */
html, body { line-height: 1.5; }
h1 { font-size: clamp(1.6rem, 2.4vw + 1rem, 2.75rem); margin: 0 0 .25rem; font-weight: 700; letter-spacing: .2px; color: var(--text); }
h2 { font-size: clamp(1.4rem, 1.4vw + 1rem, 2rem); margin: .75rem 0 0.25rem; }
h3 { font-size: clamp(1.1rem, 0.8vw + 0.9rem, 1.4rem); margin: .75rem 0; }
p { font-size: clamp(0.95rem, 0.6vw + 0.95rem, 1.125rem); color: var(--muted); margin: 0 0 1rem; }

/* Section: Header, main, footer, aside (glass panels) */
header, main, footer, aside {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin: 1rem auto;
}
header { padding: 1rem 1rem 0.75rem; }
nav { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
nav a { color: var(--text); text-decoration: none; padding: .25rem .5rem; border-radius: 6px; }
nav a:hover, nav a:focus { text-decoration: underline; }

/* Fallback for environments without backdrop-filter */
@supports not (backdrop-filter: blur(12px)) and not (-webkit-backdrop-filter: blur(12px)) {
  header, main, footer, aside {
    background: rgba(255,255,255,0.12);
  }
  .glass-fallback { background: rgba(255,255,255,0.18); }
}
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Section: Links & interactive controls */
a { color: var(--text); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
button, .btn, .cta {
  display: inline-block;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.0);
  cursor: pointer;
  font: inherit;
  color: #0b0b0b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 14px rgba(232, 93, 23, 0.45);
  transition: transform .2s ease, box-shadow .2s ease;
}
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(232, 93, 23, 0.55); }
button:active, .btn:active, .cta:active { transform: translateY(0); box-shadow: 0 4px 10px rgba(232, 93, 23, 0.45); }
.btn.secondary, .cta.secondary { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.4); }
.btn:focus-visible, .cta:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Section: Image frame styling */
.image-frame {
  aspect-ratio: 16/9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: translateZ(0);
}
.featured-image { margin: 0 0 1rem; }

/* Section: Content helpers */
.content { padding: 0.5rem 0; color: var(--muted); }
ul { padding-left: 1.25rem; }
li { margin: 0.25rem 0; }

/* Product ad and sponsor sections in footer */
.product-ad, .sponsored-page {
  display: block;
  padding: 0.75rem;
  text-align: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px;
}
.product-ad p, .sponsored-page p { margin: 0; font-weight: 600; }

/* Utility classes (grid, card, tag) */
.tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(232,93,23,0.18);
  color: #ffd8c2;
  border: 1px solid rgba(232,93,23,0.4);
  margin-right: 0.5rem;
}
@media (min-width: 900px) {
  .container { padding-inline: 2rem; }
}
@media (max-width: 640px) {
  h1 { text-wrap: balance; font-size: clamp(1.4rem, 4vw + 1rem, 2.4rem); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Section: Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: #fff; border: none; box-shadow: none; }
  .image-frame { border: 1px solid #000; }
}