:root {
  /* Tokenized scarlet/scarlet-inspired palette */
  --bg: #0a0204;
  --bg-2: #1a0408;
  --text: #f7f7f7;
  --muted: #c9bebe;
  --accent: #ff2f2f;
  --accent-2: #ff6b6b;
  --card: rgba(255, 60, 60, 0.22);
  --card-border: rgba(255, 60, 60, 0.40);
  --glass: rgba(6, 0, 0, 0.22);
  --glass-border: rgba(255, 60, 60, 0.40);
  --radius: 12px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

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

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Noto Sans", sans-serif;
  font-size: clamp(14px, 1.3vw + 12px, 18px);
  line-height: 1.5;
  background: var(--bg);
  /* Layered background: gradient + scanlines + soft glow */
  background-image:
    linear-gradient(135deg, rgba(255, 0, 0, 0.20), rgba(0, 0, 0, 0.10)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 50% 0%, rgba(255,0,0,0.12), transparent 40%);
  background-blend-mode: overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  scroll-behavior: smooth;
}

body, main {
  display: block;
}

/* Glass panels (fallback + modern backdrop-filter) */
header, main, article, aside, footer {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Backdrop-filter support fallback: increase opacity if not supported */
@supports not (backdrop-filter: blur(12px)) {
  header, main, article, aside, footer {
    background: rgba(6, 0, 0, 0.28);
    border-color: rgba(255, 60, 60, 0.50);
  }
}

/* Layout helpers */
.container {
  width: min(92%, 1100px);
  margin: 0 auto;
  padding: 0 0.5rem;
}

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

.card {
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 60, 60, 0.25);
}

/* Image frame styling */
.image-frame {
  width: min(100%, 720px);
  margin: 1rem auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 60, 60, 0.40);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  background: #111;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}

/* Typography */
h1, h2, h3 {
  line-height: 1.2;
  margin: 0;
  color: #fff;
}
h1 { font-size: clamp(1.6rem, 2vw + 1rem, 3rem); font-weight: 700; }

/* Content helpers */
.content { padding: 0.5rem 0; }

/* Interactive elements */
a, button, .btn, .cta {
  font-family: inherit;
  text-decoration: none;
  color: var(--text);
}
a { color: var(--accent); }
a:hover, a:focus { text-decoration: underline; }

/* Focus treatments for accessibility */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6em 1.1em;
  border-radius: 999px;
  border: 1px solid rgba(255, 60, 60, 0.9);
  background: linear-gradient(#ff4747, #b30000);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255, 60, 60, 0.5); }
.btn:active { transform: scale(0.98); }
.btn.outline {
  background: transparent;
  border-color: rgba(255, 60, 60, 0.8);
  color: var(--text);
}
.cta { display: inline-flex; align-items: center; }

/* Glass utility (for any additional panels) */
.glass {
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,60,60,0.35);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* List styling */
ul, li { margin: 0; padding: 0; }
ul { list-style: none; display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Accent tags */
.tag {
  display: inline-block;
  padding: 0.25em 0.5em;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(255,60,60,0.25);
  color: #fff;
}

/* Section-specific layout tweaks for the sample page */
header {
  padding: 1rem;
  margin: 0 auto 0.75rem;
  max-width: 1100px;
}
header h1 { margin-bottom: 0.5rem; }

nav { display: flex; gap: 0.5rem; align-items: center; }

/* Small viewport adjustments */
@media (max-width: 720px) {
  header, main, footer { padding: 0.75rem; }
  .container { padding: 0 0.5rem; }
  .image-frame { margin: 0.75rem auto; }
}

/* Respect user preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}

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