/* Theme: cobalt + burgundy with glass panels and subtle scanlines */

:root {
  --bg: #0a1f3a;
  --bg-2: #081423;
  --text: #e8f0ff;
  --muted: #b8c6e6;
  --accent: #7a001f;        /* burgundy primary */
  --accent-2: #b3002b;      /* brighter burgundy for hover */
  --card: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.25);
  --ring: rgba(255,255,255,.95);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --shadow-soft: 0 4px 14px rgba(0,0,0,.18);
  --radius: 12px;
  --focus: 0 0 0 3px rgba(122,0,31,.6);
  --bg-noise: rgba(0,0,0,.04);
  --link: #dbe8ff;
  --link-hover: #ffffff;
  --panel-glow: 0 6px 18px rgba(0,0,0,.28);
}

/* Section: Base + layout helpers */
* { box-sizing: border-box; }
html, body { height: 100%; }
html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(14,58,138,.35) 0%, rgba(10,20,40,.65) 60%, rgba(4,8,20,.75) 100%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, rgba(0,0,0,0) 1px 2px);
  background-blend-mode: overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: 
    linear-gradient(135deg, rgba(26,57,138,.65), rgba(8,16,42,.85)),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay;
  color: var(--text);
}
img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: clamp(720px, 85vw, 1200px);
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

/* Section: Glass panels style (fallback included) */
.panel {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  /* Fallback for no backdrop-filter: increase opacity slightly */
  background-clip: padding-box;
}
.no-backdrop .panel {
  background: rgba(255,255,255,.12);
}
@supports not ((-webkit-backdrop-filter: blur(12px)) or (backdrop-filter: blur(12px))) {
  .panel { background: rgba(255,255,255,.16); }
}

/* Section: Typography scale (responsive) */
h1, h2, h3, h4 { margin: .3rem 0 .5rem; font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(1.75rem, 2.6vw + 1rem, 3.5rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 1.6vw + .8rem, 2.25rem); }
h3 { font-size: clamp(1.0rem, 1.2vw + .6rem, 1.5rem); color: #e7e7ff; }
p { margin: .4rem 0 1rem; color: rgba(232,240,255,.92); }
em { color: #fff; font-style: italic; }

/* Section: Layout primitives for content areas */
.header, header { text-align: center; padding: 2rem 1rem 1rem; }
header nav { margin-top: .75rem; display: inline-flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
header nav a { color: var(--text); text-decoration: none; padding: .25rem .6rem; border-radius: 6px; border: 1px solid var(--border); }
header nav a:hover { text-decoration: underline; }
header h1 { margin-bottom: .25rem; }

main { padding: 0 1rem 2rem; }

/* Section: Image framing (matches requirement for .image-frame) */
.image-frame, .image-frame img {
  border-radius: 12px;
}
.image-frame {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Featured image wrapper in this page */
.featured-image {
  margin: 1rem auto;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  max-width: 100%;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.featured-image img { width: 100%; height: auto; display: block; }

/* Section: Content area with utility classes */
.content { padding: 0; color: var(--text); }
ul { padding-left: 1.25rem; margin: .25rem 0; }
li { margin: .15rem 0; }

/* Utility: grid and cards for responsive layouts */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  border-radius: var(--radius);
  padding: .75rem;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow-soft);
}
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
}

/* Section: Links and buttons (interactive states) */
a, button, .btn, .cta {
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--text); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; }
a:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; border-radius: 4px; }

/* Buttons: solid and outline variants */
.btn {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.4);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid rgba(255,255,255,.9); outline-offset: 2px; }

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

/* Small CTA links that resemble buttons */
.cta {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.4);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.cta:hover { background: var(--accent-2); text-decoration: none; }

/* Section: Footer / product ads (glass panels) */
footer {
  padding: 1.5rem;
  text-align: center;
}
.product-ad, .sponsored-page {
  display: block;
  margin: .5rem auto;
  padding: .75rem;
}
footer .product-ad, footer .sponsored-page { 
  width: min(90%, 520px);
}
footer a { color: var(--text); text-decoration: none; display: inline-block; padding: .75rem 1rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); }
footer a:hover { text-decoration: underline; }

/* Section: Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
  .panel { background: #fff; border: 1px solid #000; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}
@media (min-width: 0) {
  /* ensure logical properties where possible (examples) */
  header { padding-inline: 1rem; }
  .container { padding-inline: 0; }
}