/* Tokens & Base Palette */
:root {
  --bg: #1b1f27;          /* steel gray night */
  --bg-2: #0f141b;        /* pewter deep shadow */
  --text: #e9f0f7;         /* high-contrast on glass */
  --muted: #a9b6c4;        /* subdued text */
  --accent: #4bd3ff;        /* electric pewter blue */
  --accent-2: #00e6ff;      /* focus ring / accent flare */
  --card: rgba(255,255,255,0.08);
  --card-border: rgba(255,255,255,0.25);
  --shadow: 0 8px 28px rgba(0,0,0,0.34);
  --radius: 12px;
  --radius-sm: 8px;
}

/* Layout & Background (Layered gradient + CSS noise/scanlines) */
html, body {
  height: 100%;
}
html, body {
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  /* Subtle layered noise + scanlines for a cyberpunk glassy look */
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.04)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.045) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(0,0,0,0.015) 0 2px, transparent 2px 4px);
  background-blend-mode: overlay;
  opacity: 0.45;
  pointer-events: none;
  filter: saturate(1.05);
}

/* Basic helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.card h3 { margin: 0 0 .5rem; }

/* Glass panels */
[role="main"] .glass,
.glass {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass, [role="main"] .glass {
    background: rgba(15, 17, 22, 0.75);
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    backdrop-filter: none;
  }
}
.image-frame {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Typography */
h1, h2, h3 {
  margin: 0 0 .5rem;
  line-height: 1.15;
}
h1 {
  font-size: clamp(1.8rem, 4vw + 1rem, 3.4rem);
  letter-spacing: .3px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
h2 {
  font-size: clamp(1.4rem, 2.5vw + 1rem, 2.4rem);
  color: var(--text);
}
p {
  color: var(--muted);
  margin: .5rem 0 1rem;
}
blockquote {
  margin: .5rem 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text);
  opacity: .95;
}
ul {
  padding-inline-start: 1.25em;
}
li {
  margin: .25rem 0;
  color: var(--muted);
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover, a:focus {
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}
button, .btn, .cta {
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  padding: .75rem 1.15rem;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
  display: inline-block;
  text-align: center;
}
.btn {
  background: rgba(75,211,255,0.95);
  color: #001018;
  border: 1px solid rgba(0,0,0,0.15);
  font-weight: 600;
}
.btn.primary { background: var(--accent); color: #001018; }
.btn.secondary {
  background: rgba(0,0,0,0.0);
  border: 1px solid rgba(255,255,255,0.38);
  color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.cta {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
.cta:hover { background: rgba(255,255,255,0.12); }

/* Utilities & components */
.tag {
  display: inline-block;
  padding: .2em .6em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.25);
  color: #eafaff;
}
.container.centered { text-align: center; }

/* Structural selectors (as requested) */
html, body, header, nav, main, article, footer, aside { }
.image-frame, .image-frame img { }

/* Content area */
.content { padding: 1rem 0; }

/* Sections used in footer/ad areas */
.product-ad, .sponsored-page {
  display: block;
  padding: .75rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: var(--shadow);
  text-align: center;
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: block; }

/* Header, Nav, Main, Aside, Footer styling (glassy presence) */
header {
  padding: 2rem 1rem;
  text-align: center;
}
header h1 { color: var(--text); }
header .meta { color: var(--muted); font-size: 0.92rem; }

/* Main layout */
main { padding: 1rem 0 2rem; }

/* Footer */
footer { padding: 1rem 0; text-align: center; color: var(--muted); }

/* Responsive tweaks */
@media (min-width: 720px) {
  .container { padding-inline: 0; }
}
@media (min-width: 900px) {
  main { padding: 2rem 0; }
  .grid { gap: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Print styles (basic readability) */
@media print {
  body { background: white; color: black; }
  body::before { display: none; }
  .image-frame { page-break-inside: avoid; }
}
