:root {
  /* Palette (khaki + steel gray, with glassy neutrals) */
  --bg: #0b0f12;
  --khaki: #b9a96b;
  --khaki-2: #d6c678;
  --steel: #5a5f66;
  --text: #e8f0e8;
  --muted: #a6b4b0;
  --accent: #c6b37e;
  --accent-2: #97a1a6;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.18);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  --focus: 0 0 0 3px rgba(180, 210, 255, 0.75);
  --link: #d9d2a3;
  --link-hover: #f2e7b0;
}

/* Base reset & tokens */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 16px; }

body {
  margin: 0;
  color: var(--text);
  background: 
    /* Layered background: khaki-tinged gradient + steel-dusky base */
    linear-gradient(135deg, rgba(185,169,107,0.25) 0%, rgba(140,150,160,0.25) 60%, rgba(40,45,50,0.25) 100%),
    /* Subtle scanlines/noise via CSS gradients */
    repeating-linear-gradient(to bottom,
      rgba(0,0,0,0.04) 0px,
      rgba(0,0,0,0.04) 1px,
      transparent 1px,
      transparent 2px);
  min-height: 100%;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout helpers & utilities */
.container {
  width: 100%;
  max-width: clamp(720px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card, .content, .product-ad, aside, header, main, footer {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: saturate(1.1) blur(10px);
  -webkit-backdrop-filter: saturate(1.1) blur(10px);
}

/* Imagery */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  display: block;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0); /* GPU hint for smoother rendering */
}
.featured-image { margin: 0 auto 1rem; max-width: 1100px; }

/* Glass panels with graceful fallbacks */
header, main, footer, aside {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports not (backdrop-filter: blur(10px)) {
  header, main, footer, aside { background: rgba(255, 255, 255, 0.14); }
}

/* Typography */
h1, h2, h3 {
  margin: 0.25rem 0;
  line-height: 1.15;
  font-weight: 700;
  color: var(--text);
}
h1 { font-size: clamp(1.75rem, 3.5vw, 3rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 2.5vw, 2rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.5rem); }

p { margin: 0.5rem 0 1rem; color: var(--text); }
.meta { color: var(--muted); font-size: 0.95rem; margin: 0.25rem 0 0; }

/* Content & prose readability on glass panels */
.article, article { color: var(--text); }
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Links & CTAs */
a { color: var(--link); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--link-hover); outline: none; }
a:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

/* Buttons & controls (solid + outline variants) */
.btn, .cta {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0,0,0,0.28);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(170,210,255,0.9);
  border-color: rgba(170,210,255,0.9);
}
.btn.primary {
  background: linear-gradient(135deg, var(--khaki) 0%, var(--khaki-2) 100%);
  border: 1px solid rgba(0,0,0,0.25);
}
.btn.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.6);
  color: var(--text);
}
.cta { min-width: 0; }

/* Utility-ish chips */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--text);
}

/* Layout sections spacing for desktop readability */
header { margin: 0.75rem auto; max-width: 1100px; }
main { margin: 0.75rem auto; max-width: 1100px; }
footer { margin: 0.75rem auto; max-width: 1100px; }

/* Specific page sections (structural selectors) */
.image-frame, .image-frame img { }
.product-ad { display: block; }
.content { }

/* Print styles (readability) */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .image-frame { page-break-inside: avoid; }
  * { -webkit-box-shadow: none; box-shadow: none; }
}

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