/* Maroon Neon Cyberpunk Theme - Production CSS */

/* Token palette */
:root {
  --bg: #0b0b0f;
  --bg-2: #1a0b12;
  --surface: rgba(0, 255, 140, 0.14);
  --surface-2: rgba(0, 255, 140, 0.28);
  --text: #eafff4;
  --muted: #b6f0d0;
  --accent: #39ff87;      /* neon green */
  --accent-2: #2aff86;
  --border: rgba(60, 255, 180, 0.38);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
  --radius: 14px;
  --gap: 1rem;
  --container-w: clamp(320px, 90vw, 1100px);
  --focus: 2px solid rgba(57, 255, 135, 0.95);
  --focus-color: rgba(57, 255, 135, 0.95);
  --glass-back: rgba(8, 40, 26, 0.22);
  --glass-border: rgba(60, 255, 180, 0.45);
}
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; height: 100%; }
html, body { /* ensure full-height layout */ }
* { box-sizing: border-box; }
html { font-size: clamp(14px, 1.2vw + 8px, 18px); }

/* Base layout & background (gradient + subtle noise/scanlines) */
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient( circle at 20% -10%, rgba(0, 255, 120, 0.12), transparent 40% ),
    linear-gradient(135deg, var(--bg-2) 0%, var(--bg) 60%, #000 100%);
  background-attachment: fixed;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  /* subtle scanlines + micro-noise layer (pure CSS) */
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0) 0 24px, rgba(0,0,0,0) 24px),
    repeating-linear-gradient(to bottom, rgba(60,255,180,0.045) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 50% 0%, rgba(0,0,0,0.05), rgba(0,0,0,0) 40%);
  background-blend-mode: overlay;
  opacity: 0.25;
  pointer-events: none;
}

/* Sectioning elements (MUST style selectors) */
html, body, header, nav, main, article, footer, aside {
  /* structural styling via a glassy, high-contrast approach where sensible */
}
header {
  padding: clamp(12px, 2.2vw, 28px) 0;
  text-align: center;
  position: relative;
  z-index: 1;
}
nav { padding: 0.5rem 0; }
main { padding: clamp(12px, 2vw, 28px) 0; }
article { display: grid; justify-items: center; padding: 0; }
aside { padding: 0.5rem 0; }
footer { padding: 1rem 0; }

/* Content containers and layout utilities */
.container { width: min(var(--container-w), 92%); margin-inline: auto; padding-block: 0.5rem; position: relative; z-index: 1; }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }

/* Card / glassy surfaces (frosted glass panels) */
.card, .content, .product-ad {
  background: rgba(10, 40, 28, 0.22);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
}
@supports not (backdrop-filter: blur(12px)) {
  .card, .content, .product-ad {
    backdrop-filter: none;
    background: rgba(8, 40, 28, 0.75);
    border: 1px solid rgba(60,255,180,0.55);
  }
}
.tag {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(60,255,180,.55);
  color: #eafff4;
  background: rgba(0,0,0,0.25);
}
.image-frame {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(60,255,180,.4);
  box-shadow: 0 8px 22px rgba(0,0,0,.45), inset 0 0 1px rgba(0,0,0,.25);
  background: rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
}
.content { /* generic text container (glass) */
  font-size: clamp(1rem, 0.8vw + 0.8rem, 1.125rem);
  line-height: 1.4;
  color: var(--text);
}
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus { text-decoration: underline; text-underline-offset: 3px; }

/* Buttons (solid and outline variants) */
.btn, .cta {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(57, 255, 135, 0.8);
  background: linear-gradient(135deg, rgba(0,0,0,0.25), rgba(0,0,0,0.0));
  color: var(--text);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn--solid {
  background: linear-gradient(135deg, rgba(57,255,135,0.95), rgba(40,210,110,0.95));
  border-color: rgba(57,255,135,0.95);
  color: #041a0a;
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
.btn--solid:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn--solid:active { transform: translateY(0); }

.btn--outline {
  background: rgba(0,0,0,0.0);
  border-color: rgba(57,255,135,0.9);
  color: var(--text);
}
.btn--outline:hover { background: rgba(57,255,135,0.08); }
.btn + .btn { margin-left: 0.5rem; }

.cta { font-weight: 600; }

/* Lists */
ul { padding-left: 1.25rem; }
li { margin: 0.25rem 0; }

/* Specific sections & selectors (explicitly styled) */
.image-frame { /* already defined above; ensure centered in containers */ margin: 0 auto; }

/* Utility gaps on container blocks without extra wrappers */
.section { margin-block: 1rem; }

/* Typography scale (hero pattern) */
h1 {
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  line-height: 1.05;
  margin: 0 0 0.5rem;
  color: #eafff4;
  text-shadow: 0 0 12px rgba(0,255,140,.6);
}
h2, h3 { color: #eafff4; margin: 0.25rem 0; }

/* Header styling (glassy strip) */
header { 
  width: 100%;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: linear-gradient(to bottom right, rgba(10, 40, 28, 0.28), rgba(10, 40, 28, 0.08));
  border-bottom: 1px solid rgba(60, 255, 180, 0.35);
  backdrop-filter: blur(8px);
}
header h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.75rem); }

/* Footer product ads / sections */
.product-ad, .sponsored-page {
  display: block;
  text-align: center;
  margin: 0.5rem 0;
}
.product-ad a, .sponsored-page a { display: block; padding: 0.9rem 1rem; border-radius: 12px; border: 1px solid rgba(60,255,180,.5); background: rgba(0,0,0,.25); color: var(--text); }
.product-ad a:hover, .sponsored-page a:hover { background: rgba(0,0,0,.4); }

/* Print styles: basic readability */
@media print {
  body { background: #fff; color: #000; }
  header, main, article, footer { page-break-inside: avoid; }
  .card, .content, .product-ad { background: #fff; border: 1px solid #ccc; }
  a { text-decoration: underline; }
}

/* Light-mode adjustments (prefers-color-scheme: light) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f3f0;
    --bg-2: #eee5dc;
    --text: #0b1a12;
    --muted: #2f3a32;
    --surface: rgba(38, 120, 60, 0.14);
    --surface-2: rgba(38, 120, 60, 0.28);
    --border: rgba(16, 60, 40, 0.4);
    --glass-border: rgba(10, 120, 60, 0.4);
  }
  body {
    background: linear-gradient(135deg, #f6efe6 0%, #efe8e0 60%, #f6f0ec 100%);
    color: var(--text);
  }
  .card, .content, .product-ad {
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.08);
  }
  a, button, .btn, .cta { color: #0b1a12; }
  a:hover { text-decoration: underline; }
}
