/* 01. Tokens & Theme */
:root {
  --bg: #0b111a;
  --bg-2: #0f1620;
  --surface: rgba(15, 23, 28, 0.72);
  --surface-2: rgba(18, 28, 34, 0.58);
  --text: #e6faff;
  --muted: #b7d0d9;
  --accent: #00e5ff;       /* cyan */
  --olive: #6b8e23;         /* olive accents */
  --olive-2: #7ba232;
  --card: rgba(12, 18, 22, 0.75);
  --shadow: 0 10px 25px rgba(0,0,0,.35);
  --focus: 2px solid rgba(0, 229, 255, 0.95);
  --ring: 3px solid rgba(0, 229, 255, 0.85);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6fbf9;
    --bg-2: #eef4f0;
    --surface: rgba(255, 255, 255, 0.85);
    --surface-2: rgba(255, 255, 255, 0.70);
    --text: #0b1b1f;
    --muted: #44545b;
    --card: rgba(255, 255, 255, 0.95);
  }
}

/* 02. Base & Global Layout */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark light; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  color: var(--text);
  background-color: var(--bg);
  /* Layered background: gradient + subtle scanlines/noise */
  background-image:
    linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)),
    linear-gradient(135deg, rgba(0,214,255,0.14), rgba(0,0,0,0) 40%),
    radial-gradient(circle at 20% -10%, rgba(0,214,255,0.08), transparent 40%),
    repeating-linear-gradient(to bottom,
      rgba(255,255,255,0.04) 0 1px,
      transparent 1px 2px);
  background-blend-mode: overlay, overlay, overlay, normal;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 03. Typography */
h1, h2, h3 { margin: 0 0 .5rem; font-weight: 600; }
p { margin: 0 0 1rem; color: var(--muted); }
.header, header { display: block; }
main { display: block; padding: 1rem; }

/* 04. Layout Utilities */
.container { max-width: clamp(320px, 92vw, 1100px); margin-inline: auto; padding: 0 1rem; }
.grid { display: grid; gap: 1rem; }
.card { background: var(--card); border: 1px solid rgba(120, 200, 120, 0.35);
  border-radius: 12px; padding: 1rem; box-shadow: var(--shadow);
}
.tag { display: inline-block; padding: .25em .5em; border-radius: 999px;
  font-size: .75rem; color: var(--text);
  border: 1px solid rgba(0, 214, 255, 0.4);
  background: rgba(0, 214, 255, 0.15);
}

/* 05. Glass Panels (fallback + backdrop-filter) */
.glass,
.product-ad,
.sponsored-page,
 aside {
  background: rgba(14, 20, 26, 0.60);
  border: 1px solid rgba(120, 210, 190, 0.40);
  border-radius: 12px;
  padding: .75rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
@supports not (backdrop-filter: blur(10px)) {
  .glass,
  .product-ad,
  .sponsored-page {
    background: rgba(14, 20, 26, 0.85);
  }
}
.image-frame { aspect-ratio: 16 / 9; width: 100%; border-radius: 12px;
  overflow: hidden; border: 1px solid rgba(110, 210, 190, 0.5);
  background: rgba(0,0,0,0.25);
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 06. Structural selectors (required) */
html, body, header, nav, main, article, footer, aside { }
.content { padding: 1rem; }

/* 07. Hero & Text Hierarchy */
header { padding: 1.25rem 1rem; text-align: center; }
header h1 { font-size: clamp(1.75rem, 4vw + 1rem, 3rem); line-height: 1.15; letter-spacing: .2px; }

/* 08. Media-typed sections (article/aside) */
article { display: block; margin: 0 auto; max-width: 1100px; padding: 0; }
aside { display: block; }

/* 09. Image Panel styling via class */
.image-frame { display: block; }

/* 10. Content layout (generic) */
.content { display: block; }

/* 11. Product ad / Sponsored blocks (footer sections) */
.product-ad,
.sponsored-page { display: inline-block; vertical-align: middle; margin: .25rem; min-width: 180px; text-align: center; }
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: block; }

/* 12. Interaction: Buttons, links, CTAs */
button,
.btn,
.cta,
a.btn {
  font-family: inherit;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.75em 1.25em;
  border: 1px solid rgba(0, 214, 255, 0.6);
  background: linear-gradient(to bottom right, rgba(0,214,255,0.25), rgba(0,214,255,0.10));
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
button:hover,
.btn:hover,
.cta:hover,
a.btn:hover { transform: translateY(-1px); background: rgba(0, 214, 255, 0.32); }
button:active,
.btn:active,
.cta:active,
a.btn:active { transform: translateY(0); }

/* Solid variant (useful across sections) */
.btn { background: rgba(0, 214, 255, 0.25); border-color: rgba(0, 214, 255, 0.6); }
.cta { background: transparent; border-color: rgba(0, 214, 255, 0.75); color: var(--text); }

/* Focus states (WCAG AA) */
:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* 13. List styling */
ul { margin: 0; padding: 0; list-style: none; }
li { margin: 0; }

/* 14. Inputs & forms (presentational lean) */
input,
textarea,
select {
  background: rgba(18, 28, 36, 0.6);
  border: 1px solid rgba(110, 210, 190, 0.6);
  color: var(--text);
  padding: .5em .75em;
  border-radius: 8px;
  outline: none;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 15. Print styles (readability) */
@media print {
  body { background: white; color: black; }
  a { text-decoration: underline; color: black; }
}

/* 16. Layout helpers (dark mode friendly) */
@media (prefers-color-scheme: light) {
  body { background: var(--bg-2); }
  header { border-bottom: 1px solid rgba(0,0,0,0.08); }
  .glass, .product-ad, .sponsored-page { border-color: rgba(0,0,0,0.08); }
}

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