/* WinWin Partners, the case page (cases/winwin-partners.html).

   The portfolio's voice in the colours and forms of the landing page I designed. David's: the bold line
   with a cushion, Neue Haas for what he says, Satoshi for reading, the orange close. The page's: deep
   green, pitch green and chalk, plum as the second direction, the lime highlighter, Bricolage Grotesque
   for card titles, Plus Jakarta Sans on buttons and labels, round panels, numbered badges and wavy edges
   between sections. The odd couple: a W made of two Vs, one per colour direction, on the cushion. */

.case--winwin-partners {
  --ww-deep: #003b2a;
  --ww-green: #007a4c;
  --ww-green-deep: #00653f;
  --ww-plum: #64296b;
  --ww-chalk: #f4f4ee;
  --ww-charcoal: #191d1b;
  --ww-ink: #0f1a15;
  --ww-lime: #d4ff3a;
  --ww-title: "Bricolage Grotesque", var(--font-display);
  --ww-ui: "Plus Jakarta Sans", var(--font-body);
  --ww-shadow: 0 1.75rem 3.5rem -1.75rem rgb(0 40 28 / 0.4);
}

.case--winwin-partners [data-theme="dark"] {
  --bg: var(--ww-deep);
  --fg: var(--ww-chalk);
  --fg-muted: rgb(244 244 238 / 0.72);
  --room: var(--ww-deep);
}

.case--winwin-partners [data-theme="light"] {
  --bg: var(--ww-chalk);
  --fg: var(--ww-ink);
  --fg-muted: rgb(15 26 21 / 0.68);
  --room: var(--bg);
  background: var(--bg);
  color: var(--fg);
}

.case--winwin-partners [data-theme="green"],
.case--winwin-partners [data-theme="charcoal"] {
  --bg: var(--ww-green);
  --fg: #ffffff;
  --fg-muted: rgb(255 255 255 / 0.92);
  background: var(--bg);
  color: var(--fg);
}

.case--winwin-partners [data-theme="charcoal"] {
  --bg: var(--ww-charcoal);
  --fg-muted: rgb(255 255 255 / 0.7);
}

.case--winwin-partners ::selection {
  background: var(--ww-lime);
  color: var(--ww-ink);
}

.case--winwin-partners :focus-visible {
  outline-color: var(--ww-lime);
  border-radius: 10px;
}

/* The lime highlighter under the words that matter, as on "They want customers." */
.ww mark {
  padding-inline: 0.05em;
  background: linear-gradient(transparent 62%, var(--ww-lime) 62%, var(--ww-lime) 90%, transparent 90%);
  color: inherit;
}

.ww-section {
  position: relative;
  margin-inline: calc(var(--gutter) * -1);
  padding: clamp(5rem, 10vw, 9rem) var(--gutter);
}

/* A wavy top edge, in the colour of the section it starts */
.ww-wave {
  position: absolute;
  left: 0;
  bottom: calc(100% - 1px);
  width: 100%;
  height: clamp(1.75rem, 4vw, 4rem);
  fill: var(--bg);
}

.ww-title {
  margin: 0 0 clamp(2.5rem, 5vw, 4.5rem);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 5.5rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.ww-title--center {
  text-align: center;
}

/* The page's button: pitch green, rounded, Plus Jakarta Sans */
.ww-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 44px;
  padding: 0.85em 1.4em;
  border-radius: 10px;
  background: var(--ww-green);
  color: #fff;
  font-family: var(--ww-ui);
  font-size: 0.9375rem;
  font-weight: 700;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.ww-button:hover {
  background: var(--ww-green-deep);
}

.ww-button svg {
  width: 1em;
  height: 1em;
  transition: translate 0.3s var(--ease-out);
}

.ww-button:hover svg {
  translate: 0.15em 0;
}

.ww-hero .ww-button:hover svg {
  translate: 0 0.15em;
}

.ww-button--chalk {
  background: var(--ww-chalk);
  color: var(--ww-ink);
}

.ww-button--chalk:hover {
  background: var(--ww-lime);
}

/* ------------------------------------------------------------------ 1. The opening */

.ww-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: clamp(1.25rem, 2.2vw, 2rem);
  padding-top: clamp(6.5rem, 11vw, 9.5rem);
  text-align: center;
  background: radial-gradient(70% 60% at 50% 0%, rgb(0 122 76 / 0.35), transparent 70%);
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}

.ww-crumbs {
  display: flex;
  gap: 0.6em;
  color: var(--fg-muted);
  font-family: var(--ww-ui);
  font-size: 0.8125rem;
  font-weight: 600;
}

.ww-crumbs a {
  color: var(--fg);
  transition: color 0.2s var(--ease-out);
}

.ww-crumbs a:hover {
  color: var(--ww-lime);
}

