/* Base */
:root {
  --bg: #0b1117;
  --bg-2: #0a1b1f;
  --text: #e9fff6;
  --muted: #a8e2d4;
  --accent: #2ee6c9;
  --accent-2: #ffd34d;
  --surface: rgba(16, 38, 52, 0.22);
  --surface-2: rgba(12, 58, 70, 0.28);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 28px rgba(0,0,0,.32);
  --radius: 14px;
  --text-on-accent: #06241a;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.6;
  color: var(--text);
  /* Layered background: teal checkerboard + gradient + subtle scanlines/noise */
  background-color: #050a0e;
  background-image:
    /* Teal checkerboard pattern (subtle) */
    linear-gradient(45deg, rgba(46,230,201,.20) 25%, rgba(46,230,201,0) 25%),
    linear-gradient(-45deg, rgba(46,230,201,.20) 25%, rgba(46,230,201,0) 25%),
    /* base dark gradient */
    linear-gradient(135deg, rgba(0,0,0,.60), rgba(0,0,0,.25) 60%, rgba(0,0,0,.60)),
    /* faint horizontal scanlines for depth */
    repeating-linear-gradient(to bottom, rgba(0,0,0,.08) 0 1px, transparent 1px 3px);
  background-size: 32px 32px, 32px 32px, 100% 100%, 100% 100%;
  background-position: 0 0, 8px 8px, 0 0, 0 0;
  background-attachment: fixed;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0;
  isolation: isolate;
}
:root body { overflow-x: hidden; }

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

/* Layout utilities */
.container {
  width: 100%;
  max-width: clamp(320px, 78ch, 1100px);
  padding-inline: 1rem;
  margin: 0 auto;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25em 0.5em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  color: var(--text);
  background: rgba(46, 230, 201, 0.15);
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  background: #0a0f14;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.05);
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Typography & headings */
h1, h2, h3 {
  line-height: 1.15;
  margin: 0.5em 0;
}
h1 {
  font-size: clamp(1.75rem, 4vw + 0.5rem, 4rem);
  letter-spacing: .5px;
}
h2 { font-size: clamp(1.4rem, 1.5vw + 1rem, 2.25rem); }
h3 { font-size: clamp(1.1rem, 1vw + 0.75rem, 1.5rem); }

/* Glass panels (backdrop) for major sections */
header, main, footer, aside {
  background: rgba(8, 22, 32, 0.28);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 16px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
  margin: 1rem 0;
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside {
    background: rgba(8, 22, 32, 0.60);
  }
}

/* Header hero adjustments */
header { padding: 1.25rem; display: grid; gap: 0.5rem; align-items: end; }
header .meta { color: var(--muted); font-size: 0.95rem; }

main { padding: 1rem; }

/* Content area styling */
.content { padding: 0.5rem 0 1rem; color: var(--text); }

/* Article styling inside main */
article { display: block; }

/* Paragraphs and lists within article */
article p { margin: .75em 0; color: #eafcf3; }
article ul { margin: .75em 0 1em 1.25em; color: #eafff0; }
article li { margin: .25em 0; }

/* Links & buttons */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); outline: none; }
a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* Button/CTA variants */
.btn, .cta {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  color: #062016;
  text-decoration: none;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(46,230,201,.95), rgba(255,211,77,.85));
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.btn:focus-visible, .cta:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

/* Utility focus for interactive elements */
button, input, select, textarea { font-family: inherit; color: inherit; }

/* Form elements (present but minimal) */
input, textarea, select {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  color: var(--text);
}
input::placeholder, textarea::placeholder { color: rgba(230,255,240,.7); }

/* Footer specifics including product-ad blocks */
.product-ad, .sponsored-page {
  display: block;
  padding: .75rem;
  border-radius: 12px;
  margin: .5rem 0;
  background: rgba(14, 28, 34, 0.32);
  border: 1px solid rgba(255,255,255,.28);
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: block; }
.product-ad p, .sponsored-page p { margin: 0; font-weight: 600; }

/* Image frame utility (for any potential image blocks) */
.image-frame + p { margin-top: .5rem; }

/* List improvements for accessibility */
ul, li { list-style-position: inside; }

/* Print styles */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: #fff; border: none; box-shadow: none; }
  a { color: #000; text-decoration: underline; }
}
 
/* Dark mode tweaks for completeness (light scheme override) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8f9;
    --text: #0b1b1f;
    --muted: #526169;
    --surface: rgba(255,255,255,0.85);
    --surface-2: rgba(255,255,255,0.92);
    --border: rgba(0,0,0,.15);
  }
  body {
    background-color: #eef3f6;
    background-image: none;
  }
  header, main, footer, aside { background: rgba(255,255,255,0.9); border: 1px solid rgba(0,0,0,.08); color: #0b1b1f; }
  a { color: #0b6b7a; }
  .btn, .cta {
    background: linear-gradient(135deg, #2cb8a0, #ffd34d);
    color: #062016;
  }
}
