:root{
  /* Tokenized palette (seafoam + orange) */
  --bg: #0b0f14;
  --bg-2: #0e141a;
  --text: #eafff6;
  --muted: #b6d2c9;
  --accent: #ff8a1a;      /* orange */
  --accent-2: #2bd4bf;    /* seafoam */
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.14);
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0,0,0,.25);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

html {
  font-size: clamp(14px, 1vw + 12px, 18px);
}

body {
  position: relative;
  overflow-x: hidden;
}

/* Layered background: gradient + subtle noise + scanlines (CSS only) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 20%, rgba(43,212,191,0.12), transparent 40%),
    radial-gradient(circle at 75% 0%, rgba(255,138,26,0.08), transparent 25%),
    linear-gradient(135deg, rgba(6,12,14,0.8) 0%, rgba(6,12,14,0.8) 60%, rgba(6,12,14,0.8) 100%),
    /* subtle vertical/horizontal scanlines overlay */
    repeating-linear-gradient(to bottom, rgba(0,0,0,0.05) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(0,0,0,0.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay;
  pointer-events: none;
  mix-blend-mode: normal;
  filter: saturate(110%);
}

/* Glassy surface helper (fallback if backdrop-filter unsupported) */
@supports not (backdrop-filter: blur(8px)) {
  :root { --surface: rgba(255,255,255,0.18); }
}
.backdrop {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  color: var(--text);
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(720px, 80vw, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
}

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

.card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 1rem;
  color: var(--text);
  transition: transform .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-1px); }

/* Typography & headings (fluid scale) */
h1, h2, h3 {
  line-height: 1.2;
  margin: 0.4rem 0 0.2rem;
  font-weight: 700;
  letter-spacing: .2px;
}
h1 { font-size: clamp(1.75rem, 1.5rem + 2.5vw, 3.25rem); color: #eafff6; }
h2 { font-size: clamp(1.25rem, 0.8rem + 1.5vw, 2rem); color: #eafff6; }
h3 { font-size: clamp(1rem, 0.6rem + 1vw, 1.5rem); color: #eafff6; }

p { margin: 0.75rem 0; color: var(--muted); }

.meta { color: #cdebe0; font-size: .92rem; opacity: .95; }

/* Image frame styling (required selectors) */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}

/* Optional wrapper used in HTML as featured-image */
.featured-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Content area (glass panels / content) */
.content {
  padding: 1rem;
  color: var(--text);
}
.aside {
  padding: 1rem;
  color: var(--text);
}

/* Product ad & other blocks (required selectors) */
.product-ad {
  padding: .75rem;
  margin: .5rem 0;
  background: rgba(43,212,191,0.18);
  border: 1px solid rgba(43,212,191,0.5);
  border-radius: 10px;
}
.product-ad a {
  color: #04231a;
  text-decoration: none;
  display: block;
  padding: .5rem;
  font-weight: 600;
}
.product-ad a:hover, .product-ad a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sponsored-page { padding: .75rem; margin: .5rem 0; }

/* Link, button, .btn, .cta styling (interactive states) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .18s ease, background .18s ease, color .18s ease;
  cursor: pointer;
}
a:hover { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
}
.btn, .cta {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #0b0f10;
  text-shadow: none;
}
.btn:hover, .cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.btn.secondary {
  background: rgba(255,255,255,0.12);
  color: var(--text);
}
.btn.ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: var(--text);
}
a.btn {
  display: inline-block;
  padding: .65rem 1.15rem;
  text-decoration: none;
  border-radius: 999px;
}
.cta {
  background: linear-gradient(135deg, var(--accent-2), #ff9a2a);
  color: #041010;
}
a:focus-visible { outline-offset: 2px; }

/* Lists (ul, li) styling for readability on glass */
ul, li {
  margin: 0.5rem 0;
  padding: 0;
  list-style-position: inside;
}
li { margin-block: 0.25rem; }

/* Tiny helper .tag (utility) */
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  font-size: .75rem;
  border-radius: 999px;
  border: 1px solid rgba(43,212,191,.6);
  background: rgba(43,212,191,.28);
  color: #072e25;
}

/* Header, main, aside, footer sizing with glass feel */
header, main, aside, footer {
  padding: 1rem;
}
header {
  display: block;
  margin: 1rem auto;
}
main {
  display: block;
  margin: 1rem auto;
}
footer {
  display: block;
  margin: 1rem auto;
  padding: 1rem;
}

/* Apply glass to primary structural regions for cohesion */
header, main, footer, aside {
  background: rgba(15, 25, 25, 0.28);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
  color: var(--text);
}

/* Responsive typography tweaks for readability on small screens */
@media (max-width: 700px) {
  h1 { font-size: clamp(1.6rem, 4.5vw, 2.6rem); }
  .container { padding-inline: .75rem; }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .btn, .cta { transition: none; }
  a, button { transition: none; }
}

/* Print-friendly adjustments (basic readability) */
@media print {
  html, body {
    background: white;
    color: #000;
  }
  header, main, aside, footer { background: transparent; border: none; box-shadow: none; }
}
