/* What we do page. Builds on style.css (fonts, colours, scene canvas);
   unlike the home page this one scrolls when the content needs it. */

html,
body.wwd-page {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: auto;
}
body.wwd-page {
  position: static;
  touch-action: auto;
}

/* Dims the scene a touch so the grid stays readable. */
.wwd-shade {
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 8, 7, 0.55), rgba(10, 8, 7, 0.25) 60%, rgba(10, 8, 7, 0.45));
  pointer-events: none;
}

/* All text blends with the scene like the home page. No transform, opacity
   or z-index on this wrapper, so the blend reaches the canvas. */
.wwd {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: calc(22px + env(safe-area-inset-top, 0px)) var(--pad-x) calc(24px + env(safe-area-inset-bottom, 0px));
  color: var(--fg);
  mix-blend-mode: difference;
  pointer-events: none;
}
.wwd a {
  pointer-events: auto;
  color: inherit;
  text-decoration: none;
}

/* ------------------------------------------------------------ header */
.wwd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wwd-logo {
  display: block;
  width: 190px;
  aspect-ratio: 5436 / 900;
  background: currentColor;
  -webkit-mask: url('../logo.svg') no-repeat center / contain;
  mask: url('../logo.svg') no-repeat center / contain;
}
.wwd-back,
.wwd-footer,
.wwd-kicker,
.wwd-tag {
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.wwd-back:hover,
.wwd-back:focus-visible,
.wwd-footer a:hover,
.wwd-footer a:focus-visible {
  color: var(--brand);
}
.wwd a:focus-visible {
  outline: 1px solid var(--brand);
  outline-offset: 4px;
}

/* ------------------------------------------------------------ hero */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(16px, 3vh, 48px) 0;
}
.wwd-hero {
  max-width: 900px;
  margin-bottom: clamp(24px, 4vh, 48px);
}
.wwd-kicker {
  margin: 0 0 14px;
  color: var(--brand);
}
.wwd-title {
  margin: 0;
  font-weight: 400;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1;
  letter-spacing: -0.035em;
}
.wwd-lead {
  margin: 14px 0 0;
  max-width: 640px;
  font-size: 18px;
  line-height: 1.45;
}

/* ------------------------------------------------------------ grid */
.wwd-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vh, 36px) 32px;
}
.wwd-grid li {
  padding-top: 14px;
  border-top: 1px solid rgba(207, 222, 229, 0.28);
}
.wwd-num {
  margin-right: 12px;
  font-size: 14px;
  color: var(--brand);
}
.wwd-grid p {
  margin: 12px 0 0;
  max-width: 38ch;
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* ------------------------------------------------------------ footer */
.wwd-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.wwd-footer p {
  margin: 0;
}

/* ------------------------------------------------------------ reveal */
/* Ends at transform: none / opacity: 1 so nothing stays isolated from the
   difference blend once the animation finishes. */
@keyframes wwd-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.wwd-hero > *,
.wwd-grid li {
  animation: wwd-rise 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.wwd-hero > :nth-child(1) { animation-delay: 150ms; }
.wwd-hero > :nth-child(2) { animation-delay: 220ms; }
.wwd-hero > :nth-child(3) { animation-delay: 320ms; }
.wwd-grid li:nth-child(1) { animation-delay: 420ms; }
.wwd-grid li:nth-child(2) { animation-delay: 480ms; }
.wwd-grid li:nth-child(3) { animation-delay: 540ms; }
.wwd-grid li:nth-child(4) { animation-delay: 600ms; }
.wwd-grid li:nth-child(5) { animation-delay: 660ms; }
.wwd-grid li:nth-child(6) { animation-delay: 720ms; }
.wwd-grid li:nth-child(7) { animation-delay: 780ms; }
.wwd-grid li:nth-child(8) { animation-delay: 840ms; }
.wwd-grid li:nth-child(9) { animation-delay: 900ms; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1024px) {
  .wwd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .wwd-logo {
    width: 150px;
  }
  .wwd-back,
  .wwd-footer,
  .wwd-kicker,
  .wwd-tag {
    font-size: 12px;
  }
  .wwd-lead {
    font-size: 16px;
  }
  .wwd-grid {
    grid-template-columns: 1fr;
  }
  .wwd-grid p {
    font-size: 16px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wwd-hero > *,
  .wwd-grid li {
    animation: none;
  }
}
