/* Section: Base & Theme Tokens */
:root {
  /* Palette derived from white/green, tuned for high contrast on glass panels */
  --bg: #0a0f12;
  --bg-2: #11161b;
  --text: #eafff5;
  --muted: #9ff1b9;
  --accent: #2af58a;
  --accent-2: #00ff88;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.22);
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --focus: 2px solid #fff;
  --focus-offset: 6px;
}

:root, html, body {
  height: 100%;
}

/* Section: Reset & Global Layout (Mobile-First) */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html, body {
  color-scheme: dark;
  background: 
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.10) 0 25%, rgba(255,255,255,0) 25%),
    linear-gradient(135deg, #0a0f12 0%, #0b1117 60%, #0a0f12 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  font-size: clamp(14px, 2.8vw, 16px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-attachment: fixed;
}

/* Section: Layout Utilities */
.container {
  width: 100%;
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.content { padding: 1rem 0; color: var(--text); }

/* Section: Core Page Structure */
html { scroll-behavior: smooth; }
body { display: flex; min-height: 100vh; flex-direction: column; }

/* Section: Typographic Hygiene */
h1, h2, h3 { margin: .25rem 0; font-weight: 700; line-height: 1.15; }
p { margin: .5rem 0; }

/* Section: Core Elements Styling */
header, nav, main, article, aside, footer {
  display: block;
}
header {
  padding: clamp(1rem, 4vw, 2rem);
  text-align: center;
}
header h1 {
  font-size: clamp(1.4rem, 6vw, 2.4rem);
  line-height: 1.15;
  margin: 0;
  letter-spacing: .2px;
  color: var(--text);
}
main { padding: 1rem 0; }
article { display: block; padding: 0; }
footer { padding: 1rem 0; color: var(--muted); }

/* Section: Image Frame */
.image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,255,136,0.25);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  /* subtle color punch without heavy filters */
  filter: saturate(1.05) contrast(1.02);
}

/* Section: Glass Panels (Fallback aware) */
.none-backdrop {
  background: rgba(0,0,0,0);
}
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.no-backdrop {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  /* no backdrop-filter as fallback */
}
.product-ad {
  display: block;
  padding: .75rem 1rem;
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(0,255,136,0.25);
  text-align: left;
  transition: transform .2s ease;
}
.product-ad a { color: var(--accent); text-decoration: none; font-weight: 600; display: block; }
.product-ad:hover { transform: translateY(-1px); }

/* Section: Interactive Elements (Links, Buttons) */
a, button, .btn, .cta {
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: .65em 1.1em;
  display: inline-block;
  font-weight: 600;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
a:hover, a:focus-visible, .btn:hover, .cta:hover {
  text-decoration: underline;
}
button, .btn {
  background: var(--accent);
  color: #041b0a;
}
button.outline, .btn.outline, .cta.outline {
  background: transparent;
  border: 1px solid rgba(44,255,180,.6);
  color: var(--text);
}
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
  box-shadow: 0 0 0 4px rgba(0,0,0,.4);
}
:focus-visible { outline: none; }

/* Section: Other Elements (Lists & Tags) */
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Section: Utilities & Helpers */
.tag {
  display: inline-block;
  padding: .25em .6em;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(42,245,138,0.18);
  color: var(--text);
  border: 1px solid rgba(42,245,138,0.4);
}
.content + .tag { margin-left: .5rem; }

/* Section: Forms (present/anticipated) */
input, textarea {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 8px;
  padding: .5rem;
  outline: none;
}
input:focus-visible, textarea:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}

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

/* Section: Color Scheme - Light Mode Overrides */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7fbf7;
    --bg-2: #eef6ee;
    --text: #0a2e0a;
    --muted: #4b7b4b;
    --accent: #0a6;
    --accent-2: #0a8a4a;
    --glass: rgba(255,255,255,0.85);
    --glass-border: rgba(0,0,0,0.15);
  }
  body {
    background: linear-gradient(#fff, #f8fff8);
    color: var(--text);
  }
  .card, .image-frame { background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.15); backdrop-filter: none; }
  .image-frame { border-color: rgba(0,0,0,0.15); }
}
  
/* Section: Print Styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: none; }
  .image-frame { page-break-inside: avoid; }
}
