/* Root tokens: khaki + indigo themed, accessible defaults */
:root {
  --bg: #0b1020;
  --bg-2: #141a32;
  --bg-3: #0a0f1e;
  --text: #eef2ff;
  --muted: #cbd5e1;
  --accent: #b6a36b;       /* khaki-like */
  --accent-2: #5e6cff;      /* indigo */
  --link: #cfe0ff;
  --link-hover: #ffffff;
  --card: rgba(255,255,255,0.08);
  --card-border: rgba(255,255,255,0.25);
  --shadow: 0 6px 18px rgba(0,0,0,0.35);
  --radius: 14px;
}

/* Global reset / layout helpers */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-size: 16px; }
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.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  /* Layered background: gradient + khaki geometry + subtle scanlines/noise */
  background:
    radial-gradient( circle at 10% -10%, rgba(0,0,0,.25) 0%, transparent 40% ),
    linear-gradient(135deg, rgba(0,0,0,.25), rgba(0,0,0,.05) 40%, rgba(0,0,0,.25)),
    repeating-linear-gradient(45deg, rgba(182,162,91,.25) 0 28px, rgba(182,162,91,0) 28px 56px),
    linear-gradient( to bottom right, rgba(20,20,30,.75), rgba(10,12,22,.75) ),
    var(--bg-3);
  background-blend-mode: overlay;
  overflow-x: hidden;
}

/* Subtle fix for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Basic structural styling */
header, nav, main, article, aside, footer {
  display: block;
}
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
header {
  padding: 1.25rem 1rem;
  text-align: center;
  position: relative;
  z-index: 2;
}
header h1 {
  font-size: clamp(1.75rem, 4vw + 1rem, 3.75rem);
  line-height: 1.05;
  margin: 0 0 .25rem;
  font-weight: 900;
  letter-spacing: .2px;
  text-shadow: 0 2px 14px rgba(0,0,0,.4);
}
header .meta {
  font-size: clamp(0.85rem, 0.6vw + 0.8rem, 1rem);
  color: var(--muted);
}
nav { margin-top: .25rem; }
nav a {
  color: var(--link);
  text-decoration: none;
  padding: .25rem .6rem;
  border-radius: 6px;
  border: 1px solid transparent;
}
nav a:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  text-decoration: underline;
}
main { padding: 1rem 0 2rem; }

/* Glass / frosted panels (with fallbacks) */
.card, .content, .image-frame, .product-ad, article {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.card, .content { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@supports not (backdrop-filter: blur(10px)) {
  .card, .content { background: rgba(255,255,255,0.92); color: #111; }
}
.image-frame { border: 1px solid rgba(255,255,255,.28); border-radius: 12px; overflow: hidden; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Featured image wrapper (uses image-frame styling) */
.featured-image { width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); box-shadow: var(--shadow); }
.featured-image img { width: 100%; height: auto; display: block; }

/* Content typography and layout */
article { max-width: 70ch; margin: 1rem auto; padding: 1rem; }
h2 { font-size: clamp(1.25rem, 2.5vw + 0.5rem, 2rem); margin: .75rem 0 .5rem; }
p { font-size: clamp(1rem, 0.6vw + 0.95rem, 1.25rem); color: color-m-mix(in oklab, black 0%, white 100%); margin: .75rem 0; }
blockquote {
  margin: .75rem 0;
  padding: .75rem 1rem;
  border-left: 3px solid var(--accent-2);
  color: var(--text);
  background: rgba(0,0,0,.15);
  border-radius: 6px;
}
ul { padding-left: 1.25rem; margin: .75rem 0; }
li { margin: .25rem 0; }

/* Utilities / components */
.container { padding-inline: 1rem; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card { min-width: 0; }

/* Product ad / footer sections */
.product-ad, .sponsored-page {
  display: block;
  text-align: center;
  text-decoration: none;
  margin: .5rem 0;
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: block; padding: .75rem; border-radius: 10px; }
.product-ad a { background: rgba(92, 78, 37, .25); border: 1px solid rgba(180,160,90,.4); }
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }
footer { padding: 1rem; }

/* Link/button styles (interactive) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  background: transparent;
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
a { display: inline-block; }
a:hover, button:hover, .btn:hover, .cta:hover { text-decoration: underline; transform: translateY(-1px); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.btn.primary {
  background: var(--accent-2);
  color: white;
  border: 1px solid rgba(0,0,0,.25);
}
.btn.secondary {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.4);
  color: var(--text);
}
.cta {
  display: inline-block;
  font-weight: 600;
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(182,162,91,.25);
  color: #fff;
  border: 1px solid rgba(182,162,91,.6);
}

/* Print-friendly (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a, a:visited { text-decoration: underline; color: #000; }
  .card, .content { background: #fff; border: 1px solid #ddd; }
}
