/* Base */
:root {
  --bg-1:  #2b1a0b;      /* burnt orange hue anchor */
  --bg-2:  #0b1120;      /* midnight blue for depth */
  --bg-3:  #041018;      /* near-black */
  --text:  #eaf4ff;      /* high-contrast text on glass */
  --muted: #b9d0ea;      /* muted supporting text */
  --accent: #ff7a1a;      /* burnt orange (primary) */
  --accent-2:#a6e0ff;     /* pastel blue (secondary) */
  --card: rgba(255,255,255,0.12);
  --card-border: rgba(255,255,255,0.28);
  --shadow: 0 8px 24px rgba(0,0,0,.22);
  --radius: 14px;
  --focus: 0 0 0 3px rgba(0,170,255,.65);
}

html, body {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html, body, header, nav, main, article, aside, footer {
  /* structural selectors present per spec */ 
}

/* Layered, mobile-first background (gradient + subtle scanlines) */
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.5;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(255,122,26,.22) 0%, rgba(160,200,255,.08) 60%, rgba(0,0,0,.0) 100%),
    linear-gradient(#0b0f14, #0b0f14);
  background-blend-mode: overlay;
  min-height: 100dvh;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* subtle noise/scanlines for texture (no assets) */
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,.0) 0 50%, rgba(0,0,0,.08) 50% 51%, rgba(0,0,0,.0) 51% 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(255,255,255,.03) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  z-index: 0;
  opacity: .9;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(680px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid { display: grid; gap: 1rem; }
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display:inline-block;
  padding: .15em .5em;
  border-radius: 999px;
  font-size: .8rem;
  color: #081018;
  background: rgba(255,255,255,.75);
  font-weight: 600;
}
.content { padding: 1rem 0; }

/* Glass/frosted panels (with fallback) */
header, main, article, aside, footer, .image-frame, .product-ad {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, article, aside, footer, .image-frame, .product-ad {
    background: rgba(255,255,255,.14);
  }
}
* { box-sizing: border-box; }

/* Header (hero-like, with clear typographic hierarchy) */
header {
  padding: 1.25rem;
  margin: 1rem auto;
  max-width: clamp(320px, 90vw, 1100px);
  text-align: center;
}
header h1 {
  margin: 0 0 .5rem;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: .2px;
}
header .meta {
  margin: 0.25rem 0 0;
  font-size: .92rem;
  color: var(--muted);
}

/* Featured image frame (supports .featured-image in HTML) */
.image-frame, .featured-image {
  display: block;
  width: 100%;
  max-width: 860px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  margin: 0.75rem auto;
  background: #111;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: translateZ(0);
}
.image-frame:hover img { transform: scale(1.01); transition: transform .3s ease; }

/* Main content layout */
main {
  padding: 1rem;
}
article {
  max-width: 72ch;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}
h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); margin: .75rem 0 0.5rem; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); margin: .75rem 0; }
blockquote {
  margin: .5rem 0 1rem;
  padding: .75rem 1rem;
  border-left: 4px solid var(--accent-2);
  background: rgba(0,0,0,.08);
  border-radius: 6px;
}
p { margin: .75rem 0; color: #e9f2ff; }
ul { margin: .5rem 0 1rem 1.25rem; padding: 0; color: #e9f2ff; }
li { margin: .25rem 0; }

/* Product ad (footer area) */
.product-ad { padding: .75rem; display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.product-ad h3 { margin: .25rem 0; }
.product-ad a { text-decoration: none; color: inherit; }

/* Links & buttons (interactive states) */
a {
  color: var(--accent-2);
  text-decoration: none;
}
a:hover, a:focus { text-decoration: underline; outline: none; }
a:focus-visible { outline: 3px solid rgba(0,170,255,.95); outline-offset: 2px; }

/* Buttons (solid and outline variants) */
.btn {
  display:inline-block;
  padding:.75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.6);
  background: linear-gradient(135deg, rgba(255,122,26,.95), rgba(255,122,26,.75));
  color:#fff;
  font-weight:700;
  cursor: pointer;
  text-align:center;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }

.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.7);
}
.btn.outline:hover { background: rgba(255,255,255,.08); }

/* Utility classes (subset used by layout) */
.container { width: 100%; max-width: clamp(680px, 92vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; gap: 1rem; }

/* Typography refinements for readability on glass */
h1, h2, h3, p { text-shadow: 0 1px 0 rgba(0,0,0,.15); }

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

/* Print styles (basic readability) */
@media print {
  body { background: white; color: black; }
  a { text-decoration: underline; color: #000; }
  header, main, article, aside, footer { background: none; border: none; box-shadow: none; }
}