.ww-hero__name {
  width: 100%;
  margin-top: clamp(0.25rem, 1.5vw, 1.25rem);
}

.cushion--ww svg {
  width: 74%;
  height: 74%;
}

.ww-hero__statement {
  max-width: 22ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 4.5rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.ww-hero__statement mark {
  background: linear-gradient(transparent 70%, var(--ww-lime) 70%, var(--ww-lime) 88%, transparent 88%);
}

.ww-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.ww-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
  margin: 0.5rem 0 0;
  font-family: var(--ww-ui);
  font-size: 0.875rem;
}

/* The facts as the page's rounded chips */
.ww-facts div {
  display: flex;
  gap: 0.45em;
  padding: 0.5em 1em;
  border-radius: 10px;
  background: rgb(244 244 238 / 0.09);
}

.ww-facts dt {
  color: var(--ww-lime);
  font-weight: 700;
}

.ww-facts dd {
  margin: 0;
  color: var(--fg-muted);
}

/* The product panel of the hero, overlapping the edge into the next section */
.ww-cover {
  position: relative;
  z-index: 1;
  margin: clamp(2.5rem, 5vw, 4.5rem) auto calc(clamp(6rem, 14vw, 13rem) * -1);
  max-width: 76rem;
}

.ww-cover__panel {
  position: relative;
  padding: clamp(0.5rem, 1vw, 0.85rem);
  border-radius: clamp(1.25rem, 2.4vw, 2rem);
  background: var(--ww-chalk);
  box-shadow: 0 3rem 6rem -2.5rem rgb(0 0 0 / 0.6);
}

.ww-cover__panel > img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(0.9rem, 1.8vw, 1.5rem);
}

.ww-cover__phone {
  position: absolute;
  right: clamp(-0.5rem, -1vw, -1rem);
  bottom: clamp(-1.5rem, -3vw, -2.5rem);
  width: clamp(5.5rem, 16%, 12rem);
  padding: 0.35rem;
  border-radius: clamp(1rem, 2.2vw, 2rem);
  background: var(--ww-ink);
  box-shadow: 0 2rem 3rem -1.5rem rgb(0 0 0 / 0.6);
}

.ww-cover__phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(0.75rem, 1.8vw, 1.65rem);
}

.ww-cover figcaption {
  position: relative;
  margin-top: clamp(2rem, 4vw, 3.5rem);
  color: var(--ww-ink);
  font-family: var(--ww-ui);
  font-size: 0.8125rem;
  text-align: center;
  opacity: 0.68;
}

/* ------------------------------------------------------------------ 2. The brief */

.ww-brief {
  padding-top: clamp(9rem, 18vw, 17rem);
}

