/* Palette & Base */
:root{
  --bg: #040817;
  --bg-2: #0a1130;
  --text: #eaf2ff;
  --muted: #b9c8f5;
  --royal: #4169e1;
  --royal-2: #2a4fcd;
  --coral: #ff6f61;
  --coral-2: #ff8a75;

  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.15);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 8px 22px rgba(0,0,0,0.25);
  --radius: 14px;
}

/* Reset & base */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(65,105,225,0.25), rgba(0,0,0,0.25) 60%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    linear-gradient(to bottom, #050817, #0b0f24 60%, #050817);
  background-blend-mode: overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  min-height: 100dvh;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Layout primitives */
.container { width: min(92%, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

header, nav, main, article, aside, footer { display: block; }

/* Header / hero */
header {
  padding: 1.25rem 1rem;
  text-align: center;
}
h1 { 
  font-size: clamp(1.8rem, 1.2rem + 2.5vw, 3rem);
  line-height: 1.12;
  margin: 0.25rem auto 0.4rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}
header .meta { color: var(--muted); font-size: clamp(0.85rem, 0.8vw, 1rem); }

/* Main article styling */
main { padding: 0 0.5rem 1rem; }
article { max-width: 860px; margin: 0 auto; padding: 0.25rem; }

/* Image frame */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25), 0 0 24px rgba(65,105,225,0.45);
  background: rgba(0,0,0,0.25);
  margin: 0.75rem auto;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(1.05);
}
.image-frame + .content { margin-top: 0.5rem; }

/* Content area (flow) */
.content { padding: 0.75rem 0; color: #e8f0ff; }

/* Typography for sections inside article */
h2 { font-size: clamp(1.4rem, 0.8rem + 2vw, 2.4rem); margin: 0.6rem 0 0.4rem; color: #fff; }
h3 { font-size: clamp(1.05rem, 0.6rem + 1.5vw, 1.6rem); margin: 0.6rem 0 0.4rem; color: #e9f0ff; }
p { margin: 0.5rem 0 0.9rem; color: #ecf2ff; }
blockquote { margin: 0.8rem 0; padding: 0.5rem 1rem; border-left: 4px solid var(--coral); color: #eaf2ff; background: rgba(65,105,225,0.15); border-radius: 6px; }

/* Lists */
ul { padding-left: 1.25rem; margin: 0.5rem 0 0.9rem; }
li { margin: 0.25rem 0; }

/* Product ad (glass panel) */
.product-ad {
  margin: 1rem auto; padding: 1rem; border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  max-width: 680px;
  text-align: center;
  box-shadow: var(--shadow);
}
.product-ad h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.product-ad a { color: #fff; text-decoration: none; display: inline-block; padding: 0.4rem 0.75rem; border-radius: 999px; background: rgba(65,105,225,0.95); border: 1px solid rgba(255,255,255,0.8); }
.product-ad a:hover { background: rgba(65,105,225,0.88); }

/* Link & button treatments (interactive) */
a, button, .btn, .cta {
  font-family: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a { color: var(--royal); }
a:hover, a:focus { text-decoration: underline; text-decoration-color: rgba(255,255,255,0.9); }

/* Buttons (solid and outline variants) */
.btn, .cta {
  display: inline-block;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.5);
  background: var(--royal);
  color: #fff;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s;
}
.btn--outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.cta { background: var(--coral); border-color: rgba(255,255,255,0.6); }

/* Focus-visible accessibility */
:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Glass panels with backdrop (fallback) */
.card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
  backdrop-filter: blur(12px) saturate(1.05);
}
@supports not (backdrop-filter: blur(1px)) {
  .card { background: rgba(255,255,255,0.18); }
}

/* Misc helpers / utilities */
.tag {
  display: inline-block; padding: 0.15em 0.5em; border-radius: 999px;
  font-size: 0.75rem; color: #eaf2ff;
  background: rgba(65,105,225,0.15);
  border: 1px solid rgba(65,105,225,0.4);
}
.header-plain { text-align: center; }

/* Print styles */
@media print {
  body { background: white; color: black; }
  header, main, footer { display: block; }
  a { text-decoration: underline; color: black; }
}

/* Accessibility helpers for motion preferences on images/blocks */
@media (prefers-reduced-motion: reduce) {
  .image-frame, .btn, .cta { transition: none; transform: none; }
}
