:root {
  --bg: #f7f4e6;
  --bg-2: #fffbe9;
  --text: #0e1116;
  --muted: #5a5a3a;
  --accent: #f5e77a;
  --accent-2: #ffd84a;
  --glass: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.40);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Helvetica Neue", sans-serif;
  line-height: 1.5;
  background: 
    linear-gradient(135deg, rgba(255, 235, 170, 0.25) 0%, rgba(255, 235, 170, 0.15) 60%, rgba(255, 235, 170, 0.25) 100%),
    linear-gradient(#f7f3d9, #f9f6e0 40%, #f6f0cb 100%);
  position: relative;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Establish stacking order for the CSS noise overlay */
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  /* Subtle noise/scanline texture using pure CSS layers */
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.04) 0 1px, transparent 1px 100%),
    linear-gradient(to right, rgba(0,0,0,0.02) 0 1px, transparent 1px 100%);
  background-size: 100% 2px, 2px 100%;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
}

body, header, main, article, footer, aside {
  position: relative;
  z-index: 1;
}

/* Layout helpers */
.container {
  width: 100%;
  padding-inline: 1rem;
  max-width: clamp(720px, 88vw, 1100px);
  margin-inline: auto;
}

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

.card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Header (hero area) */
header {
  padding: 2rem 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 0 0 16px 16px;
  margin: 0 0 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
header h1 {
  margin: 0 0 .25rem;
  font-size: clamp(1.8rem, 1.6rem + 2vw, 3rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--text);
}
header .meta {
  font-size: clamp(.92rem, .4vw + .75rem, 1rem);
  color: var(--muted);
}

/* Main content area */
main {
  padding: 1rem;
}
article {
  width: 100%;
  max-width: clamp(680px, 90vw, 1100px);
  margin: 0 auto;
  padding: 1.75rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 14px 40px rgba(0,0,0,.08);
}
@supports not (backdrop-filter: blur(12px)) {
  article {
    background: rgba(255,255,255,.95);
  }
}
h2 {
  font-size: clamp(1.6rem, 1vw + 1.2rem, 2.4rem);
  margin: 0.25rem 0 0.75rem;
  color: var(--text);
}
h3 {
  font-size: clamp(1.05rem, 0.8vw + 0.9rem, 1.25rem);
  margin: 0.75rem 0 0.5rem;
}
p {
  font-size: clamp(0.95rem, 0.4vw + 0.9rem, 1.05rem);
  color: var(--text);
  margin: 0.75rem 0;
}
em { font-style: italic; }
strong { font-weight: 700; }

/* Featured image area */
.featured-image {
  margin: 1rem 0 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
}
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lists and misc content */
ul, ol { padding-left: 1.25rem; margin: .5rem 0 1rem; }
li { margin: .25rem 0; }

/* About links and actions (buttons, CTAs) */
a, button, .btn, .cta {
  transition: transform .15s ease, background-color .2s ease, color .2s ease;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; color: var(--accent-2); }
button, .btn, .cta {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.92);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}
button:focus-visible, .btn:focus-visible, .cta:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 8px;
}
a.btn, a.cta {
  display: inline-block;
  padding: .6rem .95rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.15);
  background: rgba(255,255,255,.95);
  color: var(--text);
}
a.btn:hover, a.btn:focus-visible, a.cta:hover, a.cta:focus-visible {
  background: #fff;
  text-decoration: underline;
}
.product-ad {
  display: block;
  padding: .85rem;
  border-radius: 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  margin: 0 0 1rem;
}
.product-ad h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.product-ad p { margin: 0; }

/* Footer */
footer {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
  background: rgba(255,255,255,.12);
  border-top: 1px solid rgba(255,255,255,.35);
}
footer p { margin: .25rem 0; }

/* Aside (styling placeholder for potential split layout) */
aside {
  padding: 0.5rem;
  border-radius: 12px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.28);
}

/* Typography scale helpers (mobile-first defaults) */
h1, h2, h3 { line-height: 1.15; }
p, li { letter-spacing: .01em; }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
}
