/* Base tokens */
:root {
  --bg: #0b1a3a;        /* royal blue – deep base */
  --bg-2: #0a2a5c;      /* royal blue accent layer */
  --text: #eaf6ff;       /* high-contrast text */
  --muted: #b8d0ea;      /* muted text */
  --accent: #dc143c;      /* crimson */
  --accent-2: #4cc9f0;    /* bright accent for hover/focus */
  --glass: rgba(255,255,255,.08);
  --glass-border: rgba(255,255,255,.25);
  --border: rgba(255,255,255,.25);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* Global
   - Mobile-first foundation
   - Layered background: gradient + subtle scanline
*/
* { box-sizing: border-box; }
html { font-family: var(--font); font-size: clamp(14px, 1.2vw, 16px); color: var(--text); line-height: 1.5; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 15% -5%, rgba(255,255,255,.08), transparent 20%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 60%, #000 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  background-blend-mode: overlay, normal, overlay;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}
@media (prefers-color-scheme: light) {
  body { color: #111; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
html, body, header, nav, main, article, aside, footer { scroll-margin: 2rem; }

/* Layout primitives
   - Centered, responsive container
   - Utility grid/card/tag scaffolding
*/
.container {
  width: 100%;
  max-width: clamp(720px, 82vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid { display: grid; gap: 1rem; }
.card {
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  color: var(--text);
  transition: transform .2s var(--ease), background .2s;
}
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(0,0,0,.28);
  color: #fff;
}
.image-frame { /* image presentation frame */
  aspect-ratio: 16/9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  background: #111;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.content { padding: 0.75rem; }

/* Glass panels (frosted glass) with fallback
   - Applies to major sections for cohesion
*/
header, main, article, footer, aside {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, article, footer, aside {
    background: rgba(255,255,255,.15);
  }
}
header { text-align: center; padding: 1.25rem 1rem; }
header h1 { margin: .25rem 0 0.25rem; font-size: clamp(1.75rem, 3vw, 3rem); font-weight: 700; letter-spacing: .4px; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
header .meta { font-size: .9rem; color: var(--muted); margin-top: .25rem; }

/* Navigation
   - Accessible focus ring, high-contrast choices
*/
nav { margin-top: .5rem; }
nav a {
  color: #fff;
  text-decoration: none;
  display: inline-block;
  padding: .5rem .75rem;
  border-radius: 8px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.28);
  transition: transform .2s var(--ease), background .2s;
}
nav a:hover { background: rgba(0,0,0,.28); text-decoration: underline; transform: translateY(-1px); }

/* Main article content
   - Hierarchy: hero-like heading, supporting text, CTAs
*/
main { padding: 1rem; }
article { max-width: clamp(40rem, 72ch, 80rem); margin: 0 auto; padding: 1rem; }
article h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); margin: .75rem 0 0.5rem; }
article p { color: var(--text); opacity: .95; margin: .5rem 0; }
article blockquote {
  border-left: 3px solid var(--accent);
  padding-left: .75rem;
  margin: .5rem 0;
  color: var(--muted);
  font-style: italic;
}
article ul { padding-left: 1.25rem; margin: .5rem 0; }
article li { margin: .25rem 0; color: var(--muted); }

/* Footer / Ad areas
*/
footer { padding: 1rem; text-align: center; }
.product-ad, .sponsored-page {
  display: block;
  padding: .65rem;
  border-radius: 10px;
  margin: .25rem 0;
  background: rgba(9,18,38,.55);
  border: 1px solid rgba(255,255,255,.25);
}
.product-ad a, .sponsored-page a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: .4rem;
}
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Link and button styling
   - ensure accessibility: focus-visible ring
*/
a, button, .btn, .cta { cursor: pointer; text-decoration: none; color: inherit; }
a { color: var(--accent); }
a:hover, a:focus-visible { text-decoration: underline; color: var(--accent-2); outline: none; }
button, .btn, .cta {
  font-family: inherit;
  padding: .6rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.4);
  background: var(--accent);
  color: #fff;
  display: inline-block;
  transition: transform .2s var(--ease), background .2s;
}
.btn { /* generic button class */ }
.btn.primary { background: var(--accent); }
.btn.secondary { background: rgba(255,255,255,.16); color: var(--text); border-color: rgba(255,255,255,.5); }

/* Focus ring for accessibility
   - use :focus-visible for keyboard navigation
*/
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Form controls (presentational alignment)
   - basic styles to match theme
*/
input, select, textarea {
  font-family: inherit;
  padding: .5rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.08);
  color: var(--text);
}
input::placeholder, textarea::placeholder { color: rgba(235,235,255,.6); }

/* Ul/LI default tweaks (WCAG-friendly color)
*/
ul, li { color: var(--text); }

/* Print styles
   - basic readability for print
*/
@media print {
  html, body {
    background: #fff !important;
    color: #000 !important;
  }
  header, main, article, footer, aside {
    background: transparent !important;
  }
  a { color: #000; text-decoration: underline; }
}
