/* Root palette and tokens */
:root{
  --bg: #2b1e0f;
  --bg-2: #3a2a15;
  --text: #f5f0e1;
  --muted: #c9b79b;
  --accent: #b19a64;      /* khaki-like */
  --accent-2: #7a6a2f;     /* darker khaki */
  --surface: rgba(255,255,255,0.12);
  --surface-2: rgba(0,0,0,0.25);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 2px solid #fff;
  --gap: 1rem;
  --tran: 0.2s ease;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans"; font-size: clamp(14px, 1.4vw, 16px); }
body {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  background: 
    linear-gradient(135deg, rgba(177,140,74,0.28), rgba(58,42,16,0.28)),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.04) 0 1px, transparent 1px 2px);
  background-color: #1b120b;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 0, rgba(255,255,255,0.05), transparent 40px),
    repeating-radial-gradient(circle at 60% 40%, rgba(0,0,0,0.04) 0 2px, transparent 2px 6px);
  opacity: 0.25;
  mix-blend-mode: overlay;
}

/* Layout helpers */
.container { width: 100%; max-width: clamp(680px, 88vw, 1120px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); }
.card { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25); border-radius: var(--radius-sm); padding: 0.75rem; }

/* Glass panels (with fallback) */
header, main, article, aside, footer, .product-ad {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
  header, main, article, aside, footer, .product-ad { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}
@supports not (backdrop-filter: blur(12px)) and not (-webkit-backdrop-filter: blur(12px)) {
  header, main, article, aside, footer, .product-ad { background: rgba(255,255,255,0.14); }
}

/* Core typography scales (fluid) */
h1 { font-size: clamp(1.75rem, 2.6vw + 1rem, 3.75rem); line-height: 1.15; margin: .75rem 0; color: var(--text); font-weight: 700; }
h2 { font-size: clamp(1.25rem, 1.6vw + .8rem, 1.75rem); margin: .75rem 0; color: var(--text); }
p { font-size: clamp(0.95rem, 0.8vw + 0.9rem, 1.1rem); color: var(--text); margin: 0 0 1rem; }
.meta { color: var(--muted); font-size: 0.92rem; margin: .25rem 0 0; }

/* Header styling (title + nav) */
header { display: block; margin: 1rem auto; padding: .75rem 1rem; max-width: 1200px; }
header h1 { font-size: clamp(1.5rem, 2vw + 1rem, 2.5rem); margin: 0.25rem 0 0.25rem; }
nav { margin-top: .25rem; }
nav a { color: var(--accent); text-decoration: none; padding: .25rem .5rem; border-radius: 6px; border: 1px solid rgba(177,150,78,0.4); }
nav a:hover { text-decoration: underline; }

/* Main + article content (glass content area) */
main { padding: 1rem; }
article { max-width: 900px; margin: 0 auto; padding: 1rem; }

/* Featured image frame */
.featured-image { margin: 0 0 1rem; }
.image-frame { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,.28); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Image frame helper (for any inline images) */
.image-frame, .image-frame img { will-change: transform; }

/* Content helpers inside article */
.content { max-width: 860px; margin: 0 auto; padding: 0; }

/* Links and CTAs */
a, button, .btn, .cta { transition: transform var(--tran), background var(--tran), color var(--tran); }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; outline: none; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

/* Buttons (solid and outline variants) */
.btn, button, .cta { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .6rem 1rem; border-radius: 8px; border: 1px solid rgba(255,255,255,0.4); background: var(--accent); color: #111; text-decoration: none; font-weight: 600; cursor: pointer; }
.btn { background: var(--accent); color: #111; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.4);
}
.btn--outline:hover { background: rgba(255,255,255,.08); }

/* Utility components per spec */
ul { padding-left: 1.25rem; margin: .25rem 0 1rem; }
li { margin: .25rem 0; }

/* Product ad / footer-ad styling */
.product-ad { display: block; margin: .5rem 0; text-align: center; }
.product-ad a { display: inline-flex; align-items: center; justify-content: center; padding: .75rem 1rem; width: auto; min-width: 180px; }

/* Footer content layout */
footer { padding-top: 0.75rem; margin-top: 1rem; }
footer p { text-align: center; margin: .25rem 0; }

/* Small screens adjustments */
@media (max-width: 720px){
  header, main, article, .product-ad { border-radius: 12px; }
  .image-frame { border-radius: 10px; }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Print readability (basic) */
@media print {
  body { background: #fff; color: #000; }
  header, main, article, footer { background: transparent; border: none; box-shadow: none; border-radius: 0; }
}
