/* Section: Base Setup */
:root{
  --bg: #0a0000;
  --bg-2: #170f0f;
  --sand: #d8c59a;
  --sand-2: #f0e6d6;
  --text: #f7f7f7;
  --muted: #c7b9a0;
  --accent: #ff2a2a;
  --accent-2: #ffd8a8;
  --card: rgba(255,255,255,0.08);
  --card-2: rgba(0,0,0,0.25);
  --border: rgba(255,255,255,0.25);
  --shadow: 0 8px 24px rgba(0,0,0,.45);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 3px solid rgba(255, 45, 45, 0.95);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
html, body { margin: 0; padding: 0; }

/* Section: Background & Layout */
html, body { scroll-behavior: smooth; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  background: 
    radial-gradient(circle at 20% 10%, rgba(255,0,20,.18), transparent 25%),
    radial-gradient(circle at 85% 0%, rgba(255,170,100,.15), transparent 25%),
    linear-gradient(135deg, #0a0000 0%, #100000 60%, #090808 100%);
  background-blend-mode: multiply, overlay, normal;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04), rgba(255,255,255,.04)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: 0.6;
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }

/* Section: Accessibility & Motion */
}
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* Section: Global Helpers */
.container { width: 100%; max-width: clamp(700px, 90vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tag { display:inline-block; padding:.25em .6em; border-radius:999px; font-size:.75rem; background: rgba(255,0,0,.25); color: #fff; border: 1px solid rgba(255,255,255,.5); }

/* Section: Typographic Rhythm */
h1, h2, h3 { line-height: 1.15; margin: .6em 0 .4em; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 3vw + 1rem, 3rem); color: #fff; }
h2 { font-size: clamp(1.25rem, 2vw + .75rem, 1.75rem); color: #fff; }
p { color: var(--muted); font-size: clamp(1rem, 0.8vw + .8rem, 1.125rem); }

/* Section: Header & Nav (glass-like panels) */
header, nav, main, footer, aside, article { 
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 1rem;
  margin: .75rem 0;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
header { padding: 1rem 1rem; display: block; }
header h1 { color: #fff; font-size: clamp(1.4rem, 4vw + .5rem, 2.2rem); margin: .25rem 0 0.25rem; }
header .meta { color: var(--sand); font-size: .9rem; margin-top: .25rem; }

/* Section: Main article layout & content */
main { display: block; padding: 0; }
article { max-width: clamp(640px, 90vw, 900px); margin-inline: auto; }

/* Section: Image framing & media */
.image-frame { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 6px 16px rgba(0,0,0,.25); background: #111; display: block; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Featured image wrapper (compatible with provided HTML) */
.featured-image { border-radius: 12px; overflow: hidden; margin-bottom: .75rem; border: 1px solid rgba(255,255,255,.25); }

/* Section: Content wrapper (for .content usage) */
.content { padding: .75rem 0; }

/* Section: Text lists & hierarchy */
ul, li { margin: 0.4rem 0; padding: 0; list-style: disc; padding-left: 1.25rem; }
ol { padding-left: 1.25rem; margin: .4rem 0; }

/* Section: Link & Button typography (including .cta) */
a, button, .btn, .cta { text-decoration: none; color: var(--accent-2); cursor: pointer; }
a:hover, a:focus { text-decoration: underline; color: #fff; outline: none; }
button, .btn, .cta { border-radius: 999px; padding: .55rem .95rem; border: 1px solid rgba(255,255,255,.5); background: rgba(255,0,0,.9); color: #fff; font-weight: 600; display: inline-block; transition: transform .15s ease, background .2s ease; }
.btn:hover, .cta:hover { transform: translateY(-1px); background: #e30014; }
.btn:active, .cta:active { transform: translateY(0); }

/* Focus visibility for accessibility (WCAG AA-ish) */
:focus-visible { outline: 3px solid rgba(255,255,255,.95); outline-offset: 2px; border-radius: 6px; }

/* Section: Glass panel fallback for no-backdrop environments */
@supports not (backdrop-filter: blur(1px)) {
  header, nav, main, article, aside, footer, .card { background: rgba(255,255,255,.12); }
  header, nav, main, article, aside, footer { border-color: rgba(255,255,255,.4); }
}

/* Section: Print (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  header, main, footer { background: none; border: none; box-shadow: none; }
}
  
/* Section: Hero pattern emphasis (hierarchy for hero) */
header > h1 { margin-block: .25em; }

/* Section: Image frame helpers (utility) */
.image-frame--glow { box-shadow: 0 0 0 2px rgba(255,255,255,.15) inset; }

/* Section: Content alignment helpers (compact utilities) */
.container--tight { max-width: clamp(620px, 88vw, 860px); }

/* Section: Reduced motion guard for animations */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
