/* Section: Tokens & Reset */
:root{
  --bg: #0a0b17;
  --bg-2: #0e1020;
  --surface: rgba(18, 22, 36, 0.65);
  --surface-2: rgba(255, 255, 255, 0.08);
  --text: #e9eaf7;
  --muted: #a6a9b7;
  --accent: #7a5cff;
  --accent-2: #00e5ff;
  --card: rgba(18, 22, 34, 0.66);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 8px 28px rgba(0,0,0,0.28);
  --focus: 0 0 0 3px rgba(100,200,255,.6);
}

/* Section: Base & Layout Layering */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Noto Sans", sans-serif; line-height: 1.5; }
body {
  margin: 0;
  color: var(--text);
  min-height: 100dvh;
  background: 
    linear-gradient(135deg, rgba(20,0,60,0.25) 0%, rgba(0,170,255,0.12) 40%, rgba(0,0,0,0) 100%),
    linear-gradient(180deg, rgba(8,12,28,0.7), rgba(8,12,28,0.45) 60%, rgba(8,12,28,0.7) 100%),
    radial-gradient(circle at 20% -10%, rgba(160,90,255,0.25), transparent 25%),
    radial-gradient(circle at 80% 0%, rgba(0,230,255,0.15), transparent 20%),
    #0a0b17;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before{
  content:"";
  position: fixed; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,.04) 0px,
    rgba(255,255,255,.04) 2px,
    transparent 2px,
    transparent 4px
  );
  mix-blend-mode: overlay;
  z-index: 0;
}
body::after{
  content:"";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 8px 8px, rgba(255,255,255,.06) 1px, transparent 1px),
    radial-gradient(circle at 40px 20px, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mix-blend-mode: overlay;
  opacity: .6;
  z-index: 0;
}
*, :before, :after { box-sizing: inherit; }

/* Section: Structural selectors (styling targets) */
html, body, header, nav, main, article, footer, aside { height: auto; }

/* Section: Glass panels (fallback + backdrop-filter) */
.panel {
  background: rgba(18, 22, 34, 0.66);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: 1rem;
  position: relative;
}
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .panel { background: rgba(18, 22, 34, 0.78); }
}

/* Section: Container & grid utilities */
.container {
  width: 100%;
  max-width: clamp(640px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: .75rem; }

/* Section: Typography & headings */
h1, h2, h3 { margin: .25rem 0 .5rem; line-height: 1.25; font-weight: 700; letter-spacing: .2px; }
h1 { font-size: clamp(1.75rem, 4vw + 1rem, 3rem); }
h2 { font-size: clamp(1.25rem, 1.8vw + 1rem, 1.75rem); }
h3 { font-size: clamp(1rem, 1vw + .9rem, 1.25rem); color: var(--text); }

/* Section: Imagery */
.image-frame {
  width: 100%; aspect-ratio: 16 / 9; border-radius: 14px;
  overflow: hidden; border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  background: #111;
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Content helpers */
.content { padding: .5rem 0; color: var(--text); }

/* Section: Links & buttons */
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; color: var(--accent); }
button, .btn, .cta {
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  padding: .6rem 1rem;
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #5b7aff 70%);
}
.btn.secondary, .cta.secondary {
  background: rgba(255,255,255,.08);
  color: var(--text);
  border-color: rgba(255,255,255,.25);
}
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  transform: translateY(-0.5px);
}
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); }
.btn[disabled], .cta[disabled], button[disabled] { opacity: .6; cursor: not-allowed; }

/* Section: Utility typography tokens for content surfaces */
.tag {
  display:inline-block;
  padding: .15rem .5rem;
  font-size: .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  color: #dbe0ff;
  background: rgba(122,92,255,.25);
  line-height: 1;
}
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Section: Hero-like emphasis for header */
header {
  padding-block: 1.25rem;
  padding-inline: 1rem;
  position: relative;
  z-index: 1;
  display: block;
  border-bottom: 1px solid rgba(255,255,255,.15);
  background: rgba(12,15,28,.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
header h1 { margin: 0 0 .25rem; color: #eef; }
header .meta { margin: 0; font-size: .9rem; color: var(--muted); }

/* Section: Page layout sections */
main { padding: 1rem 0 2rem; }
article { display: block; }

/* Section: Feature layout adjustments for content sections */
@media (min-width: 768px){
  .content { padding-inline: 0; }
}
footer { padding: 1rem; display: block; }

/* Section: Specific component hooks */
.product-ad { display: inline-block; width: 100%; padding: 1rem; }
.product-ad h3 { margin: .25rem 0 0.5rem; font-size: 1.05rem; }
.product-ad a { text-decoration: none; display: block; padding: .5rem; border-radius: 10px; }

/* Section: Print (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #00f; }
}
  
/* Section: Motion preferences */
@media (prefers-reduced-motion: reduce){
  * { animation: none !important; transition: none !important; }
}