/* Tokens */
:root {
  --sage-900: #0b1f1a;
  --sage-800: #1e3d32;
  --sage-700: #316a57;
  --sage-500: #79a98a;
  --sage-300: #a7d0bd;

  --rose-50: #f9f0f3;
  --rose-100: #f1d9de;
  --rose-200: #e6b8c7;
  --rose-500: #d57b82;

  --bg: linear-gradient(135deg, rgba(20,39,31,0.95) 0%, rgba(48,72,60,0.95) 60%, rgba(18,30,26,0.95) 100%), #0b1f1a;
  --bg-2: radial-gradient(circle at 15% -10%, rgba(255,255,255,.08), transparent 40%), radial-gradient(circle at 90% 10%, rgba(255,255,255,.04), transparent 30%);
  --text: #eaf6f0;
  --muted: #cbdccd;
  --accent: #8bd3a8;
  --accent-2: #e6b7c3;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.14);
  --card: rgba(12,24,20,0.6);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 10px 24px rgba(0,0,0,0.25);
  --focus: 0 0 0 3px rgba(139, 211, 168, 0.65);
  --radius: 14px;
}

/* Base & layout */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* subtle layered noise/scanlines (pure CSS) */
  background-image:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px),
    linear-gradient(135deg, rgba(255,255,255,.03), rgba(255,255,255,0) 40%);
  opacity: .25;
  mix-blend-mode: overlay;
}
main, header, footer, article { position: relative; z-index: 1; }

/* Utilities & containers */
.container { width: min(92%, 1100px); margin: 0 auto; padding: 1rem; }

/* Grid / cards */
.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);
}

/* Glass panels (fallback included) */
.content {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius);
  padding: clamp(12px, 2.4vw, 28px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 22px rgba(0,0,0,.25);
}
@supports not (backdrop-filter: blur(12px)) {
  .content { background: rgba(16, 28, 22, 0.82); }
}

/* Image frame with ratio & glow */
.image-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
  aspect-ratio: 16/9;
  background: #111;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  /* subtle inner glow on image edge */
  filter: saturate(1.02);
}

/* Sections: specific selectors required by HTML structure */
html, body, header, nav, main, article, footer, aside { /* no extra rules here - kept for semantic completeness */ }

/* Header */
header {
  padding: 1rem 0;
}
header h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.25rem, 1.4rem + 1vw, 2.25rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: .2px;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .25rem .6rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  transition: transform .2s ease, background .2s ease;
}
nav a:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
nav a:focus-visible { outline: none; box-shadow: var(--focus); }

/* Article / main content layout */
main { padding: 1rem 0 0; }
article { display: grid; gap: 1rem; }

/* Typography scale */
p, li { font-size: clamp(.95rem, .8rem + 0.6vw, 1.15rem); line-height: 1.6; color: var(--text); }
h1, h2, h3 { color: var(--text); margin: .25rem 0; }
h2 { font-size: clamp(1.1rem, 1vw + 1rem, 1.4rem); }

/* Links & buttons (high contrast focus) */
a { color: var(--text); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; text-underline-offset: 2px; }

button, .btn, .cta {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: .6rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn { background: var(--accent); color: #062514; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--outline:hover { background: rgba(255,255,255,0.08); }

/* Utility pills / tags */
.tag {
  display: inline-block;
  padding: .25rem .5rem;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(139,211,168,.15);
  color: var(--text);
  border: 1px solid rgba(139,211,168,.4);
}

/* Product ad / sponsor blocks (footer) */
.product-ad, .sponsored-page {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: inline-block; padding: .25rem .5rem; border-radius: 6px; }
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Aside (if used) */
aside { padding: 0.5rem 0; }

/* Layout responsiveness */
@media (min-width: 640px) {
  .container { padding: 1.25rem 1.25rem; }
}
@media (min-width: 900px) {
  footer { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
  article { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

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