/* Section: Token Palette */
:root{
  --bg: #0a1020;
  --bg-2: #0b1a2a;
  --text: #e9f5ff;
  --muted: #a8b8d9;
  --accent: #7efbd3;     /* pastel green */
  --accent-2: #38e6a4;   /* accent shade for highlights */
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.25);
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  --focus: 2px solid rgba(126, 251, 211, 0.9);
  --radius: 14px;
}

/* Section: Base + Layout 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, "Noto Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 15%, rgba(110, 230, 255, .18), transparent 40%),
    radial-gradient(circle at 80% 25%, rgba(120, 190, 255, .15), transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(60, 255, 180, .15), transparent 40%),
    linear-gradient(135deg, #050a1a 0%, #0b1b2a 60%, #041027 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
body::before {
  /* Subtle scanline texture (no images) */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to right, rgba(0,0,0,.025) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  mix-blend-mode: overlay;
  opacity: .55;
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}
main { padding: 1rem 0 2rem; }

/* Section: Framework 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: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .card { background: rgba(255,255,255,0.08); }
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(125, 230, 255, 0.6);
  background: #000;
  box-shadow: inset 0 0 20px rgba(0,0,0,.25), 0 8px 28px rgba(0,160,210,.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Typography */
.content { color: var(--text); line-height: 1.6; }
h1, h2, h3 { line-height: 1.15; margin: .25rem 0 0.5rem; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4vw, 3.2rem); letter-spacing: .2px; background: linear-gradient(90deg, #e6f8ff, #aaf0cf); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); margin-top: .25rem; }
h3 { font-size: clamp(1.15rem, 2.6vw, 1.6rem); margin-top: .6rem; }
p { margin: .6rem 0 1rem; color: var(--text); }
blockquote { margin: .75rem 0; padding: .75rem 1rem; border-left: 3px solid rgba(126,251,211,.8); background: rgba(126,251,211,.08); border-radius: 6px; }

/* Section: Links & Buttons */
a, button, .btn, .cta {
  font: inherit;
  color: #001f2b;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(126, 255, 211, 0.95);
  padding: .75rem 1rem;
  display: inline-block;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
.btn { background: rgba(126, 255, 211, 0.95); color: #002a24; }
.btn:hover { background: rgba(110, 240, 200, 0.95); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(126, 251, 211, 0.9);
}
.btn--outline:hover {
  background: rgba(126, 251, 211, 0.15);
}
.cta { font-weight: 700; }

/* Section: Semantic Elements & Layout */
header, nav, main, article, footer, aside {
  display: block;
  width: 100%;
}
header {
  display: grid;
  gap: .5rem;
  justify-items: center;
  text-align: center;
  padding: 1.75rem 1rem;
  margin: 0 auto 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
header h1 { margin: .25rem 0; font-weight: 800; }
header .meta { color: var(--muted); font-size: .9rem; }

/* Section: Content Wrapping for Article */
article { padding: 0 0 1rem; }

/* Section: Product Ad (Footer region) */
.product-ad {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  border-radius: 12px;
  background: rgba(20, 170, 150, 0.15);
  border: 1px solid rgba(60, 240, 200, 0.5);
}
.product-ad h3 { margin: 0; font-size: 1.05rem; }
.product-ad p { margin: 0; color: var(--text); }

/* Section: Lists */
ul { margin: .5rem 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* Section: Print (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, footer { display: none; }
  article { padding: 0; }
  .container { padding: 0; }
  a, button { color: #000; text-decoration: underline; }
}

/* Section: Responsive Typography & Spacing (enhanced) */
@media (min-width: 768px) {
  .container { padding-inline: 1.25rem; }
  header { padding: 2rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}