/* Tokens: Indigo/Navy themed palette */
:root {
  --bg: #0b1020;
  --bg-2: #0e1730;
  --bg-3: #0a0f1e;
  --text: #e9edff;
  --muted: #a7b1d6;
  --accent: #4b6cff;      /* Indigo/navy accent */
  --accent-2: #7db0ff;     /* Lighter contrast accent */
  --glass: rgba(18, 28, 60, 0.22);
  --glass-border: rgba(120, 140, 255, 0.40);
  --shadow: 0 6px 18px rgba(0,0,0,.40);
  --radius: 12px;
  --focus: #ffffff;
  --focus-offset: 3px;
}

/* Baseline + motion preferences */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  min-height: 100dvh;
  background: 
    linear-gradient(135deg, rgba(10,14,40,.98) 0%, rgba(8,12,28,.98) 60%, rgba(6,9,20,.98) 100%),
    radial-gradient(circle at 20% 0%, rgba(70, 90, 255, .18), transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(0, 0, 60, .25), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 3px);
  background-blend-mode: overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* Grid & cards */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }

/* Typography scale (fluid) */
h1 { font-size: clamp(1.6rem, 0.9rem + 2.6vw, 3.2rem); line-height: 1.08; margin: 0 0 .5rem; letter-spacing: .2px; }
p { font-size: clamp(1rem, 0.4vw + 0.9rem, 1.125rem); line-height: 1.6; color: var(--muted); margin: 0 0 0.75rem; }
.content { max-width: 60ch; margin: 0 auto; padding: 0.5rem 0 1rem; }

/* Image frame styling */
.image-frame { width: min(100%, 900px); aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid rgba(150,170,255,.45); background: #111; box-shadow: 0 8px 28px rgba(0,0,0,.40); margin: 0 auto; display: block; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Glass panel aesthetic (with fallback) */
.glass { background: rgba(18, 28, 60, 0.22); border: 1px solid var(--glass-border); border-radius: 12px; padding: 1rem; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow); }
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(18, 28, 60, 0.78); }
}

/* Links and buttons */
a, button, .btn, .cta { color: var(--text); text-decoration: none; outline: none; }
a:hover, a:focus { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: var(--focus-offset);
  border-radius: 6px;
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(75,108,255,0.65);
  background: linear-gradient(#5b6cff, #3a4aff);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: transparent;
  border: 1px solid rgba(120, 140, 240, 0.8);
  color: var(--text);
}
.cta { padding: .75rem 1.15rem; border-radius: 999px; border: 1px solid rgba(120,150,240,.5); background: rgba(20,30,70,.65); }

/* Utility elements (lists, tags) */
ul { margin: 0.75rem 0; padding-left: 1.25rem; color: var(--muted); }
li { margin: 0.25rem 0; list-style: disc; }

/* Sectioned content areas */
header, nav, main, article, aside, footer, html, body { scroll-behavior: smooth; }

/* Structural selectors styling (ensures coverage) */
header { padding: 2rem 0 1rem; text-align: center; }
nav { display: flex; justify-content: center; gap: 1rem; padding: 0.5rem 0; }
main { padding: 1rem 0 2rem; }
article { display: block; padding: 0; }
aside { display: none; }

/* Footer styling */
footer { padding: 1.25rem 1rem 2rem; text-align: center; color: var(--muted); }

/* Product ad / sponsor blocks inside footer */
.product-ad, .sponsored-page { display: inline-block; margin: 0.25rem; padding: 0.75rem 1rem; border-radius: 999px; background: rgba(14, 22, 60, 0.34); border: 1px solid rgba(120, 140, 255, 0.42); }
.product-ad a, .sponsored-page a { color: var(--text); }

/* Print styles (basic readability) */
@media print {
  body { background: white; color: black; }
  a { text-decoration: underline; }
}
  
/* Motion reductions */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}

/* Light-mode overrides (improve legibility when user prefers light) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fb;
    --bg-2: #eef1f9;
    --bg-3: #e7eefe;
    --text: #0b1020;
    --muted: #3b3b5a;
    --accent: #4b6cff;
    --accent-2: #2a6bff;
  }
  body {
    background: linear-gradient(135deg, #f7f7fb 0%, #eef1f9 60%, #e9f0ff 100%), 
                radial-gradient(circle at 20% 0%, rgba(75,110,255,.25), transparent 40%),
                repeating-linear-gradient(to bottom, rgba(0,0,0,.03) 0 1px, transparent 1px 3px);
  }
  .glass { background: rgba(255,255,255,.75); border-color: rgba(100,120,210,.5); color: #0b1020; }
  .image-frame { border-color: rgba(100,120,210,.5); }
  .btn { border-color: rgba(75,108,255,.8); }
}
