/* Section: Tokens */
:root {
  --bg: #1b1f24;
  --bg-2: #0e1116;
  --text: #e9f2ff;
  --muted: #aab6c4;
  --accent: #b76e2a;        /* copper */
  --accent-2: #c9904d;      /* copper highlight */
  --panel: rgba(14, 16, 22, 0.72);
  --panel-border: rgba(183, 115, 51, 0.45);
  --shadow: 0 10px 28px rgba(0,0,0,.36);
  --radius: 14px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --text-shadow: 0 1px 0 rgba(0,0,0,.3);
}

/* Section: Base / Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: var(--font-sans); font-size: 16px; line-height: 1.4; color: var(--text); }
body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(135deg, rgba(20,24,28,.98), rgba(8,8,12,.98) 60%);
  color: var(--text);
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  isolation: isolate;
  /* Layered background base for "future cyberpunk" mood */
  background-blend-mode: normal;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f3f5f7; --text: #0b1020; --muted: #495a6b; --panel-border: rgba(183,115,51,.25); }
  body { background: linear-gradient(135deg, #f0f3f7, #e9eef7); color: var(--text); }
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: linear-gradient(rgba(0,0,0,.08) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  background-position: 0 0, 0 0;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
  /* subtle grid-like scanlines */
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background: radial-gradient( circle at 50% 0%, rgba(120,60,15,.15), transparent 40% ),
              linear-gradient(135deg, rgba(0,0,0,.0), rgba(0,0,0,.25) 60%, rgba(0,0,0,.0) 100%);
  mix-blend-mode: overlay;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

/* Section: Layout primitives */
html, body, header, nav, main, article, aside, footer {
  /* ensure semantics honored; no layout surprises on small screens */
}
.container {
  width: 100%;
  max-width: clamp(680px, 90vw, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius) - 2px);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports not (backdrop-filter: blur(4px)) {
  .card { background: rgba(15,18,24,.92); border-color: rgba(183,115,51,.6); }
}
.header, .content-area { position: relative; z-index: 1; }

/* Section: Structural elements styling */
html, body { scroll-behavior: smooth; }
header {
  text-align: center;
  padding: 1.25rem 1rem 0.5rem;
}
header h1 {
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(1.6rem, 2.6vw + 1rem, 2.9rem);
  line-height: 1.15;
  margin: 0 0 .25rem;
  letter-spacing: .2px;
  color: var(--text);
  text-shadow: var(--text-shadow);
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.85rem, 0.8vw + 0.8rem, 1rem);
}
nav {
  margin-top: .5rem;
}
nav a {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  padding: .5rem .75rem;
  border-radius: 8px;
  border: 1px solid rgba(183,115,51,.35);
  background: rgba(183,115,51,.15);
  transition: transform .2s ease, background .2s ease;
}
nav a:hover { background: rgba(183,115,51,.25); }
nav a:focus-visible {
  outline: 3px solid rgba(183,115,51,.95);
  outline-offset: 2px;
  border-radius: 8px;
}
main { padding: 0; }
article {
  margin: 1rem auto;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(15,18,26,.66);
  border: 1px solid rgba(183,115,51,.42);
  box-shadow: 0 8px 28px rgba(0,0,0,.32);
  max-width: 900px;
  color: var(--text);
}
.featured-image { margin: 1rem 0 0; }
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(183,115,51,.45);
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
  background: #0b0f14;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
h1 + p { margin-top: .75rem; }

h2, h3 {
  color: var(--text);
  margin-top: 1.25rem;
  margin-bottom: .5rem;
  font-weight: 700;
}
h2 { font-size: clamp(1.25rem, 1.2vw + 1rem, 1.75rem); }
h3 { font-size: clamp(1.05rem, 1vw + .9rem, 1.25rem); }

/* Lists */
ul { padding-left: 1.25rem; margin: .75rem 0; }
ul li { margin: .25rem 0; line-height: 1.6; }
blockquote {
  margin: .75rem 0; padding: .75rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  background: rgba(255,255,255,.03);
  border-radius: 6px;
}
p { margin: .9rem 0; color: #eaf2ff; }

/* Section: Glass panels (content framing) */
.content {
  padding: 1rem;
  border-radius: calc(var(--radius) - 4px);
  background: rgba(9, 12, 16, 0.72);
  border: 1px solid rgba(183,115,51,.42);
  box-shadow: 0 8px 22px rgba(0,0,0,.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .content { background: rgba(9,12,16,.92); }
}
@media (min-width: 900px) {
  .content { padding: 1.25rem 1.5rem; }
}

/* Section: Buttons & links (variants) */
a, button, .btn, .cta {
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  display: inline-block;
  transition: transform .15s ease, background .2s ease, color .2s ease;
  cursor: pointer;
  outline: none;
}
a { color: var(--accent-2); }
a:hover { text-decoration: underline; color: var(--text); }
.btn, .cta {
  padding: .75rem 1rem;
  border: 1px solid rgba(183,115,51,.5);
  background: linear-gradient(#a05622, #b76e2a);
  color: #fff;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 12px rgba(0,0,0,.25);
}
.btn:hover { transform: translateY(-1px); background: linear-gradient(#b06728, #c88233); }
.btn:active { transform: translateY(0); opacity: .95; }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(183,115,51,.85);
}
.btn--outline:hover {
  background: rgba(183,115,51,.25);
}
.cta { padding: .8rem 1.2rem; }

/* Focus visibility for accessibility */
:focus-visible {
  outline: 3px solid rgba(183,115,51,.95);
  outline-offset: 3px;
  border-radius: 8px;
}
footer {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--muted);
}
.product-ad, .sponsored-page {
  display: inline-block;
  padding: .75rem 1rem;
  margin: .25rem;
  border-radius: 12px;
  background: rgba(20,24,28,.65);
  border: 1px solid rgba(183,115,51,.45);
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; }
.product-ad:hover, .sponsored-page:hover { transform: translateY(-1px); }

/* Section: Images and media helpers */
.image-frame { contain: layout; }

/* Section: Utilities & semantics */
ul, li { color: var(--text); }

/* Section: Print (basic readability) */
@media print {
  body { background: white; color: black; }
  header, nav, footer { display: none; }
}
@media (min-width: 720px) {
  header { padding: 1.25rem 1rem 0.75rem; }
  article { padding: 1.75rem; }
}

/* Section: Accessibility helpers (contrast reminders) */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}