/* Section: Tokens & Theme */
:root{
  --bg: #0a0f1e;
  --bg-2: #141e2b;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.14);
  --text: #e9f1ff;
  --muted: #a5b4d0;
  --accent: #7bd6ff;       /* pastel blue */
  --accent-2: #b27a54;     /* pastel brown */
  --card: rgba(255,255,255,0.14);
  --outline: rgba(255,255,255,.4);
  --shadow: 0 8px 28px rgba(0,0,0,.25);
  --radius: 14px;
  --focus: 0 0 0 3px rgba(123,214,255,.6);
}
html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-synthesis: none; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.5;
  background: linear-gradient(135deg, rgba(12,22,40,.95) 0%, rgba(12,22,40,.85) 60%, rgba(20,25,40,.92) 100%);
  background-attachment: fixed;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  /* Layered gradient + isometric cube-like pattern (pure CSS) */
  --cube1: rgba(123,214,255,.15);
  --cube2: rgba(179,122,84,.12);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(123,214,255,.12), transparent 40%),
    linear-gradient(135deg, rgba(123,214,255,.08) 0 20px, transparent 20px 40px),
    linear-gradient(315deg, rgba(179,122,84,.10) 0 20px, transparent 20px 40px),
    radial-gradient(circle at 80% 0%, rgba(0,0,0,.0), rgba(0,0,0,.0));
  /* Subtle scanlines on top layer */
}
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: repeating-linear-gradient(to bottom,
    rgba(255,255,255,.04) 0 1px,
    transparent 1px 2px);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(123,214,255,.08), transparent 40%),
    linear-gradient(135deg, rgba(123,214,255,.04) 0 2px, transparent 2px 6px);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}
main, header, footer, aside { position: relative; z-index: 1; }

/* Section: Layout helpers */
.container{ max-width: clamp(320px, 90vw, 1100px); margin: 0 auto; padding: 0 1rem; }
.grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card{ background: var(--card); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.content{ display: block; padding: 0; margin: 0; }

/* Section: Typography & headings (responsive) */
h1, h2{ color: var(--text); margin: .25rem 0 0.5rem; line-height: 1.15; font-weight: 700; }
h1{ font-size: clamp(1.75rem, 3.5vw + 1rem, 3.5rem); letter-spacing: .2px; }
h2{ font-size: clamp(1.25rem, 2vw + .5rem, 2rem); }
p{ color: var(--text); opacity: .92; margin: .4rem 0 1rem; }
.meta{ color: var(--muted); font-size: .9rem; margin-bottom: .75rem; }

/* Section: Glass panels (frosted look) */
.header-glass, .main-glass, .footer-glass, .aside-glass { 
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports not (backdrop-filter: blur(10px)) {
  .header-glass, .main-glass, .footer-glass, .aside-glass { 
    background: rgba(255,255,255,.18);
  }
}
header, main, footer { padding: 1rem; }

/* Section: Image frame styling */
.image-frame{ aspect-ratio: 16/9; width: 100%; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,.35); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.image-frame img{ width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Links, buttons, CTAs */
a, button, .btn, .cta{ cursor: pointer; transition: transform .2s ease, background-color .2s ease, color .2s ease; }
a{ color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible{ text-decoration: underline; outline: none; }
button, .btn, .cta{
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: .65rem 1rem;
  font-weight: 600;
  background: var(--accent);
  color: #041018;
}
.btn.secondary, .cta{ background: transparent; color: var(--text); border-color: rgba(255,255,255,.5); }
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn:focus-visible, .cta:focus-visible, a:focus-visible, button:focus-visible{
  outline: none;
  box-shadow: var(--focus);
  outline: none;
  outline-offset: 0;
}
.btn:focus-visible{ outline: none; }

/* Section: Lists */
ul, li{ margin: 0; padding: 0; list-style: none; }
li{ padding-left: 0; margin: .5rem 0; position: relative; }
li::before{
  content: "•";
  color: var(--accent);
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

/* Section: Utilities / components */
.container .tag{ display: inline-block; padding: .15rem .4rem; border-radius: 999px; font-size: .75rem; background: rgba(123,214,255,.15); border: 1px solid rgba(123,214,255,.5); color: var(--text); }

/* Section: Header layout */
header{ display: grid; gap: .5rem; grid-template-columns: 1fr; align-items: center; }
header h1{ margin-top: .25rem; }

/* Section: Footer layout (product ads) */
footer{ display: grid; grid-template-columns: 1fr; gap: 1rem; padding-top: 1.25rem; }
footer .product-ad, footer .sponsored-page{ padding: .5rem; text-align: center; }

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

/* Section: Print (basic readability) */
@media print{
  body{ background: #fff; color: #000; }
  a{ text-decoration: underline; }
}
