/* Palette & Tokens */
:root{
  --bg: #0b0f14;
  --bg-2: #141b22;
  --surface: rgba(238,244,248,0.18);
  --text: #eaf2f7;
  --muted: #aab4c0;
  --accent: #9fb2bd;      /* pewter */

  --accent-2: #7e8b95;     /* pewter shade for contrasts */
  --card: rgba(22, 26, 34, 0.28);
  --border: rgba(180,190,200,0.45);
  --shadow: 0 6px 20px rgba(0,0,0,.35);

  --radius: 12px;
  --focus: 0 0 0 3px rgba(123, 174, 255, 0.6);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;

  /* Typography scale */
  --gap: 1rem;
  --space: clamp(12px, 2vw, 20px);
}

/* Reset & base */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
body {
  margin: 0;
  color: var(--text);
  background: #0b0f14;
  line-height: 1.5;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  position: relative;
  overflow-x: hidden;
  /* Layered background base gradient for chrome-pewter vibe */
  background: linear-gradient(135deg, #0b0f14 0%, #141a22 60%, #0b0f14 100%);
}
html, body { scroll-behavior: smooth; }

/* Layered background (pure CSS): gradient + subtle noise/scanline */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% -10%, rgba(150,170,190,0.18), transparent 40%),
    linear-gradient(transparent, transparent),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(0,0,0,.05) 0 2px, transparent 2px 4px);
  mix-blend-mode: overlay;
  animation: scan 60s linear infinite;
}
@keyframes scan { to { transform: translateY(-2px); } }

/* Section headers (non-intrusive) */
.header-slab, /* placeholder for potential wrappers */
.card, .container, .grid { }

/* Layout primitives */
.container {
  width: min(90%, 1100px);
  margin-inline: auto;
  padding-inline: var(--space);
}
.grid {
  display: grid;
  gap: var(--gap);
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports not (backdrop-filter: blur(10px)) {
  .card { background: rgba(22,26,34,0.54); }
}

/* Header / Main / Footer base layout */
header, main, footer, aside { padding: 0; }
header {
  display: grid;
  gap: .5rem;
  justify-items: center;
  text-align: center;
  padding: clamp(1.25rem, 4vw, 2.75rem) 0;
  margin: 1rem auto;
  max-width: 1100px;
  width: 100%;
  border-radius: var(--radius);
  background: rgba(20,26,34,0.28);
  border: 1px solid rgba(180,190,200,.40);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
header h1 {
  font-size: clamp(1.8rem, 2.5vw + 1rem, 3.6rem);
  line-height: 1.08;
  margin: 0.25rem 0;
  color: #f5fbff;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
header .meta {
  font-size: clamp(.9rem, .6vw + .5rem, 1.05rem);
  color: var(--muted);
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .35rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(180,190,200,.38);
  background: rgba(0,0,0,.15);
}
nav a:hover { text-decoration: underline; }

/* Main content area with glass panels and typographic rhythm */
main { padding: 1.75rem 0 2rem; }
article {
  max-width: 820px;
  margin: 0 auto;
  padding: 0.5rem;
}
.image-frame, .featured-image, .image-frame img {
  width: 100%;
  height: auto;
  display: block;
}
.image-frame {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(180,190,200,.6);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
}
.featured-image {
  margin: 0 0 1rem;
}
.featured-image img {
  width: 100%; height: auto; border-radius: 10px; border: 1px solid rgba(180,190,200,.5);
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}

h2, h3 {
  color: #eaf2f7;
  margin-top: 1rem;
}
p { color: #e8f0f8; margin: 0.5rem 0 1rem; }

/* Lists */
ul { padding-left: 1.25rem; margin: .25rem 0 1rem; }
li { margin: .25rem 0; }

/* Content helper (glass panel) */
.content {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(20,26,34,.28);
  border: 1px solid rgba(180,190,200,.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Product/ad section in footer */
.product-ad {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 520px);
  padding: .75rem;
  border-radius: 12px;
  background: rgba(25,30,40,.28);
  border: 1px solid rgba(180,190,200,.5);
  text-align: center;
}
.product-ad a { color: var(--text); text-decoration: none; width: 100%; display: block; }

/* Footer content */
footer {
  padding: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid rgba(180,190,200,.4);
  background: rgba(16,20,26,.28);
  display: grid;
  gap: .75rem;
  place-items: center;
}
footer p { color: var(--muted); margin: .25rem 0; }

/* Interactive controls (buttons/CTAs) */
a, button { color: inherit; text-decoration: none; font: inherit; }
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(180,190,200,.6);
  background: rgba(60, 70, 82, 0.32);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s ease, background .2s ease, border-color .2s;
  user-select: none;
}
.btn:hover, .cta:hover { transform: translateY(-1px); background: rgba(60,70,82,.42); }
.btn:focus-visible, .cta:focus-visible { outline: none; box-shadow: var(--focus); }
.btn.primary {
  background: linear-gradient(135deg, rgba(119,165,202,.95), rgba(82,125,160,.95));
  border-color: rgba(210,220,230,.95);
  color: #fff;
}
.btn.outline {
  background: rgba(0,0,0,.25);
  border-color: rgba(180,190,200,.8);
  color: #eaf2f8;
}
a.btn { text-decoration: none; }

/* Links accessibility: underline on focus/hover for visibility */
a:focus-visible, a:hover { text-decoration: underline; }

/* Utility helpers (typography spacing) */
.tag {
  display: inline-block;
  padding: .25rem .5rem;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(120,140,150,.25);
  border: 1px solid rgba(180,190,200,.4);
  color: var(--text);
}

/* Form elements (basic styling to match theme) */
input, textarea, select {
  background: rgba(20,26,34,.28);
  color: var(--text);
  border: 1px solid rgba(180,190,200,.5);
  padding: .5rem .75rem;
  border-radius: 8px;
  outline: none;
}
input::placeholder, textarea::placeholder { color: #aab6c2; }

/* Print readability */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: transparent; border: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}