/* Base tokens */
:root{
  --bg: #0b0f14;
  --bg-2: #141923;
  --text: #eaf2ff;
  --muted: #97a3b8;
  --surface: rgba(20, 24, 32, 0.22);
  --surface-2: rgba(20, 24, 32, 0.28);
  --border: rgba(255, 255, 255, 0.28);
  --accent: #ffd800;
  --accent-2: #ffe94d;
  --shadow: 0 8px 24px rgba(0,0,0,.28);
  --focus: 2px solid var(--accent);
}

/* Section: Base reset and layered background */
*,
*::before,
*::after{ box-sizing: border-box; }
html, body { height: 100%; }
html { background: #000; }
body{
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  font-size: clamp(14px, 2.4vw, 16px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    linear-gradient(135deg, rgba(10,15,20,0.92) 0%, rgba(20,24,32,0.92) 60%, rgba(10,15,20,0.92) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.03) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay;
  position: relative;
  isolation: isolate;
}
body::after{
  content: "";
  position: fixed;
  inset: 0;
  /* subtle rain droplets on glass + scanlines */
  background-image:
    radial-gradient(circle at 25px 18px, rgba(255,255,255,0.08) 2px, transparent 3px),
    radial-gradient(circle at 110px 60px, rgba(255,255,255,0.05) 2px, transparent 3px),
    linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(255,255,255,0.02) 2%, rgba(0,0,0,0) 4%);
  background-size: 60px 60px, 150px 100px, 100% 100%;
  opacity: 0.8;
  pointer-events: none;
  mix-blend-mode: overlay;
  filter: saturate(1.1);
}
@supports (backdrop-filter: blur(8px)){
  .glass { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}
@supports not (backdrop-filter: blur(8px)){
  .glass{ background: rgba(20,24,32,0.78); border: 1px solid rgba(255,255,255,0.25); }
}

/* Section: Layout primitives */
html, body, header, nav, main, article, aside, footer { height: auto; }
.container{ max-width: clamp(320px, 92vw, 1100px); margin-inline: auto; padding: 0 1rem; }
.grid{ display: grid; gap: 1rem; }
.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); }

/* Section: Glass panels and imagery */
.image-frame{
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  display: block;
}
.image-frame img{ width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Content blocks and typography */
.content{ padding: 0.75rem 0; color: var(--text); }
h1, h2, h3, h4, h5, h6{ margin: 0 0 0.5rem; font-weight: 600; }
h1{ font-size: clamp(1.6rem, 4vw + 1rem, 2.75rem); line-height: 1.15; letter-spacing: .2px; color: var(--text); text-shadow: 0 1px 0 rgba(0,0,0,.4); }

/* Section: Product ad / anchors */
.product-ad{ display: block; text-align: center; padding: .75rem; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.25); }
.product-ad a{ color: var(--text); text-decoration: none; }

/* Section: Links, buttons, pills */
a, button, .btn, .cta{ font-family: inherit; }
a{ color: var(--text); text-decoration: none; }
a:hover, a:focus{ text-decoration: underline; }
button, .btn{ display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1.1rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.25); color: #fff; cursor: pointer; text-align: center; transition: transform .2s ease, background .2s ease; text-shadow: none; }
.btn{ text-decoration: none; }
.btn.primary{ background: var(--accent); color: #111; font-weight: 700; border-color: rgba(255,216,0,.6); }
.btn.primary:hover{ background: var(--accent-2); transform: translateY(-1px); }
.cta{ font-weight: 700; }

/* Section: Pills / tags */
.tag{ display: inline-block; padding: .25em .6em; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); color: var(--text); font-size: .75rem; }

/* Section: Lists */
ul{ margin: 0; padding: 0 0 0 1.25rem; color: var(--muted); }
li{ margin: .25rem 0; }

/* Section: Header / main / footer structure */
header{ padding: 1rem 0; text-align: center; }
header h1{ margin: 0; }

/* Section: Main area and footers */
main{ padding: 1rem 0; }
footer{ padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.15); background: rgba(6,8,12,.6); }

/* Section: Responsive behavior */
@media (min-width: 640px){
  .container{ padding: 0 1rem; }
  .grid{ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}
@media print{
  body{ background: #fff; color: #000; }
  header, footer{ display: block; }
}