.ww-moves {
  display: grid;
  gap: clamp(3rem, 7vw, 6.5rem);
  max-width: 76rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

/* The moves zigzag: picture right, left, right */
.ww-move {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2rem var(--gutter);
  align-items: center;
}

.ww-move__text {
  grid-column: 1 / 6;
  display: grid;
  justify-items: start;
  gap: 0.9rem;
}

.ww-move img {
  grid-column: 6 / 13;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.5rem;
  box-shadow: var(--ww-shadow);
}

.ww-move:nth-child(2) .ww-move__text {
  grid-column: 8 / 13;
  grid-row: 1;
}

.ww-move:nth-child(2) img {
  grid-column: 1 / 8;
  grid-row: 1;
}

/* The numbered badge of the page's steps */
.ww-badge {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: var(--ww-green);
  color: #fff;
  font-family: var(--ww-ui);
  font-size: 0.875rem;
  font-weight: 700;
}

.ww-move h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.8vw, 3rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.ww-move p {
  max-width: 44ch;
  margin: 0;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ------------------------------------------------------------------ 3. The idea */

.ww-idea {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  padding-top: 0;
  text-align: center;
}

.ww-idea__line {
  max-width: 16ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6.4vw, 7rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.ww-idea p {
  margin: 0;
  color: var(--fg-muted);
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
}

/* ------------------------------------------------------------------ 4. What I did */

.ww-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
  max-width: 76rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.ww-toolkit .ww-title {
  max-width: 76rem;
  margin-inline: auto;
}

.ww-tile {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  min-height: 15rem;
  padding: clamp(1.5rem, 2.4vw, 2.25rem);
  border-radius: 1.25rem;
  background: #f7faf7;
  color: var(--ww-ink);
  box-shadow: 0 1.25rem 2.5rem -1.5rem rgb(0 0 0 / 0.35);
}

.ww-tile--photo {
  position: relative;
  grid-row: span 2;
  padding: 0;
  overflow: hidden;
}

.ww-tile--photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ww-tile--dark {
  grid-column: 1 / -1;
  min-height: 0;
  background: #052a1c;
  color: #fff;
}

.ww-icon {
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 1rem;
  fill: none;
  stroke: var(--ww-green);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ww-tile--dark .ww-icon {
  stroke: var(--ww-lime);
}

.ww-tile h3 {
  margin: 0;
  font-family: var(--ww-title);
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.ww-tile p {
  margin: 0;
  color: rgb(15 26 21 / 0.7);
  line-height: 1.55;
}

.ww-tile--dark p {
  color: rgb(255 255 255 / 0.75);
}

/* ------------------------------------------------------------------ 5. Two colours */

.ww-colours .ww-title {
  margin-bottom: 1rem;
}

.ww-colours .ww-title span {
  color: var(--ww-plum);
}

.ww-colours__lead {
  max-width: 36rem;
  margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
  color: var(--fg-muted);
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  text-align: center;
}

/* ------------------------------------------------------------------ 6. What the client said */

.ww-saying .ww-title,
.ww-saying__grid {
  max-width: 76rem;
  margin-inline: auto;
}

.ww-saying__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2rem var(--gutter);
  align-items: center;
}

.ww-saying__text {
  grid-column: 1 / 6;
  display: grid;
  gap: 1rem;
}

.ww-saying__text p {
  margin: 0;
  color: var(--fg-muted);
  font-size: clamp(1rem, 1.2vw, 1.1875rem);
  line-height: 1.6;
}

/* The quote card of "What clubs are saying", with its lime quote mark */
.ww-quote {
  grid-column: 7 / 13;
  margin: 0;
  padding: clamp(1.75rem, 3.5vw, 3rem);
  border-radius: 1.5rem;
  background: #232a26;
}

.ww-quote__mark {
  width: 3rem;
  height: 2.25rem;
  fill: var(--ww-lime);
}

.ww-quote blockquote {
  margin: 1.25rem 0 0;
}

.ww-quote blockquote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 3rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.ww-quote figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin-top: 1.5rem;
  color: var(--fg-muted);
  font-family: var(--ww-ui);
  font-size: 0.875rem;
}

.ww-quote figcaption b {
  color: #fff;
}

.ww-stars {
  display: inline-flex;
  gap: 0.15rem;
}

.ww-stars svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: var(--vivid);
}

/* ------------------------------------------------------------------ 7. Next project */

.ww-next {
  display: grid;
  justify-items: center;
  gap: 1rem;
  text-align: center;
}

.ww-next__name {
  display: grid;
  justify-items: center;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7.4vw, 8rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.ww-next__name span {
  margin-bottom: 0.5em;
  font-family: var(--ww-ui);
  font-size: max(0.9375rem, 0.16em);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ww-lime);
}

.ww-next__line {
  max-width: 40ch;
  margin: 0 0 0.75rem;
  color: var(--fg-muted);
  line-height: 1.55;
}

@media (max-width: 960px) {
  .ww-move__text,
  .ww-move img,
  .ww-move:nth-child(2) .ww-move__text,
  .ww-move:nth-child(2) img,
  .ww-saying__text,
  .ww-quote {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .ww-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .ww-hero__statement {
    font-size: 8.4vw;
  }

  .ww-hero .ww-button {
    flex: 1 1 100%;
  }

  .ww-facts {
    display: grid;
    gap: 0.35rem;
  }

  .ww-facts div {
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
  }

  .ww-cover__phone {
    right: 0.5rem;
    bottom: -1rem;
    width: 26%;
  }

  .ww-tiles {
    grid-template-columns: minmax(0, 1fr);
  }

  .ww-tile {
    min-height: 0;
  }

  .ww-tile--photo {
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }
}

/* Body copy without a word left alone on its last line */
.case--winwin-partners p {
  text-wrap: pretty;
}

/* ------------------------------------------------------------------ Two colours, as one still sheet

   The two directions side by side in the page's round panels, cut at the same height; each
   label carries its colour */
.mosaic--ww {
  --mosaic-radius: 1.5rem;
  --mosaic-shadow: var(--ww-shadow);
  --mosaic-chip-bg: var(--ww-ink);
  --mosaic-chip-radius: 10px;
  max-width: 76rem;
  margin-inline: auto;
}

.mosaic--ww .mosaic__label {
  font-family: var(--ww-ui);
  font-size: 0.875rem;
}

@media (min-width: 701px) {
  .mosaic--ww {
    --mosaic-cols: repeat(2, minmax(0, 1fr));
    --mosaic-areas: "a b";
    --mosaic-row: clamp(26rem, 44vw, 44rem);
  }

  .mosaic--ww .mosaic__tile:nth-child(1) { grid-area: a; }
  .mosaic--ww .mosaic__tile:nth-child(2) { grid-area: b; }
}
