/* =========================================================================
   The Payroll Giving Scheme - holding page
   Self-contained. Shares the brand tokens with the main build but does not
   depend on it, so this page can ship on its own.
   ========================================================================= */

:root {
  --paper:   #f6f3eb;
  --paper-2: #f9f7f0;
  --ink:     #0f1f35;
  --mint:    #36bfa3;
  --mint-text: #17705d;
  --slate:   #566273;
  --rule:    #e0e5ea;
  --white:   #ffffff;

  --s1: 0.5rem;  --s2: 1rem;  --s3: 1.5rem;  --s4: 2rem;
  --s5: 3rem;    --s6: 4rem;  --s7: 6rem;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 12px;
  --radius-pill: 999px;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --micro: 200ms;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.22vw, 1.1875rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1 { margin: 0 0 var(--s3); color: var(--ink); text-wrap: balance; }
p { margin: 0 0 var(--s2); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: var(--mint-text); text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: var(--s2); top: -100px; z-index: 10;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1.25rem; border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600; text-decoration: none;
  transition: top var(--micro) var(--ease);
}
.skip-link:focus { top: 0; }

/* Layout: masthead, content, footer, filling the viewport on tall screens. */
.page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  min-height: 100vh;
  min-height: 100svh;
  width: min(100% - var(--gutter) * 2, 1120px);
  margin-inline: auto;
  padding-block: clamp(1.25rem, 2.5vw, 2.25rem);
}

.masthead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.brand { display: inline-flex; text-decoration: none; }
.pg-lockup { display: block; width: auto; height: 66px; padding-right: 12px; }

.status {
  margin: 0;
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--rule); border-radius: var(--radius-pill);
  background: var(--white);
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate);
}
.status::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(var(--s5), 6vw, var(--s7));
  align-items: center;
}
h1 {
  max-width: 15ch;
  font-size: clamp(2.25rem, 1.35rem + 3.6vw, 3.625rem);
  font-weight: 600; line-height: 0.98; letter-spacing: -0.045em;
}
.lede { max-width: 52ch; color: var(--slate); }

/* Waitlist: the secondary action, under a rule so it does not compete
   with the fundraise button above it. */
.waitlist {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  padding-top: clamp(1.25rem, 2.5vw, 1.5rem);
  border-top: 1px solid var(--rule);
  max-width: 30rem;
}
.waitlist-label { margin: 0 0 var(--s2); font-size: 0.875rem; font-weight: 500; color: var(--slate); }
.waitlist-note { margin: var(--s2) 0 0; font-size: 0.75rem; color: var(--slate); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.65rem 1.5rem;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  font: inherit; font-size: 0.9375rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--micro) var(--ease), border-color var(--micro) var(--ease),
              color var(--micro) var(--ease);
}
.btn-lg { min-height: 58px; padding: 0.8rem 2rem; font-size: 1rem; }

.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-primary:hover { background: #17304f; border-color: #17304f; }

.btn-secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--white); }

/* Primary action: backing the fundraise. Everything under it is secondary. */
.cta { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.cta-note { margin: var(--s2) 0 0; max-width: 44ch; font-size: 0.875rem; color: var(--slate); }

/* Collective dots */
.hero-figure { display: grid; justify-items: center; }
.dots { position: relative; width: min(100%, 380px); aspect-ratio: 1; }
.dots-ring { position: absolute; inset: 0; }
.dots-ring span {
  position: absolute; width: 8px; height: 8px;
  margin: -4px 0 0 -4px; border-radius: 50%;
  background: var(--mint);
}
.dots.is-animating .dots-ring span {
  opacity: 0; transform: scale(0.4);
  animation: dot-in 420ms var(--ease) forwards;
}
@keyframes dot-in { to { opacity: 1; transform: scale(1); } }

.dots-centre {
  position: absolute; inset: 16%;
  display: grid; align-content: center; justify-items: center;
  text-align: center; overflow-wrap: break-word;
}
.dots-label { margin: 0; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--slate); }
.dots-figure { margin: 0.25rem 0 0; font-size: clamp(2.75rem, 1.8rem + 4vw, 4.5rem); font-weight: 600; line-height: 0.9; letter-spacing: -0.06em; }
.dots-note { margin: var(--s2) 0 0; font-size: 0.875rem; font-weight: 500; }
.dots-sub { margin: 0.125rem 0 0; font-size: 0.75rem; color: var(--slate); }

/* Footer */
.foot {
  display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); justify-content: space-between;
  padding-top: var(--s3); border-top: 1px solid var(--rule);
  font-size: 0.8125rem; color: var(--slate);
}
.foot p { margin: 0; }
.foot a { font-weight: 600; }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-figure { justify-items: start; }
  .dots { width: min(100%, 300px); }
  .dots-centre { inset: 14%; }
}

@media (max-width: 480px) {
  .pg-lockup { height: 52px; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important; animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}
