/* By Damian — Section 4: Proof (#proof).
   Bone background (after the graphite agent): calm, trustworthy, and the clients' sites
   pop on it. Honest by design: no reviews, logos or numbers made up.

   html.proof-ready (proof.js): the cards exist. html.proof-anim (never with reduced motion
   or ?static): entrance and movement. .ex.is-live: a card "comes alive". */

.proof {
  position: relative;
  background: var(--next-bg);
  color: var(--bg);
  --proof-ink-2: #6E6E69; /* small text on bone */
}
.proof__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(88px, 12svh, 140px) clamp(16px, 4vw, 56px) clamp(80px, 11svh, 128px);
}

.proof__label {
  margin: 0 0 clamp(24px, 4svh, 40px);
  color: var(--proof-ink-2);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

/* ---------- The honest opening ---------- */
.proof__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.proof__lead {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-weight: var(--display-weight);
  font-size: clamp(1.9rem, 4.2vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: var(--display-tracking);
  text-wrap: balance;
}
.proof__body {
  max-width: 640px;
  margin: clamp(18px, 2.6svh, 28px) 0 0;
  color: var(--proof-ink-2);
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.55;
  text-wrap: pretty;
}
.proof__try {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: clamp(22px, 3.4svh, 36px);
  padding: 0 22px;
  border: 1px solid rgba(31, 31, 31, 0.25);
  border-radius: 999px;
  color: var(--bg);
  font: 600 0.95rem/1 var(--font-body);
  text-decoration: none;
  transition: border-color 0.25s var(--ease);
}
.proof__try svg { width: 18px; height: 18px; transition: transform 0.4s var(--ease); }
.proof__trylabel {
  padding-bottom: 3px;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0% 2px;
  transition: background-size 0.4s var(--ease);
}
.proof__try:hover { border-color: rgba(31, 31, 31, 0.45); }
.proof__try:hover .proof__trylabel { background-size: 100% 2px; }
.proof__try:hover svg { transform: translateY(-3px); }

/* ---------- The examples: staggered 2×2 grid (desktop) ---------- */
.proof__gallery {
  --par: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 4.5vw, 72px);
  row-gap: clamp(48px, 7svh, 88px);
  margin-top: clamp(56px, 9svh, 104px);
  padding-bottom: clamp(48px, 7svh, 88px); /* room for the staggered column */
}
/* Built by JS: nothing shows half-made. */
.js:not(.proof-ready) .proof__gallery { visibility: hidden; }
html:not(.js) .proof__gallery,
html:not(.js) .proof__dots { display: none; }

.ex {
  --dir: -1;
  margin: 0;
  /* Parallax: the columns drift in opposite directions (set by proof.js). */
  translate: 0 calc(var(--par) * var(--dir) * 26px);
}
.ex:nth-child(even) { --dir: 1; margin-top: clamp(64px, 10svh, 120px); }

.ex__frame {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  border-radius: 14px;
  transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.5s var(--ease);
}
.ex__frame .cs {
  box-shadow:
    0 30px 60px -30px rgba(31, 31, 31, 0.35),
    0 10px 22px -12px rgba(31, 31, 31, 0.2),
    0 0 0 1px rgba(31, 31, 31, 0.06);
  transform: none;
  transition: box-shadow 0.5s var(--ease), transform 0.5s var(--ease);
}
.ex.is-live .ex__frame .cs {
  transform: translateY(-8px);
  box-shadow:
    0 44px 80px -34px rgba(31, 31, 31, 0.42),
    0 14px 28px -14px rgba(31, 31, 31, 0.24),
    0 0 0 1px rgba(31, 31, 31, 0.06);
}

/* The chat bubble pops when the card comes alive. */
.ex .cs__bubble { transform-origin: 100% 100%; transition: transform 0.45s var(--ease); }
.ex.is-live .cs__bubble { transform: scale(1.08); }
.ex .cs__slots span { transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease); }

/* A notification lands on the site (like the ones on the hero's phone). */
.ex__toast {
  position: absolute;
  top: 7%;
  right: 3%;
  z-index: 2;
  display: grid;
  gap: 3px;
  max-width: min(64%, 300px);
  padding: 10px 14px 11px;
  border-radius: 14px;
  background: rgba(43, 43, 42, 0.94);
  color: var(--ink);
  box-shadow: 0 18px 36px -16px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}
