/* Base tokens */
:root {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --text: #e8ffff;
  --muted: #9bd6d9;
  --accent: #00f5ff;
  --accent-2: #00e6ff;
  --panel: rgba(0, 0, 0, 0.28);
  --border: rgba(0, 255, 255, 0.35);
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  --radius: 14px;
  --gap: 1rem;
  --content: rgba(2, 6, 20, 0.6);
}

/* Section: Global & layout reset */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue", sans-serif;
  line-height: 1.5;
  background: 
    linear-gradient(135deg, #000 0%, #040404 60%, #000 100%),
    radial-gradient(circle at 20% 10%, rgba(0,255,255,.08), transparent 40%),
    repeating-linear-gradient(45deg, rgba(0,255,255,.05) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg, rgba(0,255,255,.05) 0 2px, transparent 2px 4px);
  background-attachment: fixed, fixed, fixed, fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }

/* Section: Common helpers */
a, button, .btn, .cta { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
a:hover { text-decoration: underline; }

/* Section: Structural elements styling */
header, nav, main, article, aside, footer {
  display: block;
}
header, footer { padding: 1rem; }
main { padding: 0; }

/* Section: .container, grid, card, tag utilities */
.container {
  width: 100%;
  max-width: clamp(720px, 86vw, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid { display: grid; gap: var(--gap); }
.card {
  background: rgba(8, 8, 12, 0.60);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.no-backdrop { background: rgba(8,8,12,0.86); }

/* Section: Header typography & nav */
header { display: block; max-width: 1100px; margin: 0 auto; }
header h1 {
  font-size: clamp(1.6rem, 1.2rem + 2vw, 3rem);
  line-height: 1.2;
  margin: 0.25rem 0 0.25rem;
  color: var(--text);
}
header .meta {
  font-size: clamp(12px, 0.8vw, 14px);
  color: var(--muted);
}
nav { margin-top: .5rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
nav a { padding: .25rem .5rem; border-radius: 6px; color: var(--text); border: 1px solid rgba(0,255,255,.25); }
nav a:hover { text-decoration: underline; }

/* Section: Content area styling (article content) */
main { padding: 0; }
article { margin: 1rem auto; padding: 1rem; max-width: 1100px; }
.content { padding: 1rem; }

/* Section: Image frame styling */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 255, 0.4);
  box-shadow: 0 8px 20px rgba(0,0,0,.5);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transition: transform .25s ease;
}
.image-frame:hover img {
  transform: scale(1.02);
}

/* Section: Article headings & lists */
article h1 { font-weight: 700; margin: .25rem 0 0.5rem; }
article h2 { font-size: clamp(1.1rem, 0.8vw + 1rem, 1.6rem); margin: .75rem 0 .5rem; color: var(--text); }
article ul { padding-left: 1.25rem; margin: .25rem 0 0.75rem; }
article li { margin: .25rem 0; }

/* Section: Buttons & CTA styling */
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(0,255,255,.6);
  color: #001e1e;
  text-decoration: none;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(0,245,255,.95), rgba(0,230,255,.85));
  transition: transform .15s ease, background .3s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:active, .cta:active { transform: translateY(0); }
.btn.secondary {
  background: rgba(0,0,0,.0);
  border: 1px solid rgba(0,255,255,.6);
  color: var(--text);
}
.btn:focus-visible, .cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Section: Inline anchor/button pairings in footer/ad areas */
.product-ad, .sponsored-page {
  display: inline-block;
  min-width: fit-content;
  padding: .4rem .8rem;
  border-radius: 999px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(0,255,255,.35);
}
.product-ad p, .sponsored-page p { margin: 0; color: var(--text); }

/* Section: Footer layout (glass tiles) */
footer { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); padding-top: 1.5rem; }
footer p { justify-self: start; align-self: end; margin: 0; color: var(--muted); }

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

/* Section: Print (basic readability) */
@media print {
  body { background: white; color: #000; }
  header, nav, footer { display: none; }
  article { background: transparent; padding: 0; margin: 0; }
}
