/* Tokens */
:root {
  --bg: #f1e6d0;
  --bg-2: #e8dcc8;
  --surface: rgba(255, 255, 255, 0.10);
  --surface-2: rgba(255, 255, 255, 0.16);
  --text: #0b0b0b;
  --muted: #5b5b5b;
  --accent: #a6b8c2;
  --accent-2: #e6f2f7;
  --border: rgba(255, 255, 255, 0.38);
  --shadow: 0 8px 26px rgba(0,0,0,.18);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 2px solid #fff;
  --gap: 1rem;
}

/* Base / Layout */
/* Section: Global reset and layout helpers */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: light; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  color: var(--text);
  /* Layered background: gradient + scanlines + subtle noise look */
  background-color: var(--bg);
  background-image:
    radial-gradient( circle at 60% -10%, rgba(255,255,255,.28) 0%, transparent 40% ),
    linear-gradient(135deg, rgba(246,236,210,.40) 0%, rgba(232,223,199,.40) 40%, rgba(210,199,176,.40) 100% ),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.08), transparent 20%);
  background-blend-mode: overlay;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html, body { height: 100%; }

/* Helpers */
.container { max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; gap: var(--gap); }
.card { background: rgba(255,255,255,.12); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* Section headers (for readability in large docs) */
.header, main, footer, aside { display: block; }

/* Header */
header {
  padding: 1.25rem;
  text-align: center;
  margin: 1rem auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 22px rgba(0,0,0,.12);
}
header h1 {
  margin: 0.25rem 0 0.5rem;
  font-size: clamp(1.6rem, 3vw + 1rem, 2.6rem);
  line-height: 1.14;
  letter-spacing: .2px;
}
header .meta {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}
nav {
  margin-top: .75rem;
}
nav a {
  color: var(--accent);
  text-decoration: none;
  padding: .4rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.14);
}
nav a:hover, nav a:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, rgba(160,190,210,.9), rgba(140,170,190,.9));
  text-decoration: underline;
}
@media (prefers-reduced-motion: reduce) {
  nav a { transition: none; }
}

/* Main content */
main {
  padding: 1rem 0 2rem;
}
article {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}
.featured-image {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 8px 22px rgba(0,0,0,.15);
}
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 6px 18px rgba(0,0,0,.14), inset 0 0 0 1px rgba(255,255,255,.2);
  background: #000;
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
h1 + p {
  margin-top: .25rem;
}
p { margin: 0.5rem 0; color: var(--text); }
ul, ol { margin: .5rem 0 1rem 1.25rem; }

/* Content helpers */
.content { padding: 0 0.25rem; }
.tag { display: inline-block; padding: .25rem .5rem; border-radius: 999px; font-size: .75rem; color: #0c1a1f; background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.9); }

/* Footer / product ads */
footer {
  padding: 1rem;
  margin: 2rem auto 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
footer .product-ad,
footer .sponsored-page {
  display: inline-block;
  width: calc(50% - 0.5rem);
  margin: 0.25rem;
  vertical-align: top;
}
footer p { text-align: center; margin: .5rem 0 0; color: var(--muted); }
footer a { text-decoration: none; color: inherit; display: block; padding: .75rem; border-radius: 12px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); }
footer a:hover, footer a:focus-visible { background: rgba(255,255,255,.22); text-decoration: underline; outline: none; }

/* Utility elements */
a, button, .btn, .cta {
  -webkit-tap-highlight-color: transparent;
}
.btn {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.18);
  color: #0b1a24;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, rgba(122, 186, 210, .95), rgba(140, 170, 190, .95));
  color: #04121b;
  border-color: rgba(255,255,255,.75);
}
.btn.ghost {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.4);
  color: var(--text);
}
a:focus-visible, button:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
a:hover { text-decoration: underline; }

/* Glass panel fallback (no backdrop-filter) */
@supports not (backdrop-filter: blur(8px)) {
  .card, header, footer { background: rgba(255,255,255,.24); }
  .image-frame { border-color: rgba(255,255,255,.8); }
}

/* Accessibility / contrast tweaks for glass overlays on text */
@media (prefers-color-scheme: light) {
  :root { color-scheme: light; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --bg-2: #141414;
    --surface: rgba(255,255,255,.08);
    --surface-2: rgba(255,255,255,.14);
    --text: #f3f5f7;
    --muted: #a5a5a5;
  }
  body { background: #0b0b0b; }
  header, footer { background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.25); }
  a { color: #9bd0ff; }
}

/* Print styles */
@media print {
  body { background: #fff; color: #000; }
  header, footer { background: #fff; border: 1px solid #ddd; }
  a { text-decoration: underline; color: #000; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}