/* Base */
:root {
  --bg: #0b1020;
  --bg-2: #0a0f24;
  --surface: rgba(14, 12, 28, 0.72);
  --surface-2: rgba(255, 255, 255, 0.08);
  --text: #e9e7ff;
  --muted: #a6a2d9;
  --accent: #4f6aff;      /* indigo */
  --accent-2: #ffd34d;    /* yellow */
  --ring: 0 0 0 3px rgba(79, 106, 255, 0.6);
  --focus: 0 0 0 3px rgba(255, 211, 77, 0.6);
  --shadow: 0 8px 24px rgba(0,0,0,0.4);
  --radius: 14px;
  --glass-border: 1px solid rgba(255,255,255,0.25);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

/* Layered background: gradient + subtle noise/scanline */
html, body {
  color-scheme: dark;
}
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial;
  color: var(--text);
  line-height: 1.55;
  background:
    linear-gradient(135deg, rgba(4,8,28,0.92), rgba(6,8,20,0.92)),
    radial-gradient(circle at 20% 0%, rgba(120, 110, 255, 0.18), transparent 40%),
    /* subtle scanlines */
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 3px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Layout helpers */
.container { width: min(92vw, 1120px); margin-inline: auto; padding: 0 1rem; }

/* Section elements (present in markup) */
header, nav, main, article, aside, footer { padding: 0; margin: 0; }

/* Base typography scale */
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0 0 1rem; }

/* Header: glassy hero */
header {
  padding: 2.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(12, 9, 28, 0.65);
  border-bottom: var(--glass-border);
  border-radius: 0 0 12px 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
header h1 {
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw + 0.5rem, 2.9rem);
  letter-spacing: .02em;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
  color: var(--text);
}
header .sub { color: var(--muted); font-size: clamp(0.95rem, 1vw + 0.4rem, 1.05rem); }

/* Main content */
main { padding: 1.25rem 1rem; }

/* Image frame styling */
.image-frame {
  width: min(100%, 720px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  background: #111;
  display: block;
  margin: 0 auto;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  /* subtle glow for emphasis on edges */
  filter: saturate(1.05);
}

/* Glass panels / cards */
.card, .product-ad, .sponsored-page {
  background: rgba(14, 12, 28, 0.72);
  border: var(--glass-border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

/* Optional utility for listless sections */
ul { list-style: none; padding: 0; margin: 0; }

/* Footer "ad" sections */
footer {
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}
.product-ad, .sponsored-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .5rem 1rem;
  border-radius: 999px;
  text-align: center;
}
.product-ad a, .sponsored-page a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }
.product-ad p, .sponsored-page p { margin: 0; font-weight: 600; }

/* Links, buttons, CTAs */
a { color: var(--accent); text-decoration: none; outline: none; }
a:hover, a:focus { text-decoration: underline; }

/* Focus treatment for keyboard users */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }

/* Button variants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: linear-gradient(135deg, rgba(79,106,255,0.95), rgba(23,41,176,0.95));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.5);
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(124,138,255,0.6); }

/* CTAs for hero */
.cta { text-decoration: none; }

/* Utility pattern: tag pills */
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  line-height: 1;
  background: rgba(124, 138, 255, 0.25);
  color: var(--text);
  border: 1px solid rgba(124,138,255,0.5);
  margin-right: .4rem;
}

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

/* Typography helpers (compact headline block) */
.kicker {
  color: var(--muted);
  font-size: clamp(0.8rem, 1vw + 0.4rem, 1rem);
  letter-spacing: .12em;
  text-transform: uppercase;
}

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

/* Dark mode fallback: light-mode variant for legibility */
@media (prefers-color-scheme: light) {
  :root { color-scheme: light; }
  body {
    background: #f7f7fb;
    color: #0a0a1a;
  }
  header {
    background: rgba(255,255,255,0.9);
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }
  .card, .product-ad, .sponsored-page {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  }
  a { color: #1a4ed8; }
}

/* Print */
@media print {
  body { background: #fff; color: #000; }
  .image-frame { page-break-inside: avoid; }
}

/* Ensure basic form element styling (if present) */
input, button, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}
input::placeholder { color: rgba(255,255,255,0.6); }

/* Ensure imagery and text contrast on glass surfaces */
@supports (backdrop-filter: blur(1px)) {
  .card { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}