/* Section: Root tokens (palette) */
:root {
  --bg: #0a1020;
  --bg-2: #0b1a2a;
  --text: #e6f7ff;
  --muted: #a8cbdc;
  --accent: #4bd1c2;       /* jade */
  --accent-2: #7bd9e0;     /* light jade/ice */
  --surface: rgba(12, 28, 52, 0.54);
  --surface-2: rgba(10, 20, 38, 0.48);
  --border: rgba(160, 210, 230, 0.45);
  --shadow: 0 8px 28px rgba(0,0,0,.28);
  --radius: 14px;
  --radius-sm: 10px;
  --glow: 0 0 0 0 transparent;
}

/* Section: Base + reset (mobile-first) */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.4; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(0,150,210,.25) 0%, rgba(0,180,140,.25) 60%, rgba(10,40,80,.25) 100%);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}
html, body { scroll-behavior: smooth; }

/* Section: Layered background (gradient + noise/scanlines) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient( circle at 20% 0%, rgba(120,210,230,.18), transparent 40% ),
    radial-gradient( circle at 90% 20%, rgba(0,90,60,.18), transparent 40% );
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: -2;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: 
    repeating-linear-gradient(to bottom, rgba(0,0,0,.08) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: soft-light;
  opacity: .6;
  pointer-events: none;
  z-index: -1;
  animation: scan 36s linear infinite;
}
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(2px); } }

/* Section: Layout primitives */
.container {
  width: 100%;
  max-width: clamp(720px, 88vw, 1120px);
  margin: 0 auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
}
.card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(180,210,230,0.35);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  color: var(--text);
}
@supports not (backdrop-filter: blur(10px)) {
  .card { background: rgba(10,20,40,.72); border-color: rgba(180,210,230,.5); }
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  border-radius: 999px;
  font-size: .75rem;
  color: #04131a;
  background: linear-gradient(135deg, rgba(123,217,226,.9), rgba(75,209,194,.85));
  border: 1px solid rgba(255,255,255,.6);
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(180,210,230,.5);
  background: #000;
  display: block;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.02);
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Section: Typography (responsive) */
h1, h2, h3 { margin: 0 0 .5rem; font-weight: 700; letter-spacing: .2px; }
h1 { font-size: clamp(1.6rem, 2.75vw + 0.5rem, 3rem); line-height: 1.15; }
h2 { font-size: clamp(1.15rem, 1.5vw + .6rem, 1.75rem); }
p { margin: 0 0 1rem; color: var(--muted); }
.main-content { color: var(--text); }

/* Section: Header, Nav, Footer styling (glassy, accessible) */
header {
  padding: 1.25rem 1rem;
  text-align: center;
}
header h1 { font-size: clamp(1.4rem, 1.2vw + 1.2rem, 2.4rem); line-height: 1.15; margin-bottom: .25rem; }
header .meta { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: .85rem; }
nav { margin-top: .5rem; display: inline-flex; gap: .5rem; padding: .25rem 0; }
nav a {
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(180,210,230,.5);
  padding: .4rem .8rem;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
nav a:hover { background: rgba(0,0,0,.35); transform: translateY(-1px); border-color: rgba(180,210,230,.85); }
nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Section: Article content blocks with glass panels where possible */
main { padding: 1rem 0 2rem; }
article { padding: 0; margin: 0 auto; }

/* Subtle content wrapper to simulate content glass panels when present */
.content {
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(8,18,38,.42);
  border: 1px solid rgba(120,210,230,.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
}
@supports not (backdrop-filter: blur(12px)) {
  .content { background: rgba(8,18,38,.75); }
}

/* Section: Glossy CTA styles (for anchors, buttons, etc.) */
a, button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  padding: .55rem .92rem;
  border-radius: 10px;
  border: 1px solid rgba(180,210,230,.5);
  background: rgba(0,0,0,.18);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
a:hover, button:hover, .btn:hover, .cta:hover { background: rgba(0,0,0,.28); transform: translateY(-1px); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(75,209,194,.25);
  outline-offset: 2px;
}
a.btn, a.cta { display: inline-flex; align-items: center; gap: .5em; }

/* Section: Lists */
ul { margin: 0 0 1rem 1.25rem; padding: 0; list-style: disc; }
li { margin: .25rem 0; }

/* Section: Product-ad / promo blocks (glassy) */
.product-ad, .sponsored-page {
  display: block;
  padding: .75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(2,6,20,.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin: .5rem 0;
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: block; }

/* Section: Print styles (basic readability) */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  nav, .image-frame { display: none; }
  .container { padding: 0; max-width: 100%; }
  a { text-decoration: underline; }
}

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

/* Section: Misc helpers (logical props) */
.section { padding-block: 1rem; }
.row { display: flex; gap: 1rem; align-items: center; }
.section-title { font-size: 1.25rem; margin-bottom: .25rem; }

@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  header { padding: 1.5rem 1rem; }
}
