/* Palette & Foundations */
:root{
  --bg: #041b1b;
  --bg-2: #0a2a2a;
  --text: #e8fffe;
  --muted: #9de6e0;
  --accent: #0bd6c0;     /* teal/cyan accent */
  --accent-2: #ff4da6;   /* plasma pink accent */
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.12);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 8px 26px rgba(0,0,0,.25);
  --radius: 14px;
  --radius-sm: 10px;
}
html, body { height: 100%; }
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

/* Layered background: gradient + subtle scanlines/noise (pure CSS) */
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Noto Sans", sans-serif;
  line-height: 1.55;
  background: linear-gradient(135deg, rgba(0,210,210,.25), rgba(255,0,120,.15) 60%, rgba(0,0,0,.15)),
              linear-gradient(#051d1e, #041b1b 60%, #021212);
  position: relative;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
  opacity: .6;
}

/* Layout helpers */
.container {
  width: min(1100px, 92%);
  margin-inline: auto;
  padding: 0 1rem;
}
.grid { display: grid; gap: 1rem; }
.grid.auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Glass panels (with backdrop-filter, plus a fallback) */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
}
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .glass { background: rgba(255,255,255,.12); }
}

/* Image frame rules (present and future-proof) */
.image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content scaffolding (section-level/fallback) */
.content { padding: .5rem 0; color: var(--text); }

/* Specific page blocks */
.product-ad, .sponsored-page {
  display: block;
  margin: .75rem 0;
}
.product-ad a, .sponsored-page a { text-decoration: none; color: var(--text); display: block; padding: .75rem 1rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.15); text-align: center; }
footer { padding: 1rem 0; }
footer p { color: var(--muted); font-size: .9rem; margin: .25rem 0; }

/* Typography scales (mobile-first, fluid) */
h1, h2, h3 { color: var(--text); margin: .6rem 0; }
h1 {
  font-size: clamp(1.8rem, 2vw + 1rem, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
h2 { font-size: clamp(1.25rem, 1vw + .75rem, 1.75rem); margin-top: 1.25rem; }
p { font-size: clamp(0.95rem, 0.9vw + .8rem, 1.125rem); line-height: 1.6; color: var(--text); margin: .5rem 0 1rem; }

/* Lists */
ul, ol { padding-left: 1.25rem; margin: .25rem 0 1rem; color: var(--text); }
li { margin: .25rem 0; }

/* Links & interactive controls */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 6px;
}
button, .btn, .cta {
  font: inherit;
  cursor: pointer;
  border: 0;
  padding: .65rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: #041414;
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  transition: transform .15s ease, background .2s ease;
}
.btn { background: linear-gradient(135deg, var(--accent), #0fb2a9); color: #041414; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.outline, .cta { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.5); }
.btn.outline:hover, .cta:hover { text-decoration: underline; }

/* Accessibility helpers for focus in links/buttons inside glass areas */
.focus-ring:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

/* Form elements (basic styling for parity) */
input, textarea {
  padding: .5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  color: var(--text);
  outline: none;
}
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

/* Layout refinements for semantic regions */
header, nav, main, article, aside, footer {
  display: block;
}
header { padding: 2rem 0 1rem; }
header h1 { margin: 0 0 .25rem; font-weight: 700; }

/* Footer inline sections styling for glassy cards */
footer { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; align-items: start; }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .glass { background: #fff; border-color: #ccc; box-shadow: none; }
}

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