/* Section: Theme Tokens */
:root {
  --bg: #0b0f14;
  --bg-2: #0a111a;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.14);
  --text: #e9f0f5;
  --muted: #a5b4c3;
  --accent: #7df9ff;
  --accent-2: #9b5cff;
  --ring: 2px solid color-m(display-p3, var(--accent));
}

/* Section: Base & Layout Helpers */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg), var(--bg-2) 60%, #090b0e 100%);
  min-height: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
img { max-width: 100%; display: block; }

/* Section: Layered chrome background (gradient + scanlines) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 6px 6px, 6px 6px;
  background-position: 0 0, 0 0;
  opacity: 0.25;
  z-index: -2;
  pointer-events: none;
  animation: scan 60s linear infinite;
  mix-blend-mode: overlay;
}
@keyframes scan { to { transform: translate3d(0, 6px, 0); } }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(255,255,255,0.08) 0 5%, transparent 40%),
              radial-gradient(circle at 20% 60%, rgba(255,255,255,0.04) 0 6%, transparent 40%);
  pointer-events: none;
  z-index: -1;
  mix-blend-mode: overlay;
  opacity: 0.6;
}

/* Section: Shared container & utilities */
.container { width: min(92vw, 1100px); margin-inline: auto; padding: 0 1rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

.card { background: var(--surface); border: 1px solid rgba(255,255,255,0.25); border-radius: 12px; padding: 1rem; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  /* Fallback if backdrop-filter unsupported */ 
  /* Will gracefully degrade to a frosted look via opacity */
}
@supports not (backdrop-filter: blur(12px)) {
  .card { background: rgba(255,255,255,0.16); }
}

.tag {
  display: inline-block;
  padding: 0.25em 0.5em;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #001015;
  background: linear-gradient(135deg, rgba(125,249,255,0.9), rgba(155,92,255,0.85));
  border: 1px solid rgba(255,255,255,0.5);
  margin-right: .5em;
  white-space: nowrap;
}

/* Section: Typography & headings (fluid, accessible) */
h1, h2, h3 { color: var(--text); margin: .5rem 0; line-height: 1.25; }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.2rem, 2.6vw, 1.6rem); margin-top: .75rem; }
h3 { font-size: 1.15rem; }

p { color: var(--text); opacity: 0.95; margin: .5rem 0 1rem; }
ul { margin: .5rem 0 1rem 1.25rem; }
li { margin: .25rem 0; }

/* Section: Image framing & visuals */
.image-frame, .featured-image {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.image-frame { aspect-ratio: 16 / 9; display: block; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Feature image fallback in case .featured-image is used */
.featured-image { border-radius: 12px; overflow: hidden; }
.featured-image img { display: block; width: 100%; height: auto; }

/* Section: Content area (generic glass panels) */
.content { padding: .75rem 0; color: var(--text); }

/* Section: Product Ad / footer ad blocks */
.product-ad {
  display: block;
  padding: .75rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  text-align: center;
}
.footer .product-ad { margin: .5rem 0; } /* if wrapped in footer */

/* Section: Header, Nav, Main, Article, Footer */
header, nav, main, article, footer, aside { /* structural reset hooks if needed */ }

/* Header layout */
header { padding: 1.25rem 0; text-align: center; position: relative; z-index: 1; }
header h1 { font-weight: 700; font-size: clamp(1.6rem, 3vw + 1rem, 2.8rem); margin: .25rem 0 0.25rem; }
header .meta { color: var(--muted); font-size: 0.92rem; }

/* Nav styling (simple, accessible) */
nav { display: inline-flex; gap: .5rem; padding-top: .5rem; }
nav a { color: var(--text); text-decoration: none; padding: .3rem .6rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.15); }
nav a:hover, nav a:focus-visible { text-decoration: underline; outline: none; }

/* Main layout & article content */
main { padding: 1rem 0 2rem; }
article { display: grid; gap: 1rem; }

/* Section: Interactive elements (buttons, links) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  padding: .55rem 1rem;
  display: inline-block;
  background: rgba(255,255,255,0.08);
  font-weight: 600;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
a:hover { text-decoration: underline; color: var(--accent); }
a:focus-visible { outline: var(--ring); outline-offset: 2px; color: var(--accent); }
.btn, .cta {
  cursor: pointer;
}
.btn { background: linear-gradient(135deg, rgba(0,0,0,0.0), rgba(255,255,255,0.14)); }
.btn:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }
.btn:focus-visible, .cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cta { background: linear-gradient(135deg, rgba(125,249,255,0.25), rgba(155,92,255,0.25)); }

/* Section: Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
  .card { background: #fff; border: 1px solid #ccc; }
}
 
/* Section: Accessibility & motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  body::before { animation: none; }
}

/* Section: Responsive tweaks for spec UI (optional extras) */
@media (min-width: 720px) {
  .container { padding: 0 1.25rem; }
  article { column-gap: 1.5rem; }
}

/* Section: Misc fallbacks for doors near 1:1 mapping to selectors listed */
html, body, header, nav, main, article, footer, aside { /* structural selectors present in the page */ }
ul, li { margin: 0; padding: 0; list-style-position: inside; }
aside { padding: 0.5rem; }
/* End of stylesheet */