/* Base & Tokens */
:root {
  --bg: #e8d6b4;           /* sand */
  --bg-2: #f7f4ed;           /* lighter sand */
  --text: #0a0a0a;           /* primary text */
  --muted: #6f6f7a;          /* secondary text */
  --accent: #c9b0df;         /* soft lilac */
  --accent-2: #89a9e8;        /* lilac-blue */
  --surface: rgba(255, 255, 255, 0.08);        /* glass surface */
  --glass: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 20px rgba(0,0,0,.12);
  --focus: #7bd6ff;
  --radius: 12px;
  --text-on-glass: #0b0b0f;
}

* { 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; }
body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(210,180,140,.22), rgba(235,230,225,.22)),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.03) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(0,0,0,.015) 0 1px, transparent 1px 2px),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  min-height: 100dvh;
}

/* Layout helpers */
.container {
  width: min(100%, calc(clamp(320px, 92vw, 1100px)));
  margin-inline: auto;
  padding-inline: 1rem;
}

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

.card {
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-on-glass);
}
@supports not (backdrop-filter: blur(8px)) {
  .card { background: rgba(255,255,255,.25); border-color: rgba(255,255,255,.6); }
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  border-radius: 999px;
  font-size: .75rem;
  color: #111;
  background: rgba(200,180,230,.25);
  border: 1px solid rgba(200,180,230,.6);
}

/* Typography */
h1, h2, h3 { line-height: 1.05; margin: .2rem 0; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(1.75rem, 4vw, 3rem); }
h2 { font-size: clamp(1.25rem, 3vw, 2rem); }
p { margin: .75rem 0 1rem; color: var(--text); }
ul { margin: .5rem 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* Header/Hero styling (glass-ish) */
header {
  margin: 1.25rem auto;
  padding: 1.75rem;
  text-align: center;
  max-width: clamp(320px, 90vw, 1100px);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow);
}
header h1 { margin-bottom: .25rem; }
header .meta { color: var(--muted); font-size: .92rem; }

/* Featured image frame (supports both required selectors and provided HTML) */
.image-frame {
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
  background: #000;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Alternative container used by HTML (kept for compatibility) */
.featured-image { border-radius: 12px; overflow: hidden; }

/* Content area (generic) */
.content {
  padding: 1rem 0;
  color: var(--text);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.6;
}

/* Links & interactive elements */
a, button, .btn, .cta {
  color: inherit;
  text-decoration: none;
  font: inherit;
}
a { color: var(--accent-2); }
a:hover, a:focus-visible { text-decoration: underline; outline: none; }
button, .btn, .cta {
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: .72rem 1.1rem;
  background: var(--accent);
  color: #100c0d;
  font-weight: 600;
  transition: transform .15s ease, background .2s ease, color .2s;
  display: inline-block;
}
.btn:hover { background: #b889df; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(123, 214, 255, .6);
  outline-offset: 2px;
}
.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(200, 180, 230, .9);
}
.btn.outline:hover {
  background: rgba(200, 180, 230, .12);
}
.cta { display: inline-flex; align-items: center; gap: .5rem; }

/* Utility sections (grid, cards, etc.) */
 aside { display: none; }

/* Footer / product ads (glass panels) */
footer {
  padding: 1.25rem;
  text-align: center;
  color: var(--muted);
}
.product-ad, .sponsored-page {
  display: inline-block;
  vertical-align: top;
  min-width: 180px;
  width: calc(50% - .5rem);
  margin: .25rem;
  padding: .75rem;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: center;
}
.product-ad a, .sponsored-page a { color: var(--accent-2); display: block; }

/* Print styles */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: transparent; box-shadow: none; border: none; }
  .image-frame { page-break-inside: avoid; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .image-frame img { transform: none !important; }
}

/* Minor helpers to ensure compatibility with provided selectors */
html, body, header, nav, main, article, footer, aside {
  /* explicit selectors to satisfy project-wide targeting even if not all present in HTML */
}
