/* Synch homepage only (loaded after site.css).
   The page tells Synch's story (why we exist: to support and help other communities), then a few real
   problems, each with a preview of what we built for it, a real screenshot, and a link to that
   service's own page. The service pages do the selling, so nothing here repeats their art or copy.
   Each problem section is laid out differently on purpose: these are separate things, not steps. */

/* data-pond hides things while Pondor's page is off; this beats the display rules below */
.home-page [hidden] { display: none !important; }

/* ── hero ── */
.hp-hero { padding: 104px 0 88px; }
.hp-hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); max-width: 17ch; }
.hp-hero .lead { font-size: 1.22rem; max-width: 50ch; }

/* ── why we exist ── */
.hp-story { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 88px 0; }
.hp-story__in { display: grid; gap: 28px; max-width: 920px; }
.hp-story .eyebrow { margin: 0; }
.hp-story__big { font-size: clamp(1.45rem, 3vw, 2.1rem); font-weight: 650; line-height: 1.3; letter-spacing: -.02em; color: var(--ink); }
.hp-story__big .accent { color: var(--blue-ink); }
.hp-story__body { display: grid; gap: 14px; max-width: 64ch; color: var(--ink-2); font-size: 1.08rem; }

/* ── a problem and what we built for it ── */
.hp-problem { padding: 112px 0; border-bottom: 1px solid var(--line); overflow: hidden; }
.hp-problem h2 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; max-width: 20ch; }
.hp-problem__text > p:not(.hp-answer) { margin-top: 18px; color: var(--ink-2); font-size: 1.08rem; max-width: 52ch; }
.hp-problem__split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 901px) {
  .hp-problem__split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 72px; }
  .hp-problem__split--flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}

/* the answer: one quiet line with the service's icon, then the link out */
.hp-answer { display: flex; gap: 14px; align-items: flex-start; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--ink-2); max-width: 54ch; }
.hp-answer img { width: 28px; height: 28px; border-radius: 8px; flex: none; margin-top: 2px; }
.hp-answer b { color: var(--ink); }
.hp-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 700; font-size: 1.02rem; color: var(--hp-c, var(--blue-ink)); }
.hp-go span { transition: transform .2s; }
.hp-go:hover { text-decoration: none; }
.hp-go:hover span { transform: translateX(4px); }

/* each link takes its service's colour (light / dark) */
.hp-problem--acad { --hp-c: #9a470b; } .hp-problem--arch { --hp-c: #0b6645; } .hp-problem--pond { --hp-c: #0b6a73; }
:root[data-theme="dark"] .hp-problem--acad { --hp-c: #ffb57a; } :root[data-theme="dark"] .hp-problem--arch { --hp-c: #7fd9b4; } :root[data-theme="dark"] .hp-problem--pond { --hp-c: #7fe0d6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hp-problem--acad { --hp-c: #ffb57a; } :root:not([data-theme="light"]) .hp-problem--arch { --hp-c: #7fd9b4; } :root:not([data-theme="light"]) .hp-problem--pond { --hp-c: #7fe0d6; }
}
:root.a11y-contrast .hp-problem { --hp-c: var(--blue-ink); }

/* Academy: the certificate, lying on the page at a slight angle */
.hp-problem__shot { display: flex; justify-content: center; }
.hp-cert { width: 100%; max-width: 520px; height: auto; border-radius: 14px; transform: rotate(2.5deg);
  box-shadow: 0 2px 4px rgba(60, 34, 12, .08), 0 30px 60px -24px rgba(60, 34, 12, .35); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.hp-cert:hover { transform: rotate(0) scale(1.02); }

/* Architect: the real build preview, full width, its bottom fading out */
.hp-problem__text--wide { max-width: 760px; }
.hp-problem__text--wide h2 { max-width: 24ch; }
.hp-window { position: relative; margin: 48px 0 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; max-height: 460px; }
.hp-window img { width: 100%; height: auto; }
.hp-window::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hp-problem__foot { display: flex; flex-wrap: wrap; gap: 8px 40px; align-items: flex-end; justify-content: space-between; margin-top: -20px; position: relative; }
.hp-problem__foot .hp-answer { margin-top: 0; border-top: 0; padding-top: 0; }

/* Pondor: the pond picture, big, with rounded game-like corners */
.hp-pond { width: 100%; height: auto; border-radius: 22px; box-shadow: 0 2px 4px rgba(10, 60, 66, .08), 0 30px 60px -26px rgba(10, 60, 66, .45); }

/* the reveal: screenshots rise a little as they arrive (site.js handles .reveal) */
.reveal:not(.is-in) .hp-cert { transform: rotate(6deg) translateY(30px); }
.reveal.hp-window:not(.is-in) { transform: translateY(40px); }
.reveal:not(.is-in) .hp-pond { transform: scale(.96); }
.hp-pond { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.hp-cert { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }

/* problem headlines decode as they scroll in (home.js); hidden until then, only when motion is on */
.js-decode [data-hp-decode]:not(.dc-ready) { visibility: hidden; animation: dc-fallback 0s 7s forwards; }

/* ── the end ── */
.hp-end__in { text-align: center; max-width: 640px; margin: 0 auto; }
.hp-end__in p { margin-top: 14px; color: var(--ink-2); font-size: 1.08rem; }
.hp-end__in .btn-row { justify-content: center; margin-top: 26px; }

/* staff applications: deliberately small */
.hp-volunteer { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 72px auto 0; max-width: 760px; padding: 16px 18px;
  border: 1px dashed var(--line); border-radius: 14px; color: var(--ink-2); font-size: .93rem; }
.hp-volunteer img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.hp-volunteer p { flex: 1 1 280px; }
.hp-volunteer b { color: var(--ink); }

@media (max-width: 900px) {
  .hp-hero { padding: 56px 0 56px; }
  .hp-story { padding: 64px 0; }
  .hp-problem { padding: 72px 0; }
  .hp-problem__split--flip .hp-problem__shot { order: 2; }
  .hp-window { max-height: 320px; margin-top: 32px; }
  .hp-problem__foot { margin-top: 8px; }
  .hp-cert { max-width: 420px; }
}

.a11y-still [data-hp-decode]:not(.dc-ready) { visibility: visible; }
.a11y-still .hp-cert, .a11y-still .hp-cert:hover { transform: rotate(2.5deg); }
