/* Section: Tokens */
:root {
  --bg: #0b1020;
  --bg-2: #0a1220;
  --surface: rgba(255, 255, 255, 0.08);
  --text: #eaf4ff;
  --muted: #a6b6d3;
  --accent: #3db2ff;
  --accent-2: #8fe0ff;
  --glass: rgba(8, 12, 22, 0.34);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 26px rgba(0,0,0,.32);
  --focus-ring: 0 0 0 3px rgba(63, 194, 255, 0.75);
}

/* Section: Global reset & base typography */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
body {
  margin: 0;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(13, 28, 68, 0.75), rgba(8, 16, 40, 0.85)),
    radial-gradient(circle at 15% -10%, rgba(60,180,255,.20), transparent 40%),
    radial-gradient(circle at 90% 0%, rgba(0,60,120,.20), transparent 40%),
    #05070e;
  min-height: 100%;
  line-height: 1.5;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: 
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(255,255,255,.03) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: 0.6;
  z-index: 0;
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}
h1, h2, h3 { font-weight: 700; margin: .25em 0; color: var(--text); }
p { margin: .75em 0; color: var(--text); }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

/* Section: Layout helpers & containers */
.container { width: min(100%, 1080px); margin-inline: auto; padding: 0 1rem; }
.grid { display: grid; gap: 1rem; }

header, nav, main, article, aside, footer {
  padding: 1rem;
  border-radius: 14px;
  background: rgba(8, 12, 22, 0.34);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: var(--shadow);
}
header { text-align: center; display: grid; gap: .4rem; align-items: center; justify-items: center; padding: 1.75rem 1rem; }
nav { justify-self: center; padding-top: .25rem; }
main { padding-top: 0.5rem; }
article { max-width: 900px; margin-inline: auto; padding: 0 0.25rem 1rem; }

/* Section: Background & glass surfaces */
.image-frame, .featured-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
  background: #000;
}
.image-frame { aspect-ratio: 16 / 9; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Glass panel with fallback */
.glass {
  background: rgba(8, 12, 22, 0.28);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .glass { background: rgba(8, 12, 22, 0.32); }
}
.faux-glass { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: .75rem; }

/* Section: Typography & hero hierarchy */
header h1 { font-size: clamp(1.75rem, 3.5vw + 0.5rem, 3.5rem); line-height: 1.05; letter-spacing: .4px; margin: 0; }
header .meta { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "JetBrains Mono", monospace;
  font-size: clamp(0.8rem, 0.8vw + 0.5rem, 0.95rem);
  color: var(--muted);
  margin-top: .2rem;
}
header nav a { padding: .25rem .5rem; border-radius: 6px; }

/* Section: Images, content blocks, & lists */
.content { font-size: clamp(0.95rem, 0.9vw + 0.8rem, 1.05rem); color: var(--text); }
ul { padding-left: 1.25rem; margin: .75em 0; }
li { margin: .25em 0; }

/* Section: Product Ad & footer blocks */
.product-ad, .sponsored-page { display: block; text-align: center; padding: .75rem; border-radius: 12px; background: rgba(8,12,22,.34); border:1px solid rgba(255,255,255,.28); }
.product-ad a, .sponsored-page a { display: inline-block; padding: .5rem 1rem; border-radius: 999px; background: rgba(63, 170, 255, .25); color: #eaffff; font-weight: 600; }
.product-ad a:hover, .sponsored-page a:hover { background: rgba(63,170,255,.35); text-decoration: underline; }

/* Section: Buttons, CTAs, links */
.btn, .cta { font-family: inherit; font-weight: 600; border-radius: 10px; padding: .65rem 1rem; border: 1px solid rgba(255,255,255,.4); cursor: pointer; transition: transform .15s ease, background .2s ease; display: inline-block; text-align: center; }
.btn { background: rgba(255,255,255,.08); color: var(--text); }
.btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.14); }
.btn:active { transform: translateY(0); }
.btn--solid { background: linear-gradient(135deg, rgba(63, 170, 255, 0.95), rgba(18, 70, 140, 0.95)); border-color: rgba(255,255,255,.9); color: #001022; }
.btn--outline { background: transparent; border-color: rgba(125, 190, 255, 0.9); color: var(--text); }
.cta { padding: .6rem .9rem; }

/* Focus states for accessibility */
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
  outline-offset: 2px;
}
.image-frame:focus { outline: none; } /* image frame not focusable, but keep rule tidy */

/* Section: Utilities (cards, grid, tag) */
.card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: .9rem; }

/* .content styling (as requested) */
.content p { margin-block: .5rem; }

/* .tag utility */
.tag { display: inline-block; padding: .25rem .5rem; font-size: .75rem; border-radius: 999px; background: rgba(63, 170, 255, 0.25); color: #eaffff; }

/* Print styles: readability */
@media print {
  body { background: #fff; color: #000; }
  a { color: #00f; text-decoration: underline; }
  header, nav, main, article, aside, footer { page-break-inside: avoid; }
}

/* Section: Responsive layout tweaks */
@media (min-width: 680px) {
  main { padding-top: .75rem; }
  footer { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
  article { padding: 0 1rem; }
}
@media (max-width: 679px) {
  header { padding: 1.25rem 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}