/* Token palette */
:root {
  --bg: #0b0b0f;
  --bg-2: #14141a;
  --text: #e9f0ff;
  --muted: #a6accd;
  --accent: #b56a2a;   /* copper */
  --accent-2: #e59a3b; /* copper highlight */
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.25);
  --shadow-soft: 0 6px 16px rgba(0,0,0,0.28);
  --focus: 2px solid rgba(0, 230, 255, 0.95);
}

/* Base & utilities */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
body {
  margin: 0;
  color: var(--text);
  background: 
    linear-gradient(to bottom, rgba(6,6,12,0.92), rgba(6,6,12,0.98)),
    radial-gradient(circle at 20% -10%, rgba(182,106,42,0.20), transparent 40%),
    #050510;
  background-blend-mode: normal, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  mix-blend-mode: overlay;
  opacity: 0.38;
  z-index: 0;
  animation: drift 60s linear infinite;
}
@keyframes drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-1px,0,0); } }

/* Glass panels (fallback when backdrop-filter not supported) */
header, main, aside, footer {
  background: rgba(8,8,14,0.28);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, aside, footer { background: rgba(8,8,14,0.88); }
}
a, button, .btn, .cta { color: var(--text); text-decoration: none; border: none; background: none; cursor: pointer; font: inherit; }
a { color: #a8e0ff; text-decoration: none; border-bottom: 1px solid transparent; }
a:hover, a:focus { text-decoration: underline; outline: none; }

/* Focus states for accessibility */
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 3px solid #5ee6ff;
  outline-offset: 2px;
  border-radius: 6px;
}
:focus-visible { outline: none; }

/* Layout primitives */
.container {
  max-width: clamp(320px, 88vw, 1100px);
  margin-inline: auto;
  padding-block: 1rem;
  padding-inline: 1rem;
}
.grid { display: grid; gap: 1rem; }

/* Type scale (fluid typography) */
h1 { font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.15; margin: 0 0 .5rem; }
h2 { font-size: clamp(1.25rem, 4vw, 2rem); margin: .25rem 0 0; }
p { color: var(--muted); line-height: 1.6; margin: 0 0 1rem; }
.meta { color: var(--muted); font-size: clamp(0.85rem, 1.6vw, 0.95rem); margin: 0; }

/* Image framing (supporting .image-frame as well as existing .featured-image) */
.image-frame {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.featured-image { border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.28); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }

/* Article layout */
main { padding: 1rem 0; }
article { display: grid; gap: 1rem; }

/* Glass content container */
.content { padding: 0.75rem; border-radius: 12px; }

/* Sections/utility components */
.product-ad, .sponsored-page {
  display: inline-block;
  width: 48%;
  margin: 0.25rem 1% 0;
  padding: .75rem;
  border-radius: 12px;
  text-align: center;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.28);
}
.tag {
  display:inline-block;
  padding:.25rem .5rem;
  font-size:.75rem;
  border-radius:999px;
  background: rgba(182,106,42,0.35);
  color: #fff;
  border: 1px solid rgba(182,106,42,0.9);
}

/* Buttons & CTAs */
.btn, .cta { display:inline-flex; align-items:center; justify-content:center; padding:.6rem 1rem; border-radius:999px;
  border:1px solid rgba(255,255,255,0.25); background: rgba(184,115,51,0.25); color:#fff;
  transition: transform .2s ease, background .2s ease, color .2s ease; }
.btn:hover, .cta:hover { transform: translateY(-1px); background: rgba(184,115,51,0.5); }
.btn:active, .cta:active { transform: translateY(0); opacity: 0.95; }

/* Primary vs outline variants */
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #111;
  padding: .75rem 1.25rem;
}
.btn.outline {
  background: rgba(0,0,0,0.0);
  border: 1px solid rgba(184,115,51,0.9);
  color: var(--text);
}

/* Layout adaptivity for content columns */
@media (min-width: 640px) {
  .container { padding-inline: 1.25rem; }
  article { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
  main { padding: 2rem 0; }
  article { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
  .image-frame { aspect-ratio: 16 / 9; }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .btn, .cta { transition: none; }
}

/* Print accessibility */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer, aside { background: transparent; border: none; }
  .image-frame { page-break-inside: avoid; }
}