/* Base System & Tokens */
:root {
  --bg: #0b1417;
  --bg-2: #0e1a1d;
  --text: #e6ffff;
  --muted: #9bd1d9;
  --accent: #00e5d5;
  --accent-2: #00d2e6;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.12);
  --border: rgba(0,255,255,0.28);
  --shadow: 0 8px 28px rgba(0,0,0,.55);
  --ring: 0 0 0 3px rgba(0,255,255,.55);
  --focus: rgba(0,255,255,.6);
}
html, body { height: 100%; }
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  /* Layered background: gradient + subtle glow + scanlines (pure CSS) */
  background:
    radial-gradient(circle at 15% 10%, rgba(0,255,255,.15), transparent 40%),
    linear-gradient(135deg, #071a1d 0%, #04161a 60%, #021316 100%),
    repeating-linear-gradient(to bottom, rgba(0,255,255,.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  background-color: #021018;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}
a, button, .btn, .cta { text-decoration: none; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--ring); outline-offset: 2px; }

/* Layout Utilities */
.container {
  width: min(100%, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid { display: grid; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1rem; box-shadow: var(--shadow); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); }

/* Section headers style (sectioned for readability in large layouts) */
.header, .content, .image-frame, .product-ad { /* reserved sections, targetable below */ }

/* Typography scale (fluid) */
h1, h2 { margin: .25rem 0; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 2.2vw + 1rem, 3rem); color: var(--accent-2); letter-spacing: .4px; }
h2 { font-size: clamp(1.25rem, 1.4vw + .8rem, 2rem); color: #aaf7f7; }

/* Header & navigation (if present) */
header {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(0,255,255,.25);
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 3;
}
header h1 { margin: 0; font-size: clamp(1.6rem, 2vw + 1rem, 2.6rem); color: var(--accent); }

/* Content area */
main { padding: 1rem 0; }
.article { max-width: 800px; margin-inline: auto; }

/* Image frame with aspect ratio and glow */
.image-frame {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(0,255,255,.4);
  box-shadow: 0 8px 22px rgba(0,0,0,.5);
  background: #000;
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content blocks */
section { margin: 1rem 0; padding: 0; }
p { color: var(--text); margin: .6rem 0; }
blockquote {
  margin: .6rem 0;
  padding-left: 1rem;
  border-left: 3px solid rgba(0,255,255,.5);
  color: var(--muted);
  font-style: italic;
}
ul { margin: .4rem 0; padding-left: 1.25rem; color: var(--text); }
li { margin: .25rem 0; }

/* Utility: tag */
.tag {
  display: inline-block;
  padding: .15em .6em;
  border-radius: 999px;
  font-size: .75rem;
  color: var(--text);
  background: rgba(0,255,255,.18);
  border: 1px solid rgba(0,255,255,.38);
}

/* Product ad / footer-like blocks */
.product-ad { display: grid; gap: .4rem; margin: .75rem 0; }
.product-ad a {
  display: block;
  padding: .75rem 1rem;
  border-radius: 10px;
  background: rgba(0,0,0,.26);
  border: 1px solid rgba(0,255,255,.55);
  color: var(--text);
  text-align: center;
  transition: transform .2s ease, background .2s;
}
.product-ad a:hover { transform: translateY(-1px); text-decoration: underline; background: rgba(0,0,0,.32); }

/* Links & interactive elements (solid + outline) */
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; outline: none; }
.btn, .cta { display: inline-block; user-select: none; cursor: pointer;
  padding: .55em .95em; border-radius: 8px; border: 1px solid rgba(0,255,255,.6);
  background: var(--accent); color: #001b1e; font-weight: 600;
  transition: transform .2s, background .2s;
}
.btn:hover, .cta:hover { transform: translateY(-1px); background: #00e0d0; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); outline-offset: 2px; }
.btn--outline {
  background: transparent; color: var(--text);
  border: 1px solid rgba(0,255,255,.8);
}
.ghost { background: transparent; border: none; color: var(--text); }

/* Lists & misc utilities */
ul.inline { padding-left: 0; display: flex; gap: .5rem; flex-wrap: wrap; list-style: none; }
ul.inline li { margin: 0; padding: 0; }

/* Footer styling */
footer {
  padding: 1rem;
  border-top: 1px solid rgba(0,255,255,.25);
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: center;
}
footer p { margin: .25rem 0 0; color: var(--muted); }

/* Glass panel fallback for environments without backdrop-filter */
@supports not (backdrop-filter: blur(8px)) {
  .card, .product-ad, header, footer, main { background: rgba(255,255,255,.14); }
  .card { border-color: rgba(0,255,255,.4); }
}

/* Layout helpers for responsive grids */
@media (min-width: 560px) {
  .container { padding-inline: 0; }
}
@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Light mode variant (improves legibility when user prefers light) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6fbfb;
    --bg-2: #eef7f7;
    --text: #0a1f22;
    --muted: #345a63;
    --surface: rgba(255,255,255,.88);
    --surface-2: rgba(255,255,255,.92);
    --border: rgba(0,0,0,.15);
    background: linear-gradient(135deg, #f6fbfb 0%, #e9f3f3 60%, #e1f0f2 100%);
  }
  body { color-scheme: light; color: var(--text); }
  header, footer { background: rgba(255,255,255,.85); border-color: rgba(0,0,0,.08); }
  a { color: #0a6a8a; }
  .image-frame { border-color: rgba(0, 120, 120, .4); }
  .btn { background: #0a9eab; color: #002026; }
  .btn:hover { background: #0cb6bd; }
  blockquote { color: var(--muted); }
}

/* Print readability (tiny) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
  .image-frame { page-break-inside: avoid; }
}