/* Section: Base & Palette */
:root {
  --bg: #03060a;
  --bg-2: #021018;
  --text: #eaffff;
  --muted: #a8f0f0;
  --accent: #00f5d4;
  --accent-2: #ff2a58;
  --glass: rgba(6,12,20,.22);
  --glass-border: rgba(255,255,255,.28);
  --shadow: 0 8px 28px rgba(0,0,0,.28);
  --focus: 0 0 0 3px rgba(0, 245, 212, .6);
  --radius: 14px;
}

html, body { height: 100%; }

/* Section: Global (mobile-first, responsive, accessible) */
html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background-color: var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  /* Layered background: gradient + subtle noise/scanlines (pure CSS) */
  background-image:
    radial-gradient(circle at 15% 0%, rgba(0,245,212,.25), transparent 40%),
    radial-gradient(circle at 70% 20%, rgba(255,42,88,.25), transparent 40%),
    linear-gradient(135deg, rgba(0,245,212,.15), rgba(255,42,88,.15) 60%, rgba(0,0,0,0) 60%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: screen, screen, overlay, normal;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  html, body { color: #092026; background-color: #f7faff; }
  :root { --text: #0b1b1a; --muted: #5b6e7a; --accent: #00a8a2; --accent-2: #d4002b; --glass: rgba(255,255,255,.8); }
}
/* Section: Layout helpers */
.container {
  width: 100%;
  max-width: clamp(720px, 86vw, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: rgba(6,14,20,.22);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .card { background: rgba(6,14,20,.75); }
}
.tag {
  display: inline-block;
  font-size: .75rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  color: #eaffff;
  border: 1px solid rgba(255,255,255,.25);
}
a, button, .btn, .cta { cursor: pointer; }

/* Section: Typographic scale */
h1, h2, h3, h4 { margin: .25rem 0; font-weight: 700; letter-spacing: .2px; }
h1 { font-size: clamp(1.8rem, 2.6vw + 1rem, 3.75rem); line-height: 1.15; }
h2 { font-size: clamp(1.25rem, 1.6vw + .4rem, 2.25rem); line-height: 1.25; color: var(--text); }
h3 { font-size: clamp(1.05rem, 1.2vw + .7rem, 1.4rem); }
p { margin: .5rem 0 1rem; color: rgba(234,246,255,.92); }
blockquote {
  margin: .5rem 0 1rem;
  padding: .75rem 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(0,0,0,.15);
  border-radius: 8px;
  color: #eaffff;
  font-style: italic;
}
ul { padding-left: 1.25rem; margin: .25rem 0 1rem; color: rgba(235,249,253,.95); }
li { margin: .25rem 0; }

/* Section: Header / Hero elements */
header {
  text-align: center;
  padding: 1.25rem 0 0.5rem;
}
header h1 {
  font-size: clamp(1.6rem, 3vw + 1rem, 3rem);
  line-height: 1.15;
  margin: .25rem 0;
  color: var(--text);
}
header .meta {
  font-size: .875rem;
  color: var(--muted);
}

/* Section: Content area */
main { padding: 0 0 1.5rem; }
article {
  display: block;
  padding: 1rem;
  border-radius: var(--radius);
}
.image-frame, .featured-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  margin: 0 auto 1rem;
}
.image-frame { aspect-ratio: 16 / 9; }
.image-frame img, .featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Glass panels & cards (with fallback) */
.glass {
  background: rgba(6,14,20,.22);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .glass { background: rgba(6,14,20,.75); }
}
.product-ad {
  margin: 1.25rem auto;
  text-align: center;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(6,14,20,.28);
  border: 1px solid rgba(255,255,255,.28);
}
.product-ad h3 { margin: .25rem 0 0.5rem; font-size: 1.05rem; }
.product-ad a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  background: var(--accent);
  color: #021317;
  font-weight: 700;
}
.product-ad a:hover { background: #0fe4d2; }

/* Section: Form controls (base, accessible) */
input, textarea, select, button {
  font: inherit;
  color: inherit;
}
button, [role="button"] { background: transparent; border: 0; padding: 0; }

/* Buttons & CTAs (solid and outline) */
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s;
}
.btn { background: var(--accent); color: #012726; }
.btn:hover { transform: translateY(-1px); background: #00e7d0; }
.btn:active { transform: translateY(0); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(0, 245, 212, .6);
}
.btn-outline:hover { background: rgba(0,245,212,.08); color: var(--text); }

.cta { text-decoration: none; }

/* Focus & accessibility for interactive elements */
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 8px;
}
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline-offset: 2px;
}
a, button { transition: color .15s ease, background .15s ease; }

/* Section: Typography rhythm helpers (utility-ish) */
.small { font-size: .875rem; color: var(--muted); }
.brand { color: var(--accent); }

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

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