/* Section: Token Palette & Base */
:root {
  --bg: #00f6ff;
  --bg-2: #0a0f14;
  --text: #e8f8fb;
  --muted: #aab6bf;
  --pewter: #97a0a9;
  --accent: #1ff0e0;
  --accent-2: #9fb0bb;
  --glass: rgba(255,255,255,.08);
  --glass-2: rgba(255,255,255,.14);
  --surface: rgba(0,0,0,.28);
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0,0,0,.35);
  --focus: 0 0 0 3px rgba(0,255,230,.6);
  --maxw: clamp(320px, 92vw, 1100px);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #d9fbfb;
    --bg-2: #f6f9fb;
    --text: #0b1b1b;
    --muted: #2b3a40;
    --pewter: #5c6970;
    --accent: #006f75;
    --accent-2: #8a98a2;
    --glass: rgba(0,0,0,.08);
    --glass-2: rgba(0,0,0,.12);
    --surface: rgba(255,255,255,.65);
    --shadow: 0 6px 18px rgba(0,0,0,.15);
  }
}
@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
  :root { --glass: rgba(255,255,255,.10); }
}
/* Section: Global */
html, body { height: 100%; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  line-height: 1.55;
  min-height: 100%;
  /* Layered background: gradient + subtle scanlines/noise illusion */
  background-color: var(--bg-2);
  background-image:
    linear-gradient(135deg, rgba(0,0,0,.25), rgba(0,0,0,.05)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    linear-gradient(135deg, var(--bg) 0%, #001e1f 100%);
  background-blend-mode: overlay, overlay, normal;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: none; box-shadow: none; outline: none; }

/* Section: Layout primitives */
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.tag { display: inline-block; padding: .15em .6em; border-radius: 999px; font-size: .75rem; color: #001; background: rgba(255,255,255,.85); }

/* Section: Structural elements */
html, body, header, nav, main, article, footer, aside { display: block; }
header { padding: 2rem 1rem; text-align: center; }
header h1 { margin: 0.25rem 0 0; font-size: clamp(1.75rem, 1.2rem + 2vw, 3rem); letter-spacing: .5px; }
header .meta { margin-top: .25rem; font-size: clamp(.9rem, .4vw + .8rem, 1rem); color: var(--muted); }

/* Section: Content & typography */
main { padding: 1rem; }
article { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1rem 1rem; }
h2 { font-size: clamp(1.25rem, 0.8rem + 2vw, 2.2rem); margin: .6rem 0; color: var(--text); }
p { color: var(--muted); margin: .5rem 0 1rem; }
blockquote { margin: .5rem 0; padding: .5rem 1rem; border-left: 3px solid var(--accent); background: rgba(255,255,255,.05); border-radius: 6px; color: var(--text); }

/* Section: Media & visuals */
.featured-image { width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); box-shadow: 0 8px 22px rgba(0,0,0,.25); margin: .5rem 0 1rem; aspect-ratio: 16/9; display: block; }
.featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Image frame utility (also styling possibility) */
.image-frame { aspect-ratio: 16/9; width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); box-shadow: 0 6px 18px rgba(0,0,0,.25); background: #000; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Glass panels & surfaces */
.glass { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.fallback-glass { background: rgba(255,255,255,.12); }

/* Section: Interactive elements */
button, .btn, .cta { font: inherit; padding: .6rem 1rem; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #001; cursor: pointer; display: inline-block; font-weight: 600; transition: transform .2s ease, background .2s ease; }
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); background: #0ee7da; }
.btn.secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
button:focus-visible, .btn:focus-visible, .cta:focus-visible { outline: none; box-shadow: var(--focus); }

/* Section: Lists & navigation tweaks */
ul { padding-left: 1.25rem; margin: .5rem 0 1rem; }
li { margin: .25rem 0; }

/* Section: Footer & ads (glass panels) */
.product-ad { display: block; width: min(720px, 92%); margin: .75rem auto; padding: .9rem; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); text-align: center; }
.product-ad a { color: var(--text); text-decoration: none; display: block; padding: .25rem; }
.product-ad a:hover { text-decoration: underline; }

/* Section: Print */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
  img { max-width: 100%; height: auto; }
}

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

/* Section: Layout helpers (responsive tweaks) */
@media (min-width: 720px) {
  header { padding: 2.5rem 1rem; }
  main { padding: 1.25rem 0; }
}
@media (min-width: 1024px) {
  .container { padding-inline: 0; }
  article { padding: 0 0.5rem; }
}