/* Core / Theme Tokens */
:root {
  --bg: #0b0f14;
  --bg-2: #141923;
  --surface: rgba(246, 238, 178, 0.08); /* pastel yellow glass */
  --surface-2: rgba(255, 255, 255, 0.08);
  --text: #eaf2f7;
  --muted: #b7c6d6;
  --accent: #f8e87b;       /* pastel yellow */
  --accent-2: #cbd5e1;      /* chrome-like */
  --card: rgba(255,255,255,0.08);
  --card-border: rgba(255,255,255,0.25);
  --shadow: 0 6px 20px rgba(0,0,0,0.35);
  --focus: 2px solid #ffd966;
  --radius: 14px;
  --maxw: clamp(860px, 92vw, 1100px);
  --gap: 1.25rem;
}
/* Section: Reset & globals */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Inter, system-ui, Arial, "Noto Sans", sans-serif;
  line-height: 1.55;
  background: 
    linear-gradient(135deg, rgba(245, 236, 178, 0.08) 0%, rgba(178, 186, 199, 0.04) 50%, rgba(245,236,178,0.08) 100%),
    repeating-linear-gradient(45deg, rgba(120,115,0,0.08) 0 8px, rgba(0,0,0,0) 8px 16px),
    #0b0f14;
  background-attachment: fixed;
  min-block-size: 100%;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f5e0;
    --bg-2: #ecebd0;
    --text: #0b0b0b;
    --muted: #555d66;
    --surface: rgba(255,255,255,0.9);
    --surface-2: rgba(255,255,255,0.8);
    --card: rgba(255,255,255,0.92);
    --card-border: rgba(0,0,0,0.08);
  }
  body {
    background: linear-gradient(135deg, #f7f5e6 0%, #ecebd0 40%, #f7f5e6 100%), #f5f2d9;
    color: var(--text);
  }
}

/* Section: Layout primitives */
.container, .grid, .card {
  width: 100%;
}
.container {
  max-width: var(--maxw);
  padding: 0 1rem;
  margin: 0 auto;
}
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: saturate(1.05) blur(8px);
  -webkit-backdrop-filter: saturate(1.05) blur(8px);
  transition: transform 180ms ease, background 180ms ease;
}
@supports not (backdrop-filter: blur(8px)) {
  .card { background: rgba(18,18,22,0.75); }
}
a, button { cursor: pointer; }

/* Section: Typography (responsive) */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: 0.2px;
}
h1 {
  font-size: clamp(2rem, 1.8rem + 4vw, 4rem);
  line-height: 1.05;
  margin: 0 0 0.35rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
h2 {
  font-size: clamp(1.25rem, 0.8rem + 2vw, 2rem);
  margin: 0.5rem 0 0.25rem;
}
h3 {
  font-size: clamp(1rem, 0.6rem + 1.5vw, 1.25rem);
  margin: 0.75rem 0 0.25rem;
}
p { margin: 0 0 1rem; color: var(--muted); }
blockquote {
  margin: 0.75rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text);
  font-style: italic;
  opacity: 0.95;
}

/* Section: Header / Meta visuals (glass) */
header {
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
header h1 {
  color: var(--text);
  text-shadow: 0 0 18px rgba(248, 232, 120, 0.6);
}
header .meta {
  margin-top: 0.25rem;
  font-size: clamp(0.9rem, 0.8vw + 0.8rem, 1rem);
  color: var(--muted);
}
.image-frame, .featured-image {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 6px 22px rgba(0,0,0,0.35);
  background: rgba(0,0,0,0.15);
}
.image-frame {
  aspect-ratio: 16 / 9;
}
.image-frame img, .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  filter: saturate(1.05);
  transition: transform 400ms ease;
}
.image-frame:hover img, .featured-image:hover img {
  transform: scale(1.03);
}

/* Section: Glass panels (content blocks) */
.backdrop {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: calc(var(--radius) - 2px);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}
@supports not (backdrop-filter: blur(12px)) {
  .backdrop { background: rgba(18,18,22,0.75); }
}
.content { padding: 0; }

/* Section: Links, buttons, CTAs */
a, button, .btn, .cta { color: var(--accent); text-decoration: none; border-radius: 8px; transition: transform 180ms ease, background 180ms ease, color 180ms ease; }
a:hover, a:focus { text-decoration: underline; outline: none; }
button, .btn, .cta {
  background: linear-gradient(to bottom right, rgba(248,232,120,0.95), rgba(240,210,70,0.85));
  border: 1px solid rgba(255,255,255,0.7);
  color: #0b0b0b;
}
button:hover, .btn:hover, .cta:hover {
  transform: translateY(-1px);
}
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
.btn, .cta {
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  display: inline-block;
  line-height: 1;
}
.btn.alt, .cta.alt {
  background: rgba(255,255,255,0.0);
  color: var(--accent);
  border: 1px solid var(--accent);
}
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Section: Lists */
ul { margin: 0 0 1rem 1.25rem; padding: 0; list-style: disc; }
li { margin: 0.25rem 0; }

/* Section: Utility helpers */
.container { padding-inline: 1rem; }
.grid { gap: 1rem; }

/* Section: Sections alignment for main content & articles */
main { padding: 2rem 0; }
article { max-width: var(--maxw); margin: 0 auto; padding: 0 1rem; }

/* Section: Product ad / footer blocks */
.product-ad, .sponsored-page {
  display: block;
  margin: 0.5rem 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  text-align: left;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.28);
  color: var(--text);
  text-decoration: none;
  transition: transform 180ms ease;
}
.product-ad:hover, .sponsored-page:hover { transform: translateY(-1px); text-decoration: none; }
.product-ad p, .sponsored-page p { margin: 0; }

/* Section: Header/Nav styling hooks (even if not in HTML) */
nav { display: flex; gap: 1rem; align-items: center; justify-content: center; padding: 0.5rem 1rem; }
nav a { padding: 0.25rem 0.5rem; color: var(--accent); }
aside { padding: 1rem; }

/* Section: Focus visibility and accessibility helpers */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Section: Print styles (basic readability) */
@media print {
  body { background: white; color: black; }
  .backdrop { background: none; border: none; box-shadow: none; }
  a, button { text-decoration: underline; color: black; }
}
 
/* Section: Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Section: Structural element defaults (ensuring selectors exist) */
html, body, header, nav, main, article, footer, aside { scroll-behavior: smooth; }

/* Minor resets for typography density on small devices */
@media (max-width: 520px) {
  header { padding: 1.25rem 1rem; }
  h1 { font-size: clamp(1.75rem, 4.6vw, 3rem); }
  .image-frame, .featured-image { border-radius: 12px; }
}