/* Base tokens */
:root {
  --bg: #041f1e;
  --bg-2: #0b2b2a;
  --text: #e7fffb;
  --muted: #a8d6cf;
  --accent: #2bd6c6;       /* teal */
  --accent-2: #b7693a;     /* copper */
  --card: rgba(9, 18, 20, 0.42);
  --card-border: rgba(255,255,255,0.28);
  --shadow: 0 6px 20px rgba(0,0,0,.28);
  --radius: 14px;
}

/* Global resets & layout helpers */
* { box-sizing: border-box; }
html, body { height: auto; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  background: linear-gradient(135deg, rgba(4,25,25,0.96) 0%, rgba(6,25,25,0.96) 60%),
              radial-gradient(circle at 20% 0%, rgba(0,255,255,0.08), transparent 40%),
              radial-gradient(circle at 80% 20%, rgba(183,105,58,0.08), transparent 40%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  isolation: isolate;
  padding: 0;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(to bottom, rgba(0,0,0,0.04) 0 2px, transparent 2px 4px);
  mix-blend-mode: overlay;
  opacity: 0.25;
}
*, *::before, *::after { box-sizing: border-box; }

/* Glass panels (fallback + backdrop-filter) */
header, main, article, aside, footer {
  background: rgba(9, 18, 20, 0.28);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem auto;
  max-width: calc(100% - 2rem);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, article, aside, footer {
    background: rgba(9, 18, 20, 0.6);
    border-color: rgba(255,255,255,0.4);
  }
}

/* Layout utilities */
.container {
  width: 100%;
  max-width: clamp(680px, 92vw, 1100px);
  padding-inline: 1rem;
  margin-inline: auto;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  border-radius: 999px;
  font-size: .75rem;
  color: #002b2b;
  background: rgba(43,214,198,0.15);
  border: 1px solid rgba(43,214,198,0.45);
}

/* Image frame styling */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  background: #111;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
}

/* Image/content helpers */
.content { font-size: clamp(0.95rem, 1.2vw, 1rem); color: var(--muted); }

/* Typography scale (fluid) */
h1 { font-size: clamp(2rem, 4vw + 1rem, 4rem); line-height: 1.05; margin: 0.25rem 0 0.5rem; letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 2vw + .5rem, 2rem); margin: .6rem 0; }
p { margin: 0.75rem 0; color: var(--muted); }
ul { margin: .5rem 0 1rem 1.2rem; padding: 0; color: var(--muted); }
li { margin: .25rem 0; }

/* Link & button styling (accessible, high-contrast) */
a { color: var(--accent); text-decoration: none; }
a:focus-visible, a:hover { text-decoration: underline; outline: none; }
button, .btn, .cta {
  font-family: inherit;
  font-size: clamp(0.95rem, 1.2vw, 1rem);
  padding: .75em 1.2em;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); }
button:active, .btn:active, .cta:active { transform: translateY(0); }
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  border-radius: 8px;
}
.btn { background: rgba(255,255,255,0.08); }
.btn--primary {
  background: linear-gradient(135deg, rgba(183,115,54,1) 0%, rgba(168,84,34,1) 100%);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
}
.btn--outline {
  background: transparent;
  border: 1px solid rgba(183,115,54,0.9);
  color: var(--text);
}
.cta { padding: .75em 1.1em; }

/* Specific section styling to emphasize hero/content flow */
header {
  display: block;
  padding: 1rem 0;
  text-align: center;
}
header h1 { color: #eaffff; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
header .meta {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem;
  margin-top: .25rem;
}

/* Footer / product ads layout */
footer { padding: 1.25rem 0; }
.product-ad, .sponsored-page {
  display: block;
  padding: .75rem;
  text-align: center;
}
.product-ad a, .sponsored-page a { text-decoration: none; color: var(--text); display: block; }

/* Print accessibility */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
  header, main, footer { box-shadow: none; border: none; background: transparent; }
  .image-frame { display: none; }
}

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