/* Tokens */
:root{
  --bg: #0f141b;
  --bg-2: #1b232a;
  --surface: rgba(255,255,255,.08);
  --surface-2: rgba(255,255,255,.12);
  --text: #eafff5;
  --muted: #a6b8b0;
  --accent: #2bd4a6;
  --accent-2: #6ff9d0;
  --shadow: 0 6px 20px rgba(0,0,0,.35);
  --radius: 12px;
  --border: rgba(255,255,255,.28);
  --glass-border: rgba(255,255,255,.35);
  --blur: 12px;
}

/* Base / Reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans";
  font-size: clamp(14px, 0.9vw + 12px, 16px);
  color: var(--text);
}
body {
  margin: 0;
  line-height: 1.5;
  background: 
    /* layer: soft color base */
    linear-gradient(to bottom right, rgba(15,18,24,.95), rgba(20,25,30,.95)),
    /* layer: subtle metallic tint */
    linear-gradient(135deg, rgba(40,45,50,.85) 0%, rgba(18,23,28,.85) 60%, rgba(40,45,50,.85) 100%),
    /* layer: faint scanlines  (pure CSS) */
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout helpers (section headers) */
header, main, footer, aside { display: block; }

/* Glass panel helpers */
header, footer, article, .card, .container { backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); background: var(--surface); border: 1px solid var(--glass-border); border-radius: var(--radius); }

/* Section wrappers / containers */
.container {
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
}
.card {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow);
  color: var(--text);
}
.tag {
  display: inline-block;
  padding: .15em .6em;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(43,212,166,.25);
  color: var(--text);
  border: 1px solid rgba(43,212,166,.6);
}

/* Typography */
h1, h2, h3 { line-height: 1.08; margin: .25rem 0 0.5rem; color: var(--text); }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.75rem); letter-spacing: .5px; }
h2 { font-size: clamp(1.5rem, 2vw + .75rem, 2.5rem); }
p { color: var(--text); font-size: clamp(1rem, .4vw + .9rem, 1.125rem); margin: .5rem 0 1rem; }
blockquote {
  margin: .75rem 0;
  padding: .75rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(43,212,166,.15);
  border-radius: 8px;
  color: var(--text);
}
ul { margin: .5rem 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* Image frame (glass border / glow) */
.image-frame {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 22px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08);
  margin: 0 auto 1rem;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(1.05);
  transform: translateZ(0); /* GPU hint for smoother rendering */
}

/* Content region (glass panels) */
.content { padding: .75rem 0; color: var(--muted); }

/* Link / button styles (global) */
a {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); outline: none; }

button, .btn, .cta {
  font: inherit;
  padding: .75rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(43,212,166,.6);
  background: rgba(43,212,166,.25);
  color: var(--text);
  cursor: pointer;
  display: inline-block;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn { background: rgba(43,212,166,.28); border-color: rgba(43,212,166,.6); }
.btn:hover { transform: translateY(-1px); background: rgba(43,212,166,.38); }
.btn.secondary { background: transparent; border-color: rgba(43,212,166,.6); color: var(--accent); }
.cta { font-weight: 700; letter-spacing: .2px; }

/* Focus visibility for accessibility */
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* Form elements (if present) */
input, textarea, select {
  font: inherit;
  padding: .5rem .75rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: var(--text);
}
input::placeholder, textarea::placeholder { color: rgba(230,255,245,.6); }

/* Layout regions per selector list */
html, body, header, nav, main, article, footer, aside {
  /* ensure they participate in layering but keep visuals consistent */
}
header { text-align: center; padding: 2rem 1rem; margin: 0 auto 1rem; }
main { padding: 0 1rem 1rem; }
footer { padding: 1rem; margin-top: 1rem; }

/* Specific sections referenced by markup */
.product-ad { display: inline-block; padding: .6rem 1rem; border-radius: 999px; background: rgba(8,14,18,.6); border: 1px solid rgba(110,255,255,.3); margin: .25rem; }
.product-ad a { color: var(--text); text-decoration: none; }

.sponsored-page { display: inline-block; padding: .6rem 1rem; border-radius: 999px; background: rgba(8,8,12,.6); border: 1px solid rgba(110,255,255,.3); margin: .25rem; }

footer p { margin: .25rem 0 0; font-size: .9rem; color: var(--muted); }

/* Print styles (basic readability) */
@media print {
  body { background: white; color: #000; }
  header, main, footer { background: none; border: none; box-shadow: none; }
  a { text-decoration: underline; color: #000; }
}

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