/* Core tokens (white/brown inspired) */
:root {
  --bg: #0a0a0f;
  --bg-2: #1a1410;
  --text: #f7efe8;
  --muted: #c8b7ad;
  --accent: #9b6a2e;
  --accent-2: #d6a056;
  --panel: rgba(255,255,255,0.22);
  --panel-2: rgba(255,255,255,0.14);
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.20);
  --shadow: 0 8px 28px rgba(0,0,0,.45);
  --focus: 0 0 0 3px rgba(214,160,86,.8);
  --container-max: 1100px;
}

/* Light mode overrides for legibility (opt-in) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f5f0;
    --bg-2: #efe7db;
    --text: #1b1b1b;
    --muted: #5a5248;
    --accent: #8a5a2b;
    --accent-2: #c07a2c;
    --panel: rgba(255,255,255,0.92);
    --panel-2: rgba(255,255,255,0.80);
    --surface: rgba(0,0,0,0.04);
    --surface-2: rgba(0,0,0,0.08);
  }
}

/* Global resets & color-scheme hints */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.14) 0 18%, rgba(255,255,255,0) 22%),
    radial-gradient(circle at 75% 15%, rgba(255,255,255,.08) 0 28%, rgba(255,255,255,0) 32%),
    linear-gradient(#0b0b0f, #0b0b0f);
  background-blend-mode: screen, screen, normal;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.14) 0 18%, rgba(255,255,255,0) 22%),
    radial-gradient(circle at 75% 15%, rgba(255,255,255,.08) 0 28%, rgba(255,255,255,0) 32%),
    linear-gradient(#0b0b0f, #0b0b0f),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, rgba(0,0,0,0) 1px 2px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 90vw, var(--container-max));
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
}
@supports not (backdrop-filter: blur(8px)) {
  .card { background: rgba(255,255,255,.20); backdrop-filter: none; }
}
.aside { display: none; }

/* Glass panels (frosted glass) */
.glass {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: var(--surface-2); backdrop-filter: none; }
}

/* Header / hero */
header {
  text-align: center;
  padding: 2rem 0 1.5rem;
}
header h1 {
  font-size: clamp(1.6rem, 2.2vw + 1rem, 2.8rem);
  margin: 0;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
main { padding: 1rem 0 2rem; display: grid; place-items: center; }

/* Image frame styling */
.image-frame {
  width: min(90vw, 760px);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.25);
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  display: grid;
  place-items: center;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}

/* Typography scale & content sections */
.content {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.55;
  max-width: 62ch;
  margin: 0 auto;
  text-align: left;
}
h2, h3 { color: var(--text); }
p { margin: .5em 0; }

/* Product/ad footer sections */
footer {
  padding: 1.5rem 0 2rem;
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}
.product-ad, .sponsored-page {
  padding: .75rem;
}
.product-ad a, .sponsored-page a {
  display: block;
  padding: .9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.25);
  color: #fff;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
.product-ad a:hover, .sponsored-page a:hover { transform: translateY(-1px); background: rgba(0,0,0,.32); }
.product-ad a:focus-visible, .sponsored-page a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
footer p {
  color: var(--muted);
  margin: .25rem 0 0;
}

/* Interactive primitives (links, buttons) */
a, button, .btn, .cta {
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  color: inherit;
  font: inherit;
}
a { color: var(--accent-2); }
a:hover, a:focus-visible { text-decoration: underline; outline: none; }

/* Button variants (solid + outline) */
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75em 1.25em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(18,14,8,.92);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.6);
}
.btn--outline:hover { background: rgba(255,255,255,.04); }

/* List styling */
ul { margin: 0; padding: 0; list-style: none; }
li { margin: 0.3em 0; }

/* Utility badges */
.tag {
  display: inline-flex;
  align-items: center;
  padding: .15em .5em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  color: var(--text);
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Print-friendly (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}
