/* Section: Base & Tokens */
:root {
  --bg: #0b0a07;
  --bg-2: #1a110d;
  --bg-3: #2a1910;
  --text: #f7f3ee;
  --muted: #c9b59f;
  --accent: #ff6a1a;
  --accent-2: #ff9a3c;
  --panel: rgba(255,255,255,0.08);
  --panel-strong: rgba(255,255,255,0.18);
  --border: rgba(255,140,70,0.42);
  --surface: rgba(0,0,0,0.34);
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,0.25);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --focus: 0 0 0 3px rgba(255, 122, 26, 0.55);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: var(--font-sans); font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #1a120f 0%, #2b1b12 60%, #1a120f 100%);
  background-blend-mode: overlay;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  padding: 0;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* subtle brown ice-crystal glow and vignette */
  background: 
    radial-gradient(circle at 20% -10%, rgba(255, 140, 50, 0.15), transparent 40%),
    radial-gradient(circle at 90% 0%, rgba(160, 80, 20, 0.12), transparent 40%);
  mix-blend-mode: overlay;
  filter: saturate(1.1);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* subtle scanlines overlay for a cyberpunk feel */
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.0), rgba(0,0,0,0.0)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 2px);
  background-size: auto 2px;
  mix-blend-mode: overlay;
  opacity: 0.25;
  z-index: 0;
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { display: none; }
}

/* Section: Layout utilities */
.container { width: min(100%, clamp(320px, 92vw, 1200px)); margin-inline: auto; padding-block: 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Section: Glass panels & surfaces (fallback included) */
.card, .glass {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.glass { /* explicit class for frosted panels */ background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25); }
.glass--fallback { /* fallback when backdrop-filter not available */ background: rgba(255,255,255,0.18); }

/* Section: Image frame styling */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.15);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
  filter: saturate(1.04);
}

/* Section: Core typography & content area */
.content { padding: 0.25rem 0 1rem; color: var(--text); }
h1, h2, h3 { margin: 0 0 .25rem; font-weight: 700; line-height: 1.15; }
p { margin: 0 0 0.75rem; color: var(--muted); }
h1 { font-size: clamp(1.75rem, 2.5vw + 1rem, 3.75rem); letter-spacing: .2px; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.helper { color: var(--muted); font-size: clamp(0.9rem, 0.8vw + 0.8rem, 1.1rem); }

/* Section: Links & buttons (focus visible for accessibility) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
}
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 0.2px; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  outline: var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 165, 90, 0.6);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); background: #ff7a1a; }
.btn:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  border: 1px solid rgba(255, 165, 90, 0.95);
  color: var(--text);
}
.cta { font-weight: 700; }

/* Section: Lists & chips */
ul { padding: 0; margin: 0; list-style: none; }
li { margin: 0.25rem 0; }
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--text);
}

/* Section: Page regions */
header, nav, main, article, aside, footer {
  display: block;
}
header {
  padding: 1rem;
  margin: 0 auto 1rem;
  max-width: clamp(320px, 90vw, 1200px);
}
header h1 { margin-bottom: .25rem; font-weight: 800; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
nav a { display: inline-block; padding: .5rem 0.9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); color: var(--text); text-decoration: none; background: rgba(0,0,0,.25); }

/* Main content layout */
main { display: block; padding: 0 1rem; }
article { display: grid; gap: 1rem; justify-items: center; padding: 0.5rem 0 1rem; }

/* Footer */
footer { padding: 1rem; text-align: center; color: var(--muted); }

/* Specific blocks (align with provided selectors) */
.image-frame { /* already defined above; ensure it's targeted */ }
.image-frame img { /* already defined above */ }

/* Utility alias classes (for quick layout tweaks) */
.content--center { text-align: center; }

/* Section: Print styles */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
  .glass, .card { background: #f8f8f8 !important; border: 1px solid #ddd !important; color: #000; }
}

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