/* Core tokens */
:root {
  --bg: #0a0f14;
  --bg-2: #0b151b;
  --surface: rgba(255,255,255,.08);
  --surface-2: rgba(255,255,255,.12);
  --border: rgba(255,255,255,.28);
  --text: #eafaff;
  --muted: #a8d5d9;
  --accent: #2ee6d8;
  --accent-2: #cbdde6;
  --shadow: 0 6px 20px rgba(0,0,0,.35);
  --radius: 14px;
  --focus: 0 0 0 3px rgba(46,230,216,.65);
}
:root[data-theme="light"] {
  --bg: #f6fbfe;
  --bg-2: #eef5f9;
  --surface: rgba(0,0,0,.08);
  --surface-2: rgba(0,0,0,.12);
  --border: rgba(0,0,0,.15);
  --text: #0b1a1b;
  --muted: #50676b;
  --accent: #0b7a7a;
  --accent-2: #2a3a45;
  --shadow: 0 6px 18px rgba(0,0,0,.12);
}
@media (prefers-color-scheme: light) {
  :root { color-scheme: light; }
  :root[data-theme="light"] { }
}

/* Global reset & layout scaffolding */
* { box-sizing: border-box; }
html, body { height: 100%; }
html, body, header, nav, main, article, aside, footer { display: block; }
html, body { margin: 0; padding: 0; }

body {
  font-family: ui-system, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: 
    radial-gradient(circle at 20% -10%, rgba(0,0,0,.25), transparent 40%),
    linear-gradient(135deg, rgba(0,0,0,.6), rgba(0,0,0,.15) 60%, rgba(0,0,0,.6) 100%),
    linear-gradient(135deg, rgba(0,180,190,.25), rgba(0,0,0,.0) 60%),
    #000;
  position: relative;
  isolation: isolate;
  --bg-surface: rgba(255,255,255,.08);
  background-color: var(--bg);
  z-index: 0;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* Subtle turquoise paper texture feel via layered noise-like stripes */
  background-image:
    repeating-linear-gradient(
      to bottom,
      rgba(46,230,216,.08) 0 1px,
      rgba(0,0,0,0) 1px 2px
    );
  opacity: .25;
  mix-blend-mode: overlay;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* soft vignette to deepen edges for contrast */
  background: radial-gradient(circle at 50% 0%, rgba(0,0,0,.0), rgba(0,0,0,.25) 70%);
  mix-blend-mode: multiply;
  opacity: .25;
}
:focus { outline: none; }

header, main, footer, aside { position: relative; z-index: 1; }

/* Layout utilities */
.container {
  width: 100%;
  max-width: clamp(640px, 88vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  border-radius: 999px;
  font-size: .75rem;
  color: var(--accent);
  border: 1px solid rgba(46,230,216,.45);
  background: rgba(46,230,216,.12);
}

/* Core elements styling */
html, body, header, nav, main, article, footer, aside {
  text-rendering: optimizeLegibility;
}
header {
  padding: 2rem 0 1.5rem;
  text-align: center;
}
header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 1.2rem + 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: .2px;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
nav { padding: .5rem 1rem; }

/* Hero content and typography */
main { padding: 1.25rem 0 2rem; display: grid; place-items: center; }
article { display: grid; gap: 1rem; }

/* Image frame with glassy border/glow */
.image-frame {
  width: min(92%, 720px);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
  display: block;
  margin: 0 auto;
  box-shadow: 0 10px 28px rgba(0,0,0,.4);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
}
.image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,.28);
  pointer-events: none;
}
@supports (backdrop-filter: blur(8px)) {
  .image-frame { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background: rgba(255,255,255,.08); }
}
@supports not (backdrop-filter: blur(8px)) {
  .image-frame { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); }
}

/* Glass panel variants (fallbacks included) */
.product-ad, .sponsored-page {
  display: block;
  text-align: center;
  margin: .5rem 0;
  border-radius: 12px;
  padding: 1rem;
  background: rgba(46,230,216,.12);
  border: 1px solid rgba(46,230,216,.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .15s ease;
}
.product-ad a, .sponsored-page a {
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  width: 100%;
}
.product-ad:hover, .sponsored-page:hover { transform: translateY(-1px); }

/* Interactive controls (buttons/links) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
.btn, .cta {
  display: inline-block;
  padding: .75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: linear-gradient(135deg, rgba(46,230,216,.85), rgba(2,150,150,.95));
  color: #041414;
  font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.35);
}
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:active, .cta:active { transform: translateY(0); }
a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

/* Focus accessibility (visible focus ring) */
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
ul, li { margin: 0; padding: 0; list-style: none; }

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

/* Light-mode readability tweak */
@media (prefers-color-scheme: light) {
  body { background: #f5fbfe; }
  header { color: var(--text); }
  .image-frame { border-color: rgba(0,0,0,.15); }
  a, button, .btn, .cta { color: #062b37; }
  .product-ad, .sponsored-page { background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.15); }
}

/* Layout refinements for sections present in HTML */
footer {
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  color: var(--muted);
}
footer p { margin: .25rem 0; }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  .image-frame { page-break-inside: avoid; }
  a { text-decoration: underline; color: inherit; }
}
  
/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; transform: none !important; }
}