/* Section: Base & Theme */
:root {
  --bg: #0a1020;
  --bg-2: #0b1a2b;
  --text: #eaf4ff;
  --muted: #b8c3d9;
  --surface: rgba(15, 20, 40, 0.28);
  --surface-2: rgba(15, 20, 40, 0.22);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  --accent: #4bd6ff;
  --accent-2: #78ffd6;
  --focus: 3px solid rgba(75, 214, 255, 0.9);
}

html, body {
  height: 100%;
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans";
  line-height: 1.55;
  background: linear-gradient(135deg, rgba(8,12,28,1) 0%, rgba(8,16,32,1) 60%, rgba(8,12,28,1) 100%),
              radial-gradient(circle at 20% 15%, rgba(60,120,210,.25) 0 40%, transparent 42%),
              radial-gradient(circle at 80% 40%, rgba(20,180,240,.20) 0 40%, transparent 42%);
  background-attachment: fixed;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}
* { box-sizing: border-box; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(255,255,255,0.03) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: 0.55;
  z-index: 0;
}

/* Section: Layout primitives */
.container {
  width: 100%;
  max-width: clamp(680px, 88vw, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
  position: relative;
  z-index: 1;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-1px); }

/* Section: Glass panels + accessibility fallbacks */
header, main, footer, aside, article {
  background: rgba(5, 10, 25, 0.28);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 14px;
  padding: 1rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
  margin: 1rem 0;
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside, article {
    background: rgba(8, 12, 28, 0.66);
  }
}

/* Section: Typography & helpers */
h1, h2, h3 {
  color: var(--text);
  margin: .25rem 0 0.5rem;
  line-height: 1.12;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4.8vw, 3.75rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.8vw, 1.75rem); font-weight: 700; }

/* Base text & lists */
p { color: var(--text); opacity: .95; margin: 0 0 1rem; }
ul { padding-left: 1.25rem; margin: 0 0 1rem; }
li { margin: .25rem 0; color: var(--text); opacity: .95; }
blockquote { margin: .75rem 0; padding: .75rem 1rem; border-left: 3px solid var(--accent); background: rgba(20,40,80,.25); border-radius: 6px; }

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

/* Utility components */
.content { padding: 0.75rem 0 1rem; color: var(--text); }
.product-ad { display: block; padding: 0.9rem; text-align: left; text-decoration: none; color: var(--text); background: rgba(8,14,28,.32); border:1px solid rgba(255,255,255,.28); border-radius: 10px; transition: transform .2s ease; }
.product-ad:hover { transform: translateY(-1px); }

/* Links & CTAs */
a, button, .btn, .cta {
  font-family: inherit;
  color: var(--text);
  text-decoration: none;
  border: 0;
  background: none;
  cursor: pointer;
}
a { color: var(--accent); }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); outline: none; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
.btn, .cta {
  display: inline-block;
  padding: .65rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(to bottom, rgba(20, 60, 110, 0.9), rgba(10, 40, 90, 0.9));
  color: #eaffff;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform .2s ease, background .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn--outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.5);
  color: var(--text);
}
.btn + .btn { margin-left: .5rem; }
@media (prefers-reduced-motion: reduce) {
  .btn, .cta, a { transition: none; transform: none; }
  body::before { display: none; }
}

/* Section: Print styling */
@media print {
  body, header, main, article, footer, aside {
    background: #fff !important;
    color: #000 !important;
    border: none !important;
    box-shadow: none !important;
  }
  a { text-decoration: underline; }
}

/* Section: Responsive helpers */
@media (max-width: 700px) {
  header, main, footer, aside, article { padding: .75rem; }
  .container { padding-inline: .5rem; }
}
