/* Section: Tokens */
:root {
  --bg: #0b0b0f;
  --bg-2: #141522;
  --text: #e9f3ff;
  --muted: #a9b8d9;
  --accent: #ffd400;
  --accent-2: #00fff0;
  --accent-3: #ff6b6b;
  --glass: rgba(255,255,255,.08);
  --glass-strong: rgba(255,255,255,.14);
  --border: rgba(255,255,255,.28);
  --shadow: 0 8px 28px rgba(0,0,0,.35);
  --focus: #9af5ff;
  --radius: 14px;
  --maxw: clamp(720px, 86vw, 1100px);
  --gap: 1rem;
}

/* Section: Global */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  line-height: 1.5;
  font-size: clamp(14px, 1.8vw, 16px);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(255,214,0,.08), transparent 40%),
    radial-gradient(circle at 85% 0%, rgba(0,255,204,.08), transparent 40%),
    linear-gradient(135deg, rgba(10,10,10,.8), rgba(4,4,4,.5)),
    conic-gradient(from 180deg at 50% 0%, #ff6b00 0deg, #ffd400 60deg, #00ffcc 130deg, #5a5aff 190deg, #ff6b00 360deg);
  background-blend-mode: overlay, overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Section: Layout helpers */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1rem; }

/* Section: Structural selectors */
header, nav, main, article, aside, footer { display: block; }

/* Section: Typography scale */
h1 { font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.08; margin: .25rem 0 0.5rem; letter-spacing: .2px; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: .75rem 0 .5rem; }
h3 { font-size: clamp(1.1rem, 2.6vw, 1.4rem); margin: .75rem 0 .5rem; }

/* Section: Glass panels (with graceful fallback) */
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.22); backdrop-filter: none; }
}

/* Section: Header styling */
header {
  padding: 1.25rem 1rem;
  text-align: left;
}
header h1 {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  letter-spacing: .2px;
}
header .meta {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .88rem;
}

/* Section: Main content layout */
main { padding: 1rem 0; }
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Content blocks */
.content { padding: 0 0 0; }
p { margin: .75rem 0; color: #eaf3ff; }
ul { padding-left: 1.25rem; margin: .75rem 0; }
li { margin: .25rem 0; }

/* Section: Product ad in footer */
.product-ad {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  margin: 0.75rem auto 0;
  max-width: 680px;
}
.product-ad h3 { margin: 0; font-size: 1.05rem; }
.product-ad a {
  display: inline-block;
  padding: .6rem 0.9rem;
  border-radius: 8px;
  background: rgba(255,255,255,.18);
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.28);
}
.product-ad a:hover { filter: brightness(1.05); text-decoration: underline; }

/* Section: Link/button styling */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn {
  display: inline-block;
  padding: .65rem .95rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(to bottom right, #2a2a2a, #111);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform .16s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }

/* Primary/Secondary CTAs (within hero or hero-like sections) */
.cta {
  display: inline-block;
  padding: .75rem 1.1rem;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.4);
  background: linear-gradient(135deg, rgba(255,209,0,.95), rgba(255,209,0,.6));
  color: #1a1300;
  font-weight: 700;
}
.cta.secondary {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.4);
  color: var(--text);
}

/* Section: Utility grid and cards */
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .2rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  margin-right: .5rem;
  color: var(--text);
}

/* Section: Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, nav, main, article, aside, footer { background: transparent; }
  .glass { background: transparent; border: 0; box-shadow: none; }
  a, .btn, .cta { text-decoration: underline; color: #000; }
}

/* Section: Accessibility helpers for lists and spacing on small screens */
@media (max-width: 640px) {
  .product-ad { grid-template-columns: 1fr; }
}
