/* Base tokens and fundamentals */
:root {
  --bg: #042018;           /* jade/chrome depth (layered) */
  --bg-2: #0a3d2e;          /* jade accent */
  --text: #eafff6;           /* high-contrast on dark glass */
  --muted: #a8d6c3;          /* soft secondary text */
  --accent: #FF6F61;         /* coral primary */
  --accent-2: #FF8A69;       /* coral hover/alt */
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  --radius: 12px;
  --focus: 3px solid #ffffff;
  --focus-offset: 2px;
  --comfort: 1.6; /* line-height target */
}

/* Reset and base typography (mobile-first) */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif; font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  line-height: var(--comfort);
  background: linear-gradient(135deg, rgba(3, 46, 31, 0.92) 0%, rgba(2, 61, 40, 0.92) 60%, rgba(2, 24, 20, 0.92) 100%);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

/* Layered background: gradient + subtle noise/scanlines (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(0,0,0,.08), rgba(0,0,0,0) 40%),
    linear-gradient(135deg, rgba(0,0,0,.05), rgba(0,0,0,0) 50%);
  mix-blend-mode: overlay;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 6px 6px, 6px 6px;
  mix-blend-mode: overlay;
  opacity: .18;
}

/* Layout scaffolding */
.container {
  width: 100%;
  max-width: clamp(680px, 82vw, 1100px);
  padding: 0 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(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
}
@supports not (backdrop-filter: blur(12px)) {
  .card { background: rgba(3, 18, 18, 0.72); }
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: .75rem;
  line-height: 1;
  border: 1px solid rgba(255,255,255,.25);
}

/* Image frame styling */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
}
.image-frame:hover img { transform: scale(1.03); }

/* Content and typography areas (core selectors) */
html, body, header, nav, main, article, footer, aside {
  /* ensure semantic blocks participate in layout */
}

header {
  padding: 1.25rem;
  position: relative;
}
header h1 {
  font-size: clamp(1.4rem, 2.2vw + 1rem, 2.75rem);
  line-height: 1.1;
  margin: 0 0 .25rem;
  letter-spacing: .2px;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.8rem, 0.9vw + 0.6rem, 1rem);
  margin: 0 0 .75rem;
}
nav {
  margin-top: .25rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .4rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.05);
}
nav a:hover, nav a:focus-visible {
  text-decoration: underline;
  outline: none;
  color: var(--accent-2);
}
main {
  padding: 1rem 0;
}
article {
  display: block;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(3, 8, 8, 0.25);
  border: 1px solid rgba(255,255,255,.25);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
}
@supports not (backdrop-filter: blur(12px)) {
  article { background: rgba(3, 8, 8, 0.75); }
}
article h2 { font-size: clamp(1.25rem, 1.8vw + .8rem, 1.9rem); margin: .75rem 0 .5rem; color: var(--text); }
article h3 { font-size: clamp(1.05rem, 1.6vw + .5rem, 1.35rem); margin: .75rem 0 .4rem; }
article p { color: #eafaf0; margin: .5rem 0 1rem; }
blockquote {
  border-left: 3px solid var(--accent);
  padding-left: .75rem;
  margin: .75rem 0;
  color: #eafff6;
  font-style: italic;
  opacity: .95;
}
ol, ul {
  padding-left: 1.25rem;
  margin: .5rem 0 1rem;
}
li { margin: .25rem 0; }

/* Content area helper (for potential internal sections) */
.content {
  color: var(--text);
  font-size: clamp(0.95rem, 1.2vw + 0.4rem, 1.05rem);
  line-height: 1.6;
}

/* Product ad / footer style blocks (glass panels) */
.product-ad, .sponsored-page {
  display: block;
  margin: .25rem 0;
  padding: .6rem 0;
}
.product-ad a, .sponsored-page a {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding: .5rem 0;
  border-bottom: 1px solid rgba(255,255,255,.2);
}
footer {
  padding: 1rem;
}
footer p {
  margin: .5rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}

/* Link and button treatments (including focus states) */
a, button, .btn, .cta {
  text-decoration: none;
  color: var(--text);
  border: 0;
  background: transparent;
  cursor: pointer;
}
a:hover, a:focus-visible {
  text-decoration: underline;
  outline: none;
  color: var(--accent-2);
}
.btn, .cta {
  display: inline-block;
  padding: .55em 1em;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.25);
  background: var(--accent);
  color: #111;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover, .cta:hover {
  transform: translateY(-1px);
  background: var(--accent-2);
}
.btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
  border-color: rgba(255,255,255,.9);
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.5);
}
.btn.secondary:hover {
  background: rgba(255,255,255,.08);
}
.cta {
  background: var(--accent);
}
.cta.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.5);
}

/* Image and content alignment helpers (if used) */
.content {
  display: block;
  margin: 0 auto;
  max-width: 72ch;
  color: var(--text);
}
img { display: block; max-width: 100%; height: auto; }

/* Responsive utilities */
@media (min-width: 640px) {
  .container { padding: 0 1.25rem; }
}
@media (min-width: 960px) {
  html { font-size: 17px; }
  article { padding: 1.25rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

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