/* Base Tokens */
:root {
  --bg: #0a0f14;
  --bg-2: #141a20;
  --text: #e6f0f4;
  --muted: #a6adbb;
  --accent: #ff7a1a;
  --accent-2: #ffb357;
  --panel: rgba(0, 0, 0, 0.48);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.28);
  --shadow-soft: 0 6px 18px rgba(0,0,0,0.25);
  --shadow: 0 8px 24px rgba(0,0,0,0.40);
  --radius: 12px;
  --focus: 2px solid var(--accent);
}

/* Section: Global & Layout */
html, body, header, nav, main, article, footer, aside {
  box-sizing: border-box;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  min-height: 100vh;

  /* Layered background: gradient + subtle noise/scanlines + burnt-orange glow tint */
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.82), rgba(0,0,0,0.88)),
    linear-gradient(135deg, rgba(18,18,18,0.95) 0%, rgba(20,22,26,0.95) 60%, rgba(12,14,18,0.95) 100%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,0.04) 0px, rgba(0,0,0,0.04) 1px, transparent 1px, transparent 2px),
    linear-gradient(to bottom right, rgba(255,122,26,0.10), rgba(0,0,0,0) 60%);
  background-blend-mode: overlay, overlay, overlay, normal;
  background-attachment: fixed;
  text-shadow: 0 0 0 transparent; /* neutralize accidental text glow in some environments */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-color-scheme: light) {
  :root { --text: #111; --muted: #555; }
  body { background: #f7f7f7; color: var(--text); }
}

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

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(640px, 92vw, 1120px);
  margin: 0 auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Section: Header */
header {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: rgba(12,14,20,0.65);
  border: 1px solid rgba(255,255,255,0.28);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  text-align: center;
}

header h1 {
  font-size: clamp(1.8rem, 2.6vw + 1rem, 3.4rem);
  line-height: 1.15;
  margin: 0 0 0.25rem;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 12px rgba(255, 122, 26, 0.25);
}

header .meta {
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  color: var(--muted);
  margin: 0 0 0.75rem;
}

header nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  display: inline-block;
}
header nav a:hover,
header nav a:focus-visible {
  text-decoration: underline;
  outline: none;
}
header nav a:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

/* Section: Main content */
main {
  padding: 1rem 0 2rem;
}

article {
  padding: 0.75rem;
}

.featured-image {
  margin: 0.75rem 0 1rem;
}

.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 6px 20px rgba(0,0,0,0.42);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.25s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Typography scale */
h2 { font-size: clamp(1.5rem, 1.8vw + 1rem, 2.25rem); margin: 0.75rem 0; color: #f5faff; }
p { font-size: clamp(1rem, 0.9vw + 0.8rem, 1.125rem); color: #eaf2f6; margin: 0.75rem 0; }
blockquote {
  margin: 0.75rem 0;
  padding: 0.5rem 1rem;
  border-left: 4px solid var(--accent);
  color: #f7f7f7;
  background: rgba(0,0,0,0.15);
  border-radius: 6px;
}
ul { padding-left: 1.25rem; margin: 0.75rem 0; }
li { margin: 0.25rem 0; }

/* Section: Content helper closet */
.content {
  padding: 0.25rem;
  color: var(--text);
}
.tag {
  display: inline-block;
  padding: 0.15em 0.5em;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(255,122,26,0.22);
  color: #ffd8b3;
  border: 1px solid rgba(255,122,26,0.40);
  margin-right: 0.25em;
}

/* Section: Product Ad (Footer) */
footer {
  padding: 1rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 1rem;
  text-align: center;
}
.product-ad, .sponsored-page {
  display: inline-block;
  padding: 0.75rem 1rem;
  margin: 0.25rem;
  border-radius: 10px;
  background: rgba(10,10,12,0.55);
  border: 1px solid rgba(255,255,255,0.28);
  color: var(--text);
  text-decoration: none;
}
.product-ad:hover, .sponsored-page:hover {
  background: rgba(10,10,12,0.75);
}
.product-ad a, .sponsored-page a {
  color: #e9f0f5;
  text-decoration: none;
}
.product-ad p, .sponsored-page p { margin: 0; }

/* Section: Interactive controls */
a, button, .btn, .cta {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.25;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
button, .btn, a.cta {
  display: inline-block;
  padding: 0.62em 1.02em;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn {
  border: 1px solid rgba(255,255,255,0.28);
  background: linear-gradient(#ff7a1a, #e06a0a);
  color: #08130a;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}
.btn.secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border-color: rgba(255,255,255,0.28);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, a:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
a.cta {
  padding: 0.6em 0.95em;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
a.cta:hover { text-decoration: underline; }

/* Section: Lists & utilities */
ul, li {
  text-shadow: none;
}
li strong { color: #fff; }

/* Section: Aside (styles for potential side content) */
aside {
  padding: 0.5rem;
  margin: 0.5rem 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 8px;
}

/* Section: Print (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, nav, footer { background: transparent; border: none; }
  a { text-decoration: underline; }
}
