/* Tokens */
:root {
  --sand: #d2b48c;
  --sand-dark: #b19363;
  --silver: #c0c8d0;
  --bg: #0b0f14;
  --bg-2: #111522;
  --text: #e9eef7;
  --muted: #a7b3c2;
  --accent: #7af0ff;
  --accent-2: #baf7d7;
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 24px rgba(0,0,0,.35);
  --focus: #00e5ff;
  --radius: 12px;
}

/* Base & helpers */
html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Layered background: gradient + subtle sand hex honeycomb + subtle scanlines */
  background: 
    linear-gradient(135deg, rgba(9,12,15,0.95) 0%, rgba(14,18,22,0.95) 60%, rgba(9,12,15,0.95) 100%),
    /* Sand hex honeycomb hint (stylized) */
    linear-gradient(30deg, rgba(212, 180, 120, 0.15) 25%, transparent 25%) ,
    linear-gradient(30deg, rgba(212, 180, 120, 0.15) 25%, transparent 25%) ,
    linear-gradient(-60deg, rgba(212,180,120,0.15) 25%, transparent 25%),
    linear-gradient(-60deg, rgba(212,180,120,0.15) 25%, transparent 25%);
  background-size: 26px 45px;
  background-position: 0 0, 13px 22px, -13px 22px, 0 0, 0 0;
  background-blend-mode: overlay;
  isolation: isolate;
  padding: 0;
  overflow-x: hidden;
}

/* Focus visibility for accessibility */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Layout primitives */
.container { width: min(92vw, 1200px); margin-inline: auto; padding: 0 1rem; }
.grid { display: grid; gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.tag { display: inline-block; padding: .25rem .5rem; border-radius: 999px; font-size: .75rem; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: var(--text); }

/* Typography */
h1, h2, h3 { margin: 0 0 .5rem 0; font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(1.6rem, 3vw + 1rem, 2.6rem); letter-spacing: .2px; }
p { margin: 0 0 1rem; color: var(--muted); }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; color: var(--accent-2); }

/* Glass panels (with graceful fallback) */
.glass {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,0.14); }
}

/* Header, Main, Footer layout (mobile-first) */
header, main, footer, aside {
  display: block;
}
header { text-align: center; padding: 1.25rem 0 0.75rem; }
header h1 { font-weight: 700; font-size: clamp(1.4rem, 4vw + 0.5rem, 2.2rem); }

/* Image frame styling */
.image-frame {
  aspect-ratio: 16/9;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.15);
  display: block;
  margin: 0 auto;
  box-shadow: 0 6px 22px rgba(0,0,0,.4);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.02);
  transform: translateZ(0);
}
@media (prefers-reduced-motion: reduce) {
  .image-frame img { transition: none; }
}

/* Content area (generic) */
.content { padding: 1rem; }

/* Product ad & sponsor sections (footer) */
.product-ad, .sponsored-page {
  display: block;
  text-align: center;
  margin: .5rem 0;
}
.product-ad a, .sponsored-page a {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: var(--text);
  text-decoration: none;
  transition: transform .2s ease, background-color .2s ease;
}
.product-ad a:hover, .sponsored-page a:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.product-ad a:focus-visible, .sponsored-page a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Lists & utilities */
ul { padding: 0; margin: 0; list-style: none; }
li { margin: 0; }

/* Layout utilities (responsive grid) */
@media (min-width: 640px) {
  .container { padding: 0 1.25rem; }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media print {
  body { background: white; color: #000; }
  .glass { background: #fff !important; border: 1px solid #ccc; box-shadow: none; backdrop-filter: none; }
}
