/* Tokens */
/* Theme: coral sunset gradient with retro teal accents, glass panels, cyberpunk vibe */
:root {
  --grad-a: #ff6a6a;   /* coral */
  --grad-b: #ff8a5b;   /* sunset orange */
  --grad-c: #0bd5a3;   /* retro teal accent */
  --bg: #040607;
  --surface: rgba(14, 20, 28, 0.22);
  --surface-2: rgba(14, 20, 28, 0.32);
  --border: rgba(255, 255, 255, 0.28);
  --border-strong: rgba(255, 255, 255, 0.50);
  --text: #eafaff;
  --muted: rgba(234, 246, 255, 0.8);
  --accent: #2bd2c9;
  --shadow: 0 8px 28px rgba(0,0,0,.28);
  --shadow-soft: 0 6px 18px rgba(0,0,0,.22);
  --radius: 14px;
  --focus: 3px solid #fff;
  --grid-gap: 1rem;
  --container-max: clamp(28rem, 85vw, 1200px);
}

/* Base / Reset (mobile-first) */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  /* Layered background: gradient + subtle scanlines */
  background-image:
    linear-gradient(135deg, var(--grad-a) 0%, var(--grad-b) 60%, var(--grad-c) 100%),
    /* subtle noise-like texture (pure CSS) via fine gradient overlay */
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, rgba(0,0,0,0) 1px 2px),
    radial-gradient(circle at 0% 0%, rgba(255,255,255,.04), transparent 40%);
  background-color: var(--bg);
  background-blend-mode: normal, overlay, overlay;
  color: var(--text);
  overflow-x: hidden;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--grid-gap);
}

.card {
  background: rgba(12, 18, 28, 0.28);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: calc(var(--radius) - 2px);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .25s ease, background .25s ease;
}
.card:hover { transform: translateY(-2px); background: rgba(12,18,28,0.34); }

/* Glass panels (with fallback) */
.glass {
  background: rgba(14, 20, 28, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .glass {
    background: rgba(14, 20, 28, 0.72);
    border-color: rgba(255,255,255,0.40);
  }
}

header, main, footer, aside, article, nav {
  display: block;
}

/* Header / Hero */
header {
  padding: 2.5rem 0;
  text-align: center;
}
header h1 {
  margin: 0 0 .5rem;
  font-size: clamp(1.75rem, 3.2vw + 1rem, 3.25rem);
  line-height: 1.04;
  letter-spacing: .2px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,.25);
}
header .meta {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 0.9vw + 0.4rem, 1.05rem);
  opacity: .95;
}
header nav {
  margin-top: .75rem;
}
header nav a {
  display: inline-block;
  padding: .65rem 1rem;
  margin-inline: .25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  background: rgba(0,0,0,.15);
  transition: transform .2s ease, background .2s ease;
}
header nav a:hover { background: rgba(255,255,255,.15); transform: translateY(-1px); text-decoration: none; }
header nav a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Featured image */
.featured-image {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 22px rgba(0,0,0,.25);
}
.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.04);
}

/* Main content styling */
main {
  padding: 2rem 0 4rem;
}
article {
  display: grid;
  gap: 1rem;
}
h2 {
  font-size: clamp(1.4rem, 1.4rem + 1vw, 2.4rem);
  color: #fff;
  margin: .25rem 0 0.25rem;
}
h3 {
  font-size: clamp(1.15rem, 0.9vw + 1rem, 1.6rem);
  color: #fff;
  margin: .75rem 0 0.25rem;
}
p {
  font-size: clamp(0.95rem, 0.9vw + 0.8rem, 1.15rem);
  color: rgba(235, 246, 255, 0.95);
  line-height: 1.55;
  margin: 0 0 1rem;
}
blockquote {
  border-left: 3px solid rgba(255,255,255,.5);
  padding-left: 1rem;
  color: #eaffff;
  opacity: .95;
}
ul {
  padding-left: 1.25rem;
  margin: .25rem 0 1rem;
  color: rgba(235,246,255,.95);
}
li {
  margin: .25rem 0;
}
.image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}

/* Content container styling within article */
.content {
  display: block;
  padding: 0.5rem 0;
}
@media (min-width: 900px) {
  .content { padding: 0; }
}

/* Links and buttons */
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }
a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

button,
.btn,
.cta {
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  background: rgba(0,0,0,.22);
  padding: .65rem 1.1rem;
  transition: transform .2s ease, background .2s ease, color .2s;
}
.btn.primary,
.btn {
  background: linear-gradient(135deg, rgba(0,210,180,.95), rgba(0,180,170,.95));
  border: 1px solid rgba(255,255,255,.65);
}
.btn.secondary {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.35);
}
.cta {
  background: linear-gradient(135deg, rgba(8, 173, 145, 0.9), rgba(0, 210, 170, 0.9));
  border: 1px solid rgba(255,255,255,.7);
}
.btn:hover, .cta:hover {
  transform: translateY(-1px);
}
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Lists: ensure high contrast in glass panels */
ul, li { color: rgba(235,246,255,.95); }

/* Footer / product ad sections */
footer {
  padding: 2rem 0;
  display: grid;
  gap: 1rem;
}
.product-ad, .sponsored-page {
  display: block;
  padding: .75rem;
  border-radius: calc(var(--radius) - 4px);
}
.product-ad a, .sponsored-page a {
  display: block;
  text-decoration: none;
  color: #fff;
}
.product-ad {
  background: rgba(2, 12, 20, 0.28);
  border: 1px solid rgba(255,255,255,.30);
  box-shadow: var(--shadow-soft);
}
.sponsored-page {
  background: rgba(3, 8, 12, 0.28);
  border: 1px solid rgba(255,255,255,.28);
}
.product-ad p, .sponsored-page p {
  margin: 0;
  font-weight: 600;
}
footer p {
  text-align: center;
  color: rgba(235,246,255,.8);
  margin: .5rem 0 0;
}

/* Print-friendly (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: transparent; }
  a { color: #000; text-decoration: underline; }
  .glass { background: #fff; border: 1px solid #ccc; }
  ul { padding-left: 1rem; }
}

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