/* Section: Tokens */
:root {
  --bg: #00e5ff;               /* cyan base background */
  --bg-2: #001a2b;             /* deep indigo/cyan depth */
  --text: #eaffff;              /* high-contrast text on cyan base */
  --muted: #a6d6e6;             /* muted copy for supporting text */
  --accent: #3f5bd8;            /* indigo accent */
  --accent-2: #6ee8ff;           /* cyan highlight */
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(0,0,0,0.28);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 8px 28px rgba(0,0,0,.35);
  --radius: 14px;
  --radius-sm: 10px;
  --ring: 0 0 0 4px rgba(0,255,255,.55);
  --focus-out: 0 0 0 3px rgba(0,255,255,.75);
}

/* Section: Base & Reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  /* Layered background: cyan base + subtle indigo glow + scanlines/noise */
  background-image:
    linear-gradient(135deg, rgba(63,81,181,.28), rgba(0,0,0,0) 50%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.05) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.12), transparent 30%);
  background-blend-mode: overlay;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }

/* Section: Layout helpers */
.container { width: min(1100px, 92%); margin-inline: auto; padding-block: 1rem; padding-inline: 0.5rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; box-shadow: var(--shadow); }

/* Section: Core elements (semantic) */
html, body, header, nav, main, article, footer, aside {
  /* ensure consistent box sizing and predictable rendering across sections */
  min-height: 0;
}
header, main, footer, aside {
  background: rgba(8,12,28,0.28);
  border: 1px solid rgba(120,190,255,0.45);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0.75rem auto;
  width: min(1100px, 92%);
  /* Glass look with backdrop when supported */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside { background: rgba(8,12,28,0.66); }
}
header { text-align: center; }
header h1 { margin: 0; font-size: clamp(1.75rem, 1.2rem + 2.5vw, 3rem); line-height: 1.15; }

/* Section: Content helpers */
.content { padding: .5rem 0; color: var(--text); }

/* Section: Media frame */
.image-frame {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.15);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Content framing (for potential text blocks) */
ul, li { margin: 0; padding: 0; list-style: disc inside; }
li { margin: .25rem 0; }

/* Section: Product ad / footer panels */
.product-ad, .sponsored-page {
  display: block;
  text-align: center;
  padding: .75rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(8,12,28,.28);
}
.product-ad a, .sponsored-page a {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.product-ad:hover, .sponsored-page:hover { transform: translateY(-1px); transition: transform .2s ease; }

/* Section: Typography (hero) */
h2, h3, h4 { margin: .25rem 0; font-weight: 600; }
p { margin: .5rem 0 0; color: var(--muted); }

/* Section: Links & CTAs */
a, button, .btn, .cta {
  font-family: inherit;
  color: var(--text);
  text-decoration: none;
  outline: none;
}
a { transition: color .2s ease, text-decoration-color .2s ease; }
a:hover, a:focus { text-decoration: underline; text-underline-offset: 3px; }
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn { background: var(--accent); color: white; }
.btn.secondary { background: rgba(255,255,255,.15); color: #fff; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); filter: brightness(.98); }

/* Outline variant for buttons/CTAs */
.btn.outline, .cta.outline {
  background: transparent;
  border: 2px solid rgba(63,81,181,.95);
  color: var(--text);
}
.btn.outline:hover { background: rgba(63,81,181,.15); }

/* Focus visibility for interactive elements (high-contrast) */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-out);
  border-radius: 999px;
}
a:focus-visible { box-shadow: none; outline: 0; }
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}

/* Section: Utilities */
.content .tag {
  display: inline-block;
  padding: .25rem .5rem;
  font-size: .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.15);
  color: #eaffff;
}
.container:where(.content) { padding: 0; }

/* Section: Print styles */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
  header, main, footer { border: none; background: transparent; box-shadow: none; }
}
  
/* Section: Accessibility helpers for structure */
@media (min-width: 0) {
  a, button { -webkit-tap-highlight-color: transparent; }
}
  
/* Section: Light-mode variant (prefers-color-scheme) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #eaf7ff;
    --bg-2: #dbeaff;
    --text: #0b1a2b;
    --muted: #3a5480;
    --accent: #1f3a95;
    --accent-2: #0a6b8e;
    --surface: rgba(255,255,255,.92);
    --surface-2: rgba(0,0,0,.08);
    --border: rgba(0,0,0,.2);
  }
  body {
    background-image:
      linear-gradient(135deg, rgba(31,58,149,.20), rgba(0,0,0,0) 60%),
      repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  }
  header, main, footer, aside {
    background: rgba(255,255,255,.75);
    border: 1px solid rgba(0,0,0,.15);
  }
}