.ex.is-live .ex__toast { opacity: 1; transform: none; transition-delay: 0.45s; }
.ex__app {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ex__app i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ex__msg { font-size: 0.8rem; font-weight: 500; line-height: 1.3; }

.ex__cap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 4px;
  margin-top: 18px;
  padding: 0 4px;
}
.ex__name { font-weight: 600; font-size: 0.95rem; }
.ex__meta { color: var(--proof-ink-2); font-size: 0.85rem; }
.ex__tag {
  margin-left: auto;
  color: var(--proof-ink-2);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

/* Entrance: the cards rise in, one after another, and settle. */
.proof-anim .ex {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--i) * 0.09s);
}
.proof-anim .proof.is-in .ex { opacity: 1; transform: none; }

.proof__dots { display: none; }

/* ---------- Founding Client spots ---------- */
.spots {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 760px;
  margin: clamp(40px, 6svh, 72px) auto 0;
  padding-top: clamp(32px, 5svh, 48px);
  border-top: 1px solid rgba(31, 31, 31, 0.12);
  text-align: center;
}
/* One marker per spot: open = yellow, taken = graphite. */
.spots__pips { display: flex; gap: 8px; }
.spots__pips i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(31, 31, 31, 0.12);
}
.spots__pips i.is-taken { background: var(--bg); box-shadow: none; }
.spots__count {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-weight: var(--display-weight);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.spots__count { text-wrap: balance; }
.spots__count b { font-weight: inherit; }
.spots__note { margin: 0; color: var(--proof-ink-2); font-size: 0.92rem; line-height: 1.5; }

/* ---------- Phone & tablet: a carousel that slides with the finger ---------- */
@media (max-width: 900px) {
  .proof__inner { padding-left: 0; padding-right: 0; }
  .proof__label,
  .proof__intro,
  .spots { padding-left: 16px; padding-right: 16px; }
  .spots { margin-left: 16px; margin-right: 16px; padding-left: 0; padding-right: 0; }
  .proof__lead { font-size: clamp(1.7rem, 8vw, 2.4rem); }

  .proof__gallery {
    display: flex;
    gap: 14px;
    margin-top: 40px;
    padding: 6px 16px 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .proof__gallery::-webkit-scrollbar { display: none; }
  .ex {
    flex: none;
    width: min(82vw, 380px);
    scroll-snap-align: start;
    translate: none;
  }
  .ex:nth-child(even) { margin-top: 0; }
  /* The site in its phone layout, framed like a screenshot: the top of it, with a soft end. */
  .ex__frame { transform: none; }
  .ex__frame .cs-wrap { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 18px; }
  .ex__frame .cs { border-radius: 18px; }
  .ex__frame::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 18%;
    border-radius: 0 0 18px 18px;
    background: linear-gradient(to bottom, transparent, var(--c-page));
    pointer-events: none;
  }
  .ex.is-live .ex__frame .cs { transform: none; }
  .ex__frame { border-radius: 18px; box-shadow: 0 24px 44px -26px rgba(31, 31, 31, 0.4), 0 0 0 1px rgba(31, 31, 31, 0.06); }
  .ex__frame .cs, .ex.is-live .ex__frame .cs { box-shadow: none; }
  .ex__toast { top: auto; bottom: 8%; right: 4%; left: 4%; max-width: none; }
  .ex__tag { margin-left: 0; width: 100%; }

  .proof__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
  }
  .proof__dots i { width: 18px; height: 3px; border-radius: 2px; background: rgba(31, 31, 31, 0.18); transition: background-color 0.3s var(--ease); }
  .proof__dots i.is-on { background: var(--bg); }

  /* While a light section is under the top bar, a bone backing keeps "By Damian" readable (closing.js). */
  .topbar.over-light {
    background-color: rgba(237, 235, 230, 0.88);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

/* ---------- Reduced motion / ?static: finished, still ---------- */
.is-static .ex { translate: none; }
.is-static .ex__frame,
.is-static .ex__frame .cs,
.is-static .ex__toast,
.is-static .cs__bubble,
.is-static .cs__slots span { transition: none !important; transform: none !important; }
.is-static .proof__gallery { scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) {
  .proof__try svg, .proof__trylabel { transition: none; }
}
