/* 01. Tokens & Reset */
:root {
  --bg: #1b1107;
  --bg-2: #2a1a0b;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --text: #f5f1e0;
  --muted: #d5c8a5;
  --accent: #d9a722;
  --accent-2: #b4820f;
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 10px 28px rgba(0,0,0,.28);
  --radius: 14px;
  --focus: 0 0 0 3px rgba(217, 168, 34, 0.6);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-size: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  background:
    linear-gradient(135deg, rgba(42,16,7,0.95) 0%, rgba(18,9,4,0.95) 60%, rgba(42,16,7,0.95) 100%),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.05) 0px, rgba(0,0,0,0.05) 1px, transparent 1px, transparent 2px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 2px, transparent 2px, transparent 4px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }

/* 02. Layout utilities */
.container { max-width: clamp(320px, 92vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.tag { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.75rem; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: var(--text); }

/* 03. Core page structure */
header, main, footer { width: 100%; }
header { padding: 1rem; text-align: center; position: relative; border-bottom: 1px solid rgba(255,255,255,.25); 
  background: rgba(0,0,0,0.25); border-radius: 12px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
header h1 { margin: 0.25rem 0; font-size: clamp(1.4rem, 2vw + 1rem, 2.6rem); letter-spacing: .2px; }
header .meta { color: var(--muted); font-size: clamp(0.8rem, 0.9vw, 1rem); margin-top: .25rem; }
nav { margin-top: .5rem; }
nav a { color: var(--text); text-decoration: none; padding: .25rem .6rem; border-radius: 6px; }
nav a:hover, nav a:focus-visible { text-decoration: underline; outline: none; }

/* 04. Visual surfaces (glass panels, image frames) */
.image-frame, .image-frame img { border-radius: 12px; }
.image-frame { aspect-ratio: 16/9; overflow: hidden; border: 1px solid rgba(255,255,255,.28); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 6px 18px rgba(0,0,0,.25); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.content { max-width: 70ch; padding: 0; margin: 0 auto; }

/* Glass panels (fallback included) */
.glass, .card, .product-ad { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius);
  padding: 1rem; box-shadow: 0 8px 28px rgba(0,0,0,.25); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* Fallback for environments without backdrop-filter */
@supports not (backdrop-filter: blur(12px)) {
  .glass, .card, .product-ad { background: rgba(255,255,255,.18); }
}

/* 05. Typography & emphasis */
h2, h3 { line-height: 1.25; margin: .75rem 0 .5rem; color: var(--text); }
p { margin: .5rem 0 1rem; color: color-mix(in oklab, var(--text) 90%, black 10%); }
blockquote { margin: .75rem 0; padding: .75rem 1rem; border-left: 4px solid var(--accent); background: rgba(0,0,0,.15); border-radius: 6px; }

/* Lists */
ul { padding-left: 1.25rem; margin: .5rem 0 1rem; }
li { margin: .25rem 0; }

/* 06. Interactions & motion */
a, button, .btn, .cta { color: var(--text); text-decoration: none; cursor: pointer; font: inherit; }
.btn { display: inline-block; padding: .65rem 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.25);
  background: var(--accent); color: #111; font-weight: 700; transition: transform .2s ease, background .2s ease; }
.btn:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn:focus-visible { outline: 0; box-shadow: 0 0 0 0 transparent, 0 0 0 3px rgba(217,168,34,.9); outline-offset: 2px; }
.btn.secondary { background: transparent; border: 1px solid rgba(255,255,255,.4); color: var(--text); }
.btn.secondary:hover { background: rgba(255,255,255,.08); }

/* Links focus/hover underline for accessibility */
a:focus-visible, a:hover { text-decoration: underline; }

/* 07. Small utilities & layout refinements */
footer { padding: 1rem; display: grid; gap: 1rem; border-top: 1px solid rgba(255,255,255,.25); }

/* Product ad and sponsored sections in footer */
.product-ad, .sponsored-page { display: block; text-align: center; }
.product-ad a, .sponsored-page a { display: block; padding: .75rem; border-radius: 10px; color: var(--text); text-decoration: none; }
.product-ad { background: rgba(217,167,34,.14); border: 1px solid rgba(217,167,34,.4); }
.product-ad a { font-weight: 600; }

/* Print friendly (basic readability) */
@media print {
  body { background: white; color: #000; }
  header, main, footer { background: transparent; box-shadow: none; border: none; }
  .glass, .card { background: #fff; border: 1px solid #000; }
}
  
/* 08. Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  * { animation: none !important; transition: none !important; }
}

/* 09. Hero and content flow helpers (minimal, GPU-friendly) */
article { animation: fadeIn .6s ease forwards; opacity: 0; transform: translateY(6px); }
@keyframes fadeIn { to { opacity: 1; transform: none; } }