/* Base + Theme */

:root {
  --bg: #0b0b12;
  --bg-2: #14131a;
  --text: #f7f7fb;
  --muted: #cbd5e1;
  --rose-1: #e9c6ba;
  --rose-2: #d89a72;
  --white: #ffffff;

  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  --radius: 14px;

  --focus: 2px solid #fff;
  --focus-offset: 2px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html, body { margin: 0; padding: 0; }

/* Layered, mobile-first background (gradient + scanlines) */
html, body {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    linear-gradient(135deg, rgba(233, 167, 138, 0.28) 0%, rgba(0,0,0,0.0) 60%),
    linear-gradient(180deg, rgba(12,8,16,.95), rgba(6,4,8,.95)),
    var(--bg);
  color: var(--text);
  min-height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  background-attachment: fixed;
}

/* Layout primitives */
.container {
  width: min(1100px, 90vw);
  margin-inline: auto;
  padding-block: 1rem;
  padding-inline: 0.75rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

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

/* Header / Hero */
header {
  padding: 1.25rem 0;
  text-align: center;
}
header h1 {
  font-size: clamp(1.8rem, 4vw + 0.5rem, 3.5rem);
  line-height: 1.04;
  margin: 0.25rem 0 0.25rem;
  letter-spacing: .2px;
  color: #fff;
  text-wrap: balance;
}
header .meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

/* Article / content styles */
main { padding: 0 0 1rem; }
article {
  max-width: min(72ch, 90vw);
  margin: 0 auto;
  padding: 0.5rem;
}
.featured-image {
  margin: 0.75rem 0 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.38);
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
}
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: inset 0 0 12px rgba(255,255,255,.15);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}
article p {
  color: #f6f6fa;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.125rem);
  line-height: 1.6;
  margin: 0.9rem 0;
}
article h3 {
  font-size: clamp(1.05rem, 1.2vw + 0.9rem, 1.35rem);
  margin: 1rem 0 .5rem;
  color: #fff;
}
article ul {
  padding-left: 1.25rem;
  margin: 0.6rem 0 1rem;
}
article li { margin: 0.25rem 0; color: #f8f8ff; }

/* Blockquote styling */
blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.08);
  border-radius: 6px;
  color: #fff;
}

/* Glass panels (with fallback) */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
}
@supports not (@supports (backdrop-filter: blur(12px))) {
  .glass { background: rgba(255,255,255,.12); }
}

/* Product ad / footer glass panel */
.product-ad {
  display: block;
  text-align: center;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  margin: 1rem auto;
}
.product-ad h3 { margin: 0 0 .5rem; font-size: 1.05rem; color: #fff; }
.product-ad a {
  display: inline-block;
  color: #111;
  background: linear-gradient(135deg, #fff, #f5e5d5);
  padding: .5rem 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,.1);
  transition: transform .15s ease;
}
.product-ad a:hover { transform: translateY(-1px); }

/* Footer */
footer {
  padding: 1rem 0;
  text-align: center;
  color: var(--muted);
}
footer p { margin: .6rem 0; }

/* Utility classes (grid, container, card, tag) */
.tag {
  display: inline-block;
  font-size: .75rem;
  padding: .25rem .5rem;
  border-radius: 999px;
  color: #111;
  background: linear-gradient(135deg, rgba(255,212,170,.95), rgba(226,178,130,.95));
  border: 1px solid rgba(0,0,0,.08);
}

/* Link styles for accessibility */
a, button, .btn, .cta {
  font-family: inherit;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
a:hover, a:focus { text-decoration: underline; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  border-radius: 6px;
}
button, .btn {
  background: linear-gradient(135deg, var(--rose-2), var(--rose-1));
  color: #1a0e07;
  border: none;
  padding: .6rem 1rem;
  border-radius: 8px;
  display: inline-block;
  transition: transform .15s ease, background .2s ease;
}
button:hover, .btn:hover {
  transform: translateY(-1px);
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.4);
}
.btn.ghost { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); color: #fff; }

/* Lists and media helpers for responsive readability */
ul { padding-left: 1.25rem; }
li { margin: 0.25rem 0; }

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

/* Print styles for basic readability */
@media print {
  html, body { background: #fff; color: #000; }
  header, footer { display: none; }
  article { max-width: 100%; padding: 0; }
}
