/* Base & Tokens */
:root {
  --bg: #0b0f0b;
  --bg-2: #0e1410;
  --text: #eafff5;
  --muted: #a6ffd1;
  --accent: #2cff88;
  --accent-2: #ff6a6a;
  --surface: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 26px rgba(0,0,0,0.45);
  --radius: 14px;
  --radius-sm: 10px;
  --blur: 12px;
  --focus: 2px solid rgba(0,255,136,0.9);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

html, body, header, nav, main, article, footer, aside {
  -webkit-tap-highlight-color: transparent;
}

/* Layout basics (mobile-first) */
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 20% -10%, rgba(60,255,170,0.15) 0%, rgba(60,255,170,0) 40%),
              linear-gradient(135deg, rgba(0,40,20,0.75), rgba(0,0,0,0.85) 60%);
  background-color: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.55;
  min-height: 100%;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255,114,109,0.25) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,114,109,0.25) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
  opacity: 0.25;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.15) 0px, rgba(0,0,0,0.15) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.04) 0px, rgba(0,0,0,0.04) 1px, transparent 1px, transparent 4px);
  opacity: 0.25;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
  content: "";
}

/* Global containers */
.container { width: min(100%, 1100px); margin-inline: auto; padding-inline: 1rem; }

/* Glass panel aesthetics (fallback included) */
header, main, aside, footer {
  background: rgba(8, 12, 8, 0.28);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem auto;
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  z-index: 1;
}
@supports not (backdrop-filter: blur(8px)) {
  header, main, aside, footer { background: rgba(14, 18, 14, 0.66); border-color: rgba(255,255,255,0.35); }
}

/* Typography */
html { font-size: 16px; }
h1, h2, h3 { font-weight: 700; letter-spacing: .2px; }
h1 { font-size: clamp(1.75rem, 4vw + 0.5rem, 3.25rem); line-height: 1.05; margin: 0 0 .25rem; color: #eafff0; }
h2 { font-size: clamp(1.25rem, 2.8vw, 2rem); margin: .75rem 0 .5rem; color: #eafff0; }
p { margin: 0 0 1rem; color: rgba(234,255,245,0.92); }
.meta { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas; font-size: clamp(0.85rem, 1.6vw, 1rem); color: var(--muted); margin-top: .25rem; }

/* Images */
.image-frame { width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,0.35); box-shadow: 0 8px 20px rgba(0,0,0,0.6); background: #111; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content area helpers ( hooks for potential content containers ) */
.content { color: var(--text); font-size: clamp(1rem, 2.2vw, 1.125rem); line-height: 1.6; }

/* Lists & emphasis */
ul { padding-left: 1.25rem; margin: .25rem 0 1rem; color: #d6ffe7; }
li { margin: .25rem 0; }

/* Blockquote */
blockquote { margin: 1rem 0; padding: .75rem 1rem; border-left: 3px solid var(--accent); background: rgba(0,0,0,0.18); border-radius: 6px; }

/* Utilities & components */
.container, .grid, .card, .tag { /* base utility shells */ }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25); border-radius: 12px; padding: .75rem; }

/* Tag styling */
.tag { display: inline-block; padding: .15rem .6rem; font-size: .75rem; border-radius: 999px; background: rgba(0,255,136,0.15); border: 1px solid rgba(0,255,136,0.4); color: #baffd2; }

/* Links & buttons (focus-visible for accessibility) */
a, button, .btn, .cta {
  color: inherit;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
}
a { color: var(--accent); }
a:hover, a:focus { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Buttons variants */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .65rem 1.05rem; border-radius: 999px; font-weight: 600; letter-spacing: .2px; transition: transform .15s ease, background .2s ease, color .2s; }
.btn--solid { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); color: #002013; box-shadow: inset 0 0 0 rgba(0,0,0,0); }
.btn--outline { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid rgba(255,255,255,0.34); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Hero & layout rhythm */
header { display: block; padding: 1.25rem; margin: 1rem auto; text-align: left; }
header h1 { margin-bottom: .25rem; }
header .meta { margin-top: .25rem; }

/* Main content flow */
main { display: block; }
article { max-width: clamp(360px, 92vw, 860px); }

/* Footer & legal / ads area */
footer { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); padding-top: 1.25rem; }

/* Sections inside footer for ad blocks */
.product-ad a, .sponsored-page a { display: block; padding: .75rem; border-radius: 10px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25); color: var(--text); text-decoration: none; }
.product-ad a:hover, .sponsored-page a:hover { background: rgba(255,255,255,0.14); }

/* Print-friendly basics */
@media print {
  body { background: white; color: black; }
  header, main, footer { background: transparent; border: none; box-shadow: none; }
}

/* Color mode variations (light mode) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7f0;
    --bg-2: #ffffff;
    --text: #111;
    --muted: #555;
    --accent: #006d4f;
    --accent-2: #e74c3c;
    --surface: rgba(0,0,0,0.05);
    --border: rgba(0,0,0,0.08);
  }
  body { background: #f7f7f0; color: var(--text); }
  header, main, footer { background: rgba(255,255,255,0.75); border-color: rgba(0,0,0,0.1); }
  .image-frame { border-color: rgba(0,0,0,0.15); }
  a { color: var(--accent); }
}

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