/* Foundations */
:root{
  --bg: #0b1220;
  --bg-2: #0a1a2b;
  --text: #e9f6ff;
  --muted: #a6b8d4;
  --accent: #2dfc86;
  --accent-2: #2be6ff;
  --surface: rgba(12, 20, 40, 0.22);
  --border: rgba(255,255,255,0.32);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #050a1a 0%, #0b1a2b 40%, #0b0f1a 100%);
  min-height: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
  position: relative;
}
body::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: .5;
}
@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
  /* ok */
}
@supports not (backdrop-filter: blur(12px)) {
  /* fallback handled below by .glass with stronger opacity where needed */
}
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Layout helpers */
.container{ max-width: clamp(320px, 92vw, 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,.04); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 1rem; }

/* Glass panels (frosted glass) with fallback */
.glass{
  background: rgba(12,18,40,.22);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 14px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 22px rgba(0,0,0,.25);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass{ background: rgba(12,18,40,.40); }
}
/* Specific sections to get glass by default */
header, main, footer, nav, article, aside { background: transparent; }

/* Typography & hero */
h1{ font-size: clamp(1.6rem, 4.5vw, 3rem); line-height: 1.15; margin: .25rem 0 .75rem; color: var(--text); letter-spacing: .2px; }
h2{ font-size: clamp(1.25rem, 2.8vw, 1.6rem); margin: .9rem 0 .5rem; color: #eaffff; }
p{ color: var(--muted); margin: .5rem 0 1rem; }
blockquote{ margin: .5rem 0 1rem; padding: .5rem 1rem; border-left: 3px solid var(--accent); color: #dffaff; background: rgba(0,0,0,.15); border-radius: 6px; }

/* Images */
.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 20px rgba(0,0,0,.25); background:#000; display:block; }
.image-frame img{ width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content areas */
.content{ padding: .5rem 0; }

/* Product ad region in footer */
.product-ad{ display: block; text-align: left; padding: .75rem; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.25); }
.product-ad a{ color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .5rem; border-radius: 999px; }
.product-ad a:hover{ text-decoration: underline; }

/* Links & buttons (interactive) */
a{ color: var(--text); text-decoration: none; }
a:hover, a:focus{ text-decoration: underline; }
a:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }

/* Button variants (used by links styled as CTAs) */
.btn{ display: inline-block; padding: .65rem 1rem; border-radius: 999px; border: 1px solid rgba(127,255,205,.75); background: linear-gradient(135deg, rgba(46,255,167,.95), rgba(0,230,150,.95)); color: #041510; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover{ transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.btn:active{ transform: translateY(0); }
.btn:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
.btn--outline{ background: transparent; color: var(--text); border:1px solid rgba(70,255,200,.7); }

/* Utility chips / tags */
.tag{ display:inline-block; padding:.15em .5em; font-size:.75rem; border-radius:999px; background: rgba(63,255,190,.18); border:1px solid rgba(63,255,190,.35); color: var(--text); }

/* Layout scaffolding for header/footer sections */
header, footer{ padding: 1rem; }
nav{ display: inline-block; margin-top: .5rem; }
nav a{ font-weight:600; color: var(--text); padding: .25rem .5rem; border-radius:6px; }
nav a:hover{ background: rgba(255,255,255,.08); }

/* Responsive tweaks for smaller viewports */
@media (max-width: 720px){
  h1{ font-size: 1.75rem; }
  .grid{ grid-template-columns: 1fr; }
}

/* Print-friendly (basic readability) */
@media print{
  body{ background: #fff; color: #000; }
  .glass{ background: rgba(255,255,255,.95); border: 1px solid #ccc; box-shadow: none; }
}
  
/* Reduced motion preference */
@media (prefers-reduced-motion: reduce){
  * { animation: none !important; transition: none !important; }
}
