/* Section: Global Tokens */
:root {
  --bg: #0a0f14;
  --bg-2: #0b111a;
  --text: #eaffff;
  --muted: #9bd5db;
  --accent: #2ff3f5;      /* bright turquoise */
  --accent-2: #00e5d6;    /* secondary turquoise for focus */
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  --radius: 12px;
}

/* Section: Global base */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #0a0f14 0%, #0b111a 60%, #0a0f14 100%);
  min-height: 100%;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Section: Layered background (gradient + subtle noise/scanlines) */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
body::before {
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  opacity: 0.35;
  mix-blend-mode: overlay;
  filter: saturate(0.9);
}
body::after {
  /* subtle random speckle pattern via small radial accents */
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 14px 14px;
  opacity: 0.08;
  mix-blend-mode: overlay;
  filter: grayscale(0);
}

/* Section: Layout helpers (container/grid/card/tag) */
.container {
  width: 100%;
  max-width: clamp(640px, 90vw, 1100px);
  margin-inline: auto;
  padding: 0 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(0,0,0,0.25);
  color: var(--text);
}
ul, li { margin: 0; padding: 0; list-style: none; }

/* Section: Typography scale (fluid) */
h1, h2, h3 {
  margin: 0 0 .5rem;
  line-height: 1.15;
}
p { margin: 0 0 1rem; }

/* Section: Header / Hero (glass panel look) */
header {
  width: min(100%, 1100px);
  margin: 1rem auto;
  padding: 1.75rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
}
header h1 {
  font-size: clamp(1.75rem, 2.2vw + 1rem, 3.25rem);
  line-height: 1.1;
  letter-spacing: .2px;
}
nav {
  margin-top: .75rem;
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .5rem .75rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.15);
  transition: transform .15s ease;
}
nav a:hover { text-decoration: underline; transform: translateY(-1px); }

/* Section: Main content layout */
main {
  display: grid;
  place-items: center;
  padding: 1rem 0 2rem;
}
article {
  width: 100%;
  max-width: clamp(540px, 90vw, 860px);
  padding: 1rem;
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.18);
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Section: Glassy card content helpers (content) */
.content {
  color: var(--text);
  font-size: clamp(0.95rem, 0.9vw + 0.5rem, 1.05rem);
  line-height: 1.6;
}
@media (prefers-color-scheme: dark) {
  /* maintain readable contrast in dark schemes if user prefs change */
  .content { color: #eafcff; }
}

/* Section: Buttons & links (solid + outline variants) */
a, button, .btn, .cta {
  cursor: pointer;
  text-decoration: none;
  border: 0;
  border-radius: 8px;
  font-weight: 600;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
a { color: var(--text); }
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: #06130f;
}
.btn:focus-visible, .cta:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
}
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn--outline {
  background: rgba(0,0,0,0);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--outline:hover {
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.04);
}
a:hover { text-decoration: underline; }

/* Section: Footer / product ad blocks */
footer {
  width: min(100%, 1100px);
  margin: 2rem auto 1rem;
  padding: 0 1rem 1rem;
  display: grid;
  gap: 1rem;
}
.product-ad, .sponsored-page {
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: 12px;
  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: inline-block;
  padding: .5rem 1rem;
  border-radius: 8px;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.25);
}
footer p { text-align: center; color: var(--muted); font-size: 0.9rem; }

/* Section: Print styles (basic readability) */
@media print {
  body::before, body::after { display: none; }
  header, main, footer { background: transparent; color: #000; box-shadow: none; }
  .image-frame { display: none; }
  a, a:visited { color: #000; text-decoration: underline; }
}
