/* Section: Base Variables */
:root {
  --bg: #0a002a;
  --bg-2: #2a005f;
  --surface: rgba(20, 0, 60, 0.6);
  --surface-2: rgba(10, 40, 60, 0.8);
  --text: #e8f0ff;
  --muted: #b6c7e6;
  --accent: #2ee0bd;       /* seafoam */
  --accent-2: #7a5cff;      /* violet */
  --border: rgba(255, 255, 255, 0.25);
  --glass: rgba(255, 255, 255, 0.08);
  --shadow: 0 8px 28px rgba(0,0,0,.25);
  --radius: 12px;
  --focus-ring: 2px solid rgba(110, 255, 210, 0.9);
  --focus-offset: 3px;
}

/* Section: Global Reset & Typography (Mobile-First) */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { line-height: 1.4; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(135deg, rgba(10,0,60,.95) 0%, rgba(40,0,80,.85) 40%, rgba(0,0,0,.95) 100%);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
@media (prefers-color-scheme: light) {
  body { color: #0b1020; background: #f6f7fb; }
}

/* Section: Layered background (gradient + subtle scanline) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  /* subtle glow gradient layer + scanlines overlay (pure CSS) */
  background:
    radial-gradient(circle at 20% 10%, rgba(124, 0, 255, 0.15), transparent 40%),
    linear-gradient(135deg, rgba(20,0,60,.75), rgba(0,0,0,0) 60%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, normal, overlay;
  opacity: 0.9;
  transform: translateZ(0);
  will-change: background;
}

/* Section: Layout helpers */
.container {
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding: 0 1rem;
}
.grid { display: grid; gap: 1rem; }
.card { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem; box-shadow: var(--shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
@supports not (backdrop-filter: blur(12px)) {
  .card { background: rgba(255,255,255,0.15); }
}
.section { padding: 1rem 0; }

/* Section: Structural selectors (targeted by the HTML) */
html, body, header, nav, main, article, footer, aside {
  /* ensure consistent stacking order if used in composition */
  scroll-margin-top: 1rem;
}
header { padding: 1.25rem 0; text-align: center; }
main { padding: 1rem 0; }
article { display: block; }
footer { padding: 1rem 0; }

/* Section: Hero + typography */
header h1 {
  font-size: clamp(1.75rem, 2.6vw + 1rem, 3.75rem);
  line-height: 1.05;
  margin: 0;
  letter-spacing: .2px;
}
header p { color: var(--muted); margin: .25rem 0 0; }

/* Section: Image frame styling */
.image-frame {
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  background: #000;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  image-rendering: optimizeQuality;
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.01); }

/* Section: Glass panels (content blocks) */
.content { padding: 0.75rem; }

/* Section: CTAs & links */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-color: rgba(140, 255, 210, 0.9);
}
a:hover, button:hover, .btn:hover, .cta:hover {
  text-decoration: underline;
}
.btn {
  display: inline-block;
  padding: .75rem 1.25rem;
  border: 1px solid rgba(255,255,255,.5);
  background: rgba(46,232,198,.18);
  color: var(--text);
  font-weight: 600;
  letter-spacing: .2px;
  border-radius: 999px;
}
.btn.primary {
  background: linear-gradient(135deg, rgba(46,232,198,.9), rgba(122,92,255,.8));
  border: 1px solid rgba(255,255,255,.75);
}
.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,.5);
}
.cta {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.5);
  background: rgba(0,0,0,.25);
}
.tag {
  display:inline-block; padding:.2rem .5rem; border-radius:999px;
  font-size:.7rem; color:#001; background:#fff; opacity:.9;
}
ul, li { margin: 0; padding: 0; list-style: none; }

/* Section: Utility classes */
.container--narrow { max-width: 680px; margin-inline: auto; }
.grid.auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Section: Product Ad (footer area content) */
.product-ad {
  display: block;
  text-align: center;
  padding: .6rem;
  border-radius: 12px;
  margin: .25rem 0;
  background: rgba(46,232,198,.15);
  border: 1px solid rgba(46,232,198,.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.product-ad a { color: var(--text); text-decoration: none; display: block; padding: .3rem; }
.product-ad a:hover { text-decoration: underline; }

/* Section: Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: inherit; }
  .image-frame { page-break-inside: avoid; }
}

/* Section: Accessibility & motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
