/* Cream Compact front-door page (issue #275). Plain HTML + CSS + one
 * inline copy script. Fonts come from Google Fonts (DM Sans, DM Mono,
 * Chakra Petch). The watermark ball and wordmarks are SVG files in site/.
 * Type, spacing and colours follow the owner's exported design; the text
 * ink, rules and accents stay indigo (#38309E) per the owner's decision. */
:root {
  --cream: #f8f4ec;
  --ink: #38309E;
  --muted: #625f78;
  --hairline: #dcd5e4;
  --radius: 12px;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --chakra: "Chakra Petch", "DM Sans", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  overflow-x: clip;
}
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Faint ball watermark: fixed, whole ball visible, tilted ~9deg CCW.
 * Desktop (#290): the ceiling mount is centred over the final "d" of
 * "to understand." at the height of the "to code." line. Both scale with
 * the h1 size (--h1, same clamp as h1): the "d" is 10.83em from the hero's
 * left edge, the line's middle 157px + .66em from the top. The .4049/.0656
 * factors place the rotated mount's centre within the image box. */
.watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.watermark img {
  --ball: min(82vmin, 720px);
  --h1: clamp(30px, 4.6vw, 60px);
  position: absolute;
  left: calc(max(0px, 50% - 560px) + 24px + 10.83 * var(--h1) - .4049 * var(--ball));
  top: calc(157px + .66 * var(--h1) - .0656 * var(--ball));
  width: var(--ball);
  height: var(--ball);
  opacity: .16;
  transform: rotate(-9deg);
  mix-blend-mode: multiply;
}
/* Narrow screens: the ball stays centred, as before. */
@media (max-width: 900px) {
  .watermark { display: grid; place-items: center; }
  .watermark img {
    position: static;
    width: min(82vmin, 720px);
    height: min(82vmin, 720px);
  }
}
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-head {
  display: flex;
  justify-content: flex-end;
  padding-block: 24px;
}
.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 7px 16px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  background: transparent;
}
.github-btn svg { width: 18px; height: 18px; }
.github-btn:hover { background: var(--ink); color: var(--cream); }

.hero { padding-block: 64px 80px; max-width: 640px; }
h1 {
  margin: 0 0 22px;
  font: 700 clamp(30px, 4.6vw, 60px)/1.3 var(--chakra);
  letter-spacing: -.035em;
  text-wrap: balance;
}
h1 .line { display: block; white-space: nowrap; }
/* The wordmark lettering, set inline at headline size; the svg baseline
 * sits 12.5% up from the svg bottom, so it hangs slightly below the text. */
img.wm {
  display: inline-block;
  height: 1.25em;
  width: auto;
  vertical-align: -.16em;
  margin-right: .12em;
}
img.wm[src*="unvibe-vibe"] { margin-right: .2em; }
.lede {
  margin: 0 0 32px;
  font-size: 19px;
  color: var(--muted);
  max-width: 32em;
}

.install { max-width: 720px; }
.install-code {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--ink);
  color: #FBF8F2;
  border-radius: var(--radius);
  overflow: hidden;
}
.install-code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
}
.install-code code {
  font-family: var(--mono);
  font-size: .95rem;
  line-height: 1.7;
  white-space: pre;
}
.copy {
  border: 0;
  border-left: 1px solid rgb(251 248 242 / .3);
  background: transparent;
  color: #FBF8F2;
  font-family: var(--sans);
  font-weight: 700;
  font-size: .9rem;
  padding: 0 22px;
  cursor: pointer;
  flex: none;
}
.copy:hover { background: rgb(251 248 242 / .12); }
.req {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.req code {
  font-family: var(--mono);
  font-size: .92em;
  color: var(--ink);
}

/* Thin full-width rule between hero and features. */
hr.rule {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 0;
  position: relative;
  z-index: 1;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 36px;
  padding-block: 72px 88px;
  margin: 0;
}
.feat {
  border-top: 2px solid var(--ink);
  padding-top: 14px;
  background: transparent;
}
.feat h2 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--ink);
}
.feat p { margin: 0; font-size: 15px; color: var(--muted); }

footer {
  border-top: 1px solid var(--hairline);
  position: relative;
  z-index: 1;
}
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  padding-bottom: 36px;
  font-size: 14px;
  color: var(--muted);
}
.foot-wm { width: 72px; height: auto; }
footer a { color: inherit; }

@media (max-width: 820px) {
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .install-code { flex-direction: column; }
  .install-code pre { padding: 14px; }
  .install-code code { font-size: .83rem; white-space: pre; }
  .copy {
    border-left: 0;
    border-top: 1px solid rgb(251 248 242 / .3);
    padding: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .watermark img { transform: rotate(-9deg); }
}
