/* Section: Base & Theme Tokens */
:root {
  --bg: #0b0f15;
  --bg-2: #121824;
  --text: #e9e2d9;
  --muted: #a7abb7;
  --accent: #ff6a00;
  --accent-2: #ff8a1f;
  --glass: rgba(20, 24, 32, 0.18);
  --glass-strong: rgba(20, 24, 32, 0.22);
  --border: rgba(255, 255, 255, 0.32);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
  --radius: 14px;
  --focus: 2px solid color-mix(in oklab, var(--accent) 70%, black);
}

/* Section: Reset & Global Layout */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
html, body { margin: 0; padding: 0; }

/* Section: Layered Background (Gradient + Subtle Noise/Scanlines) */
body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #0b0f15 0%, #111522 60%, #0b0f15 100%),
              radial-gradient(circle at 20% 20%, rgba(255,106,0,.15) 0 25%, transparent 26%),
              radial-gradient(circle at 80% 25%, rgba(255,140,0,.08) 0 28%, transparent 29%);
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  /* Subtle starry texture via layered gradients */
  background:
    radial-gradient(circle at 25% 15%, rgba(255,255,255,.08) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 50%, rgba(255,255,255,.05) 0 1px, transparent 1px);
  background-size: 3px 3px, 3px 3px;
  opacity: .25;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  /* GPU-friendly scanlines */
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: .22;
  pointer-events: none;
}

/* Section: Global Layout Helpers */
.container { width: 100%; padding-inline: 1rem; margin: 0 auto; max-width: clamp(320px, 90vw, 1100px); }
.grid { display: grid; gap: 1rem; }

/* Section: Typography */
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5rem; font-weight: 700; letter-spacing: .2px; }
p { margin: 0 0 1rem; line-height: 1.5; }
.content { color: var(--text); line-height: 1.5; }

/* Section: Layout Structure Hooks (Selectors to Style) */
html, body, header, nav, main, article, aside, footer { }
header, main, footer { position: relative; z-index: 1; }

/* Section: Header */
header { padding: 1.25rem 1rem; text-align: center; }
header h1 { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial;
            font-size: clamp(1.6rem, 4vw + 0.5rem, 3rem);
            line-height: 1.08; margin: 0; color: var(--text); }

/* Section: Main & Article */
main { padding: 1rem; display: flex; justify-content: center; }
article { width: 100%; }

/* Section: Image Frame (Media) */
.image-frame { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  padding: 6px; background: rgba(10,12,20,.25);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Glass panel fallback for image frame (with backdrop-filter where available) */
.image-frame { background: rgba(20, 24, 32, 0.18); border: 1px solid rgba(255,255,255,.28); border-radius: 12px; }
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .image-frame { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background: rgba(20, 24, 32, 0.22); }
}
@supports not (backdrop-filter: blur(8px)) {
  .image-frame { background: rgba(20, 24, 32, 0.48); }
}

/* Section: Product Ad / Badges (Glass-like Cards) */
.product-ad { display: grid; gap: .75rem; margin: 1rem 0; align-items: center; justify-items: center; }
.product-ad a { display: block; text-align: center; padding: .75rem 1.25rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.38);
  background: rgba(255, 106, 0, 0.92);
  color: #fff; text-decoration: none; font-weight: 700; min-width: 180px; }

/* Section: Other Links / Utilities */
a, button, .btn, .cta { transition: transform .18s ease, background .2s ease, color .2s ease, border-color .2s ease; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); outline: none; }

/* Focus states (AA accessible) */
:focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 60%, black); outline-offset: 3px; }

/* Buttons & CTAs (Solid & Outline Variants) */
.btn, button, .cta { display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .75rem 1.25rem; border-radius: 999px;
  font-weight: 700; border: 1px solid rgba(255,255,255,.4);
  background: var(--accent); color: #fff; text-decoration: none; cursor: pointer;
}
.btn:hover, button:hover, .cta:hover { transform: translateY(-1px); }
.btn:active, button:active, .cta:active { transform: translateY(1px) scale(0.98); }
.btn--outline, .cta--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.5);
}
.btn--outline:hover, .cta--outline:hover {
  background: rgba(255,255,255,.08);
}
.btn:focus-visible, .cta:focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 60%, black); outline-offset: 2px; }

/* Section: Lists (ul / li) */
ul { margin: 0; padding: 0; list-style: none; }
li { margin: 0; }

/* Section: Card & Tag Utilities */
.card { background: var(--glass); border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); }
.tag { display: inline-block; padding: .25em .6em; border-radius: 999px;
  background: rgba(255,255,255,.15); color: #fff; font-size: .75rem; border: 1px solid rgba(255,255,255,.3); }

/* Section: Nav & Aside (structural hooks even if unused) */
nav { display: block; }

/* Section: Print (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a, button, .btn, .cta { text-decoration: none; color: #000; }
}

/* Section: Responsiveness & Motion preference */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media (min-width: 640px) {
  .container { padding-inline: 1.25rem; }
}
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
