/* ===== Reset / base ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
html, body { margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; border: 0; }

/* ===== Light theme vars ===== */
:root{
  --bg:#f7f8fb;
  --panel:#ffffff;
  --ink:#0e1320;
  --muted:#5a6478;
  --border:#e5e8f0;
  --accent:#e11d2e;
  --link:#2563eb;

  /* Footer */
  --footer-bg:#0b0d12;
  --footer-ink:#cfd6e4;
}

/* ===== Page layout: sticky footer ===== */
body.page{
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Inter", "Helvetica Neue", Helvetica, sans-serif;
  line-height: 1.5;
}

/* tiny spacer at top */
.topbar{ height: 8px; flex: 0 0 auto; }

/* main grows to fill remaining height so footer sits at bottom */
.wrap{
  flex: 1 0 auto;         /* <— important for sticky footer */
  max-width: 820px;
  margin: 24px auto 24px; /* compact bottom margin */
  padding: 0 20px;
}

/* Card */
.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 6px 18px rgba(10,19,40,.06);
}

/* Title above the code */
.section-title{
  margin: 0 0 12px 0;
  font-weight: 800;
  font-size: clamp(1.05rem, 1.2vw + 0.9rem, 1.35rem);
  letter-spacing: .01em;
}

/* Code + copy button */
.code-row{ display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.code{
  font: 800 1.8rem/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .07em;
  padding: 12px 14px;
  background: #f3f5fa;
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* Buttons */
.btn{
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 6px 16px rgba(225,29,46,.25);
}
.btn:hover{ filter: brightness(1.05); }
.btn:active{ transform: translateY(1px); }

.btn-ghost{
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, #f9fafc);
}
.btn-ghost:hover{ background: #f3f6fb; }

.muted{ color: var(--muted); margin-top: 10px; }
.cta{ margin-top: 18px; }
.cta-link{ text-decoration: none; }
.cta-img{ border-radius: 10px; border: 1px solid var(--border); }

.row{ display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.link{ color: var(--link); text-decoration: none; }
.link:hover{ text-decoration: underline; }

/* ===== Footer (inside sticky layout) ===== */
/* ===== Footer with adjustable black buffer/inset ===== */
:root{
  /* tweak these two to taste */
  --footer-buffer: 28px; /* overall black space above the banner */
  --footer-inset: 10px;  /* small black gap right above the image */
}

.site-footer{
  flex: 0 0 auto;
  background: var(--footer-bg);
  color: var(--footer-ink);
  margin: 0;
  padding: var(--footer-buffer) 0 0; /* black buffer above the image */
  border: 0;
}

.site-footer-hero{
  max-width: 300px;
  margin: 0 auto;
  padding: var(--footer-inset) 20px 0; /* inset keeps the image from touching the buffer */
}

.site-footer-hero img{
  width: 100%;
  height: auto;
  max-height: 37.5px;      /* adjust banner height as needed */
  object-fit: contain;
  margin: 0;
  background: transparent;
}

.site-footer-inner{
  max-width: 1300px;
  margin: 0 auto;
  padding: 10px 20px 14px; /* slim bar under the image */
  text-align: center;
  font-size: .95rem;
  letter-spacing: .01em;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* make sure nothing after footer adds space */
body.page > *:last-child { margin-bottom: 0 !important; }
