/* Section: Global tokens */
:root {
  --bg: #0b1b14;
  --bg-2: #1a3f2e;
  --text: #eaf7ef;
  --muted: #b7ccb7;
  --accent: #d8aebf;      /* powder rose */
  --accent-2: #9fbf99;    /* sage accent */
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  --radius: 12px;
  --focus: 2px solid #fff;
}

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

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, rgba(83,101,90,0.65) 0%, rgba(28,52,40,0.65) 60%, rgba(11,17,12,0.65) 100%), #0b1b14;
  /* Layered background: soft sage dawn + subtle scanlines */
  background-attachment: fixed;
  background-blend-mode: multiply;
}
html::before,
html::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
html::before {
  /* faint dawn gradient overlay to push toward sage/powder rose hue */
  background: radial-gradient( circle at 20% 0%, rgba(208, 212, 188, 0.18) 0%, transparent 40% ),
              radial-gradient( circle at 80% 20%, rgba(184, 136, 149, 0.14) 0%, transparent 40%);
  mix-blend-mode: overlay;
}
html::after {
  /* subtle scanline/noise via CSS gradients (no images) */
  background-image:
    linear-gradient(rgba(0,0,0,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  opacity: .25;
  mix-blend-mode: overlay;
}

/* Section: Layout basics */
* { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: clamp(640px, 82vw, 1100px);
  padding-inline: 1rem;
  margin-inline: auto;
}

.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(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-2px); background: rgba(255,255,255,0.12); }

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

/* Section: Header / hero styling */
header {
  padding: clamp(1rem, 4vw, 2rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: .2px;
  text-wrap: balance;
  color: var(--text);
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  margin: 0;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08);
  transition: transform .2s ease, background .2s ease;
}
nav a:hover { background: rgba(255,255,255,.14); text-decoration: underline; }
nav a:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* Section: Image framing and media */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  background: #000;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Section: Content styling (generic content container) */
.content {
  padding: 1rem;
  line-height: 1.6;
  color: var(--text);
}
.content h2, .content h3 { color: #e9f2e9; }

/* Lists and typography */
ul, li { color: var(--text); }
ul { margin-block: 0.5rem 0.5rem; padding-left: 1.25rem; }
li { margin: 0.25rem 0; }

/* Section: Product ad / footer blocks styling */
.product-ad, .sponsored-page {
  display: block;
  padding: .6rem;
  border-radius: 10px;
  text-align: center;
  min-width: 0;
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: block; }

/* Section: Links and interactive elements */
a, button, .btn, .cta {
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}
a { transition: color .2s ease; text-decoration-thick; }
a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; }

.btn, .cta {
  display: inline-block;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.18);
  color: var(--text);
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); background: rgba(255,255,255,.28); }
.btn:focus-visible, .cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.btn.primary {
  background: linear-gradient(135deg, rgba(216,174,190,.65), rgba(216,174,190,.35));
  border-color: rgba(255,255,255,.7);
}
.btn.outline {
  background: transparent;
  border-color: rgba(216,174,190,.9);
}
.cta {
  /* secondary action variant */
  background: rgba(157, 214, 168, 0.28);
  border-color: rgba(157, 214, 168, 0.8);
}
.cta:hover { background: rgba(157, 214, 168, 0.40); }

/* Section: Utility visuals (tags) */
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  color: var(--text);
  background: rgba(216,174,190,.28);
  border: 1px solid rgba(255,255,255,.5);
  margin-right: .4rem;
}

/* Section: Footer alignment */
footer {
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: start;
  justify-items: center;
  text-align: center;
  background: rgba(0,0,0,.12);
}
footer p { margin: .5rem 0 0; }

/* Print styles: basic readability */
@media print {
  html, body {
    background: #fff !important;
    color: #000;
  }
  a { color: #000; text-decoration: underline; }
  .glass { background: #fff; border: 1px solid #ccc; }
  header, main, footer { padding: 0; }
  .container { padding: 0; }
}

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