/* Base Tokens */
/* Section: Tokens */
:root {
  --bg: #0a1020;           /* midnight blue core */
  --bg-2: #0e1a2b;         /* deeper steel */
  --bg-3: #141c2b;         

  --text: #eaf4ff;          /* high-contrast on dark */
  --muted: #a9b7d4;

  --glass: rgba(14, 22, 40, 0.22);
  --glass-deep: rgba(14, 22, 40, 0.28);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 24px rgba(0,0,0,.38);
  --surface: rgba(16, 24, 48, 0.32);

  --accent: #38e4ff;        /* cyber cyan */
  --accent-2: #9a5cff;        /* neon purple */

  --radius: 12px;
  --radius-sm: 10px;
  --gap: 1rem;
}

/* Section: Global / Base */
*,
*::before,
*::after { box-sizing: border-box; }

html, body, header, nav, main, article, aside, footer { height: auto; }

html, body {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(7, 12, 22, 0.92) 0%, rgba(10, 14, 28, 0.92) 60%, rgba(9, 12, 22, 0.92) 100%),
    radial-gradient(circle at 20% -10%, rgba(70, 0, 120, 0.25), transparent 40%),
    radial-gradient(circle at 90% 0%, rgba(0, 170, 255, 0.15), transparent 40%),
    #0a1020;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial;
  font-size: clamp(14px, 0.9vw + 12px, 18px);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

body::before {
  /* subtle pixel/noise scan overlay */
  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;
  mix-blend-mode: overlay;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
  * { transition: none !important; animation: none !important; }
}

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

.grid {
  display: grid;
  gap: var(--gap);
}

.card {
  background: rgba(10, 14, 28, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: saturate(110%) blur(12px);
  -webkit-backdrop-filter: saturate(110%) blur(12px);
}

@supports not (backdrop-filter: blur(12px)) {
  .card { background: rgba(10, 14, 28, 0.60); }
}

/* Section: Typographic rhythm */
h1, h2, h3 {
  margin: 0 0 .5rem;
  line-height: 1.15;
}

p { margin: 0 0 1rem; color: color-m-m; }

h1 {
  font-size: clamp(1.4rem, 2.5vw + 1rem, 2.8rem);
  letter-spacing: .2px;
  font-weight: 700;
}

h2 { font-size: clamp(1.1rem, 1.5vw + 0.8rem, 1.6rem); }

a { color: inherit; text-decoration: none; }

/* Section: Header / Navigation */
header {
  padding: 1rem 0;
  position: relative;
  z-index: 2;
}

header h1 {
  font-family: system-ui, -apple-system, "Segoe UI";
  font-size: clamp(1.25rem, 2vw + 1rem, 2rem);
  margin: 0 0 .25rem;
  font-weight: 700;
  letter-spacing: .2px;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  padding: .25rem .6rem;
  display: inline-block;
  transition: transform .15s ease, background .2s ease;
}
nav a:hover { text-decoration: underline; background: rgba(56, 228, 255, 0.12); transform: translateY(-1px); }
nav a:focus-visible { outline: 2px solid #9bd1ff; outline-offset: 3px; }

/* Section: Main / Article */
main { padding: 1rem 0; }

/* Section: Image Frame */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: scale(1);
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Section: Content (content wrapper) */
.content {
  display: block;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(10, 16, 32, 0.28);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: var(--shadow);
}

ul, li { margin: 0; padding: 0; list-style: none; }

/* Section: Product Ad / Footer blocks */
.product-ad {
  display: block;
  margin: 1rem 0;
}
.product-ad a {
  text-decoration: none;
  display: block;
  padding: .75rem 1rem;
  border-radius: 999px;
  text-align: center;
  background: linear-gradient(135deg, rgba(56,228,255,0.95), rgba(156,92,255,0.95));
  color: #041018;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.product-ad a:hover { transform: translateY(-1px); }

.sponsored-page {
  display: block;
  margin: .5rem 0;
}
.sponsored-page a {
  text-decoration: none;
  display: block;
  padding: .75rem 1rem;
  border-radius: 999px;
  text-align: center;
  background: rgba(0,0,0,0.28);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.28);
}
footer { padding: 1rem 0; }

/* Section: Button / Link variants */
.btn, .cta, button, a.btn, a.cta {
  font-family: inherit;
  font-weight: 700;
  border-radius: 999px;
  padding: .65rem 1rem;
  border: 1px solid rgba(255,255,255,.5);
  color: #041018;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease;
  background: rgba(255,255,255,.92);
}
.btn:hover, .cta:hover, button:hover, a.btn:hover, a.cta:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.98);
}
.btn:active, .cta:active, button:active, a.btn:active, a.cta:active {
  transform: translateY(0);
}
.btn:focus-visible, .cta:focus-visible, button:focus-visible, a.btn:focus-visible, a.cta:focus-visible {
  outline: 2px solid #9bd1ff;
  outline-offset: 2px;
}
.btn.primary {
  background: linear-gradient(135deg, rgba(56,228,255,0.95), rgba(156,92,255,0.95));
  color: #041018;
  border: 1px solid rgba(255,255,255,.85);
}
.btn.outline {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.45);
  color: var(--text);
}
.cta {
  padding-inline: 1.25rem;
  height: 2.75rem;
}

/* Section: Misc helpers */
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
}

/* Section: Accessibility helpers */
:focus { outline: none; }
:focus-visible { outline: 2px solid #9bd1ff; outline-offset: 2px; }

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