/* The Guru, the case page (cases/the-guru.html).

   The portfolio's voice in the brand's colours and forms. David's: the bold line with a cushion, Neue
   Haas for what he says, Satoshi for reading, the orange close. The brand's: cinematic covers that end in
   a curve, petrol blue and saffron, stone, Cinzel in spaced capitals, Outfit on card titles and buttons,
   white cards with a soft shadow, saffron buttons barely rounded. The odd couple: a sun rising over the
   horizon on a puffy cushion, in front of a dark forest. */

.case--the-guru {
  --guru-petrol: #01425e;
  --guru-petrol-deep: #012f43;
  --guru-saffron: #f4b429;
  --guru-saffron-deep: #e0a11a;
  --guru-stone: #ece8e2;
  --guru-ink: #10222b;
  --guru-caps: "Cinzel", Georgia, serif;
  --guru-ui: "Outfit", var(--font-body);
  --guru-shadow: 0 1.5rem 3rem -1.5rem rgb(1 47 67 / 0.3);
}

.case--the-guru [data-theme="dark"] {
  --bg: var(--guru-petrol-deep);
  --fg: #ffffff;
  --fg-muted: rgb(255 255 255 / 0.74);
  --room: var(--guru-petrol-deep);
}

.case--the-guru [data-theme="light"],
.case--the-guru [data-theme="stone"] {
  --bg: #ffffff;
  --fg: var(--guru-ink);
  --fg-muted: rgb(16 34 43 / 0.7);
  --room: var(--bg);
  background: var(--bg);
  color: var(--fg);
}

.case--the-guru [data-theme="stone"] {
  --bg: var(--guru-stone);
}

.case--the-guru ::selection {
  background: var(--guru-saffron);
  color: var(--guru-ink);
}

.case--the-guru :focus-visible {
  outline-color: var(--guru-saffron);
}

.guru-section {
  margin-inline: calc(var(--gutter) * -1);
  padding: clamp(4.5rem, 9vw, 8rem) var(--gutter);
}

/* The centred heading of the site, in petrol blue: here in David's voice */
.guru-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 5.25rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.04em;
  text-align: center;
  color: var(--guru-petrol);
  text-wrap: balance;
}

.guru-heading.guru-heading--light {
  color: #fff;
}

/* Cinzel in spaced capitals, as the site's cover titles */
.guru-display {
  margin: 0;
  font-family: var(--guru-caps);
  font-size: clamp(2.5rem, 6vw, 6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.guru-caps {
  font-family: var(--guru-caps);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guru-sub {
  max-width: 40rem;
  margin: 1rem auto clamp(2.5rem, 5vw, 4rem);
  color: var(--fg-muted);
  font-family: var(--guru-ui);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  font-weight: 600;
  text-align: center;
}

/* The site's button: saffron, barely rounded, Outfit in capitals */
.guru-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 44px;
  padding: 0.85em 1.4em;
  border: 1.5px solid var(--guru-saffron);
  border-radius: 4px;
  background: var(--guru-saffron);
  color: var(--guru-petrol-deep);
  font-family: var(--guru-ui);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.guru-button:hover {
  border-color: var(--guru-saffron-deep);
  background: var(--guru-saffron-deep);
}

.guru-button svg {
  width: 1em;
  height: 1em;
  transition: translate 0.3s var(--ease-out);
}

.guru-button:hover svg {
  translate: 0.12em -0.12em;
}

.guru-button--ghost {
  background: transparent;
  border-color: rgb(255 255 255 / 0.7);
  color: #fff;
}

.guru-button--ghost:hover {
  background: rgb(255 255 255 / 0.12);
  border-color: #fff;
}

/* ------------------------------------------------------------------ 1. The cover */

.guru-cover,
.guru-next {
  position: relative;
  overflow: hidden;
  margin-inline: calc(var(--gutter) * -1);
  background: #0d0905;
  /* The curved bottom edge of every cover on the site */
  clip-path: ellipse(120% 100% at 50% 0%);
}

.guru-cover__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 40%;
  filter: brightness(1.7) saturate(1.15);
}

/* Around the curves of the covers, the white of the page shows */
.case--the-guru article.guru {
  background: #fff;
}

.guru-cover::after,
.guru-next::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 70% at 50% 45%, rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.5)),
    linear-gradient(to bottom, rgb(1 47 67 / 0.45), transparent 35%);
}

.guru-cover__inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: clamp(1.25rem, 2.2vw, 2rem);
  padding: clamp(6.5rem, 11vw, 9.5rem) var(--gutter) clamp(7rem, 12vw, 11rem);
  text-align: center;
}

.guru-crumbs {
  display: flex;
  gap: 0.7em;
  font-family: var(--guru-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.76);
}

.guru-crumbs a {
  color: var(--guru-saffron);
  transition: color 0.2s var(--ease-out);
}

.guru-crumbs a:hover {
  color: #fff;
}

.guru-cover__name {
  width: 100%;
  color: #fff;
}

.cushion--guru svg {
  width: 74%;
  height: 74%;
}

/* David's words, and the turn in the site's spaced Cinzel capitals */
.guru-cover__statement {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  color: #fff;
}

.guru-cover__statement span:first-child {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.6vw, 4rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.guru-cover__statement span:last-child {
  font-family: var(--guru-caps);
  font-size: clamp(0.9375rem, 1.5vw, 1.375rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--guru-saffron);
}

.guru-cover__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ------------------------------------------------------------------ Under the curve */

.guru-intro {
  display: grid;
  justify-items: center;
  gap: 1rem;
  text-align: center;
}

.guru-intro__bold {
  max-width: 44rem;
  margin: 0;
  font-family: var(--guru-ui);
  font-size: clamp(1.0625rem, 1.4vw, 1.375rem);
  font-weight: 700;
  line-height: 1.4;
}

/* The facts on the cover, as a strip outlined in saffron with the labels in Cinzel */
.guru-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 62rem);
  margin: 0.75rem 0 0;
  border: 1.5px solid rgb(244 180 41 / 0.75);
  border-radius: 6px;
  background: rgb(1 47 67 / 0.45);
  backdrop-filter: blur(6px);
  font-size: 0.875rem;
  text-align: left;
  color: #fff;
}

.guru-facts div {
  display: grid;
  align-content: start;
  gap: 0.3rem;
  padding: 0.9rem 1.1rem;
}

.guru-facts div + div {
  border-left: 1px solid rgb(244 180 41 / 0.35);
}

.guru-facts dt {
  font-family: var(--guru-caps);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--guru-saffron);
}

.guru-facts dd {
  margin: 0;
  line-height: 1.4;
}

.guru-facts a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--guru-saffron);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.guru-screens {
  position: relative;
  width: min(100%, 72rem);
  margin: clamp(2rem, 4vw, 3.5rem) 0 0;
  padding: 0 clamp(2rem, 8vw, 8rem) clamp(2rem, 4vw, 3rem) 0;
}

.guru-screens__desktop img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2.5rem 5rem -2.5rem rgb(1 47 67 / 0.55);
}

.guru-screens__phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: clamp(5.5rem, 19%, 13rem);
  padding: 0.4rem;
  border-radius: 1.75rem;
  background: var(--guru-ink);
  box-shadow: 0 2rem 3.5rem -1.5rem rgb(1 47 67 / 0.6);
}

.guru-screens__phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.4rem;
}

/* ------------------------------------------------------------------ 2. The brief */

.guru-brief__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1rem, 2.4vw, 2rem);
  align-items: stretch;
  max-width: 76rem;
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
}

.guru-card {
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--guru-shadow);
}

.guru-brief__card {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2.75rem);
}

.guru-brief__card .guru-caps {
  margin: 0 0 0.5rem;
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);
  color: var(--guru-petrol);
}

.guru-brief__card p:not([class]) {
  margin: 0;
  color: var(--fg-muted);
  line-height: 1.6;
}

.guru-brief__photo {
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: var(--guru-shadow);
}

.guru-brief__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ------------------------------------------------------------------ 3. What I did */

.guru-events {
  display: grid;
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
  max-width: 64rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

/* The talk card: picture on the left, title in capitals, chips, a line */
.guru-event {
  display: grid;
  grid-template-columns: clamp(9rem, 26%, 16rem) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
  align-items: center;
  padding: 0.6rem clamp(1rem, 2vw, 1.75rem) 0.6rem 0.6rem;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--guru-shadow);
  transition: translate 0.4s var(--ease-out);
}

.guru-event:hover {
  translate: 0 -3px;
}

.guru-event img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
}

.guru-event h3 {
  margin: 0;
  font-family: var(--guru-ui);
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--guru-petrol);
}

.guru-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.55rem 0;
}

.guru-chips span {
  padding: 0.3em 0.65em;
  border-radius: 4px;
  background: rgb(244 180 41 / 0.22);
  color: #6b4b00;
  font-family: var(--guru-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.guru-event p:not([class]) {
  margin: 0;
  color: var(--fg-muted);
  line-height: 1.55;
}

/* ------------------------------------------------------------------ 4. Every section */

.guru-channel .guru-sub {
  color: var(--fg-muted);
}

/* ------------------------------------------------------------------ 5. The result */

/* The contact card of the site, outlined in saffron */
.guru-frame {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 4.5rem);
  border: 3px solid var(--guru-saffron);
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: var(--guru-shadow);
  text-align: center;
}

.guru-frame p {
  max-width: 54ch;
  margin: 0;
  color: var(--fg-muted);
  font-size: clamp(1rem, 1.25vw, 1.1875rem);
  line-height: 1.6;
}

.guru-frame .guru-frame__note {
  padding-top: 1.25rem;
  border-top: 1px solid rgb(16 34 43 / 0.12);
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------------ 6. Next project */

.guru-next {
  clip-path: ellipse(120% 100% at 50% 100%);
}

.guru-next__inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  padding: clamp(7rem, 12vw, 11rem) var(--gutter) clamp(5rem, 9vw, 8rem);
  text-align: center;
  color: #fff;
}

.guru-next__name {
  display: grid;
  justify-items: center;
  max-width: 14ch;
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7.6vw, 8rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

/* "Next project", in the cover titles' spaced Cinzel, above the name it belongs to */
.guru-next__name span {
  margin-bottom: 1rem;
  font-family: var(--guru-caps);
  font-size: clamp(0.9375rem, 1.4vw, 1.25rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--guru-saffron);
}

@media (max-width: 960px) {
  .guru-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guru-facts div:nth-child(3) {
    border-left: 0;
  }

  .guru-facts div:nth-child(n + 3) {
    border-top: 1px solid rgb(244 180 41 / 0.35);
  }

  .guru-brief__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .guru-cover,
  .guru-next {
    clip-path: ellipse(190% 100% at 50% 0%);
  }

  .guru-next {
    clip-path: ellipse(190% 100% at 50% 100%);
  }

  .guru-cover .guru-button {
    flex: 1 1 100%;
  }

  .guru-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .guru-facts div + div,
  .guru-facts div:nth-child(n) {
    border-left: 0;
    border-top: 1px solid rgb(244 180 41 / 0.35);
  }

  .guru-facts div:first-child {
    border-top: 0;
  }

  .guru-screens {
    padding-right: 1.75rem;
  }

  .guru-screens__phone {
    width: 27%;
    padding: 0.25rem;
    border-radius: 1rem;
  }

  .guru-screens__phone img {
    border-radius: 0.8rem;
  }

  .guru-event {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.6rem 0.6rem 1.25rem;
  }

  .guru-event > div {
    padding-inline: 0.6rem;
  }
}

/* Body copy without a word left alone on its last line */
.case--the-guru p {
  text-wrap: pretty;
}

/* ------------------------------------------------------------------ Every section, as one still sheet

   Four pages on a computer and three on a phone, the talks page large; rounded like the site's cards, labels
   in saffron with Outfit capitals */
.mosaic--guru {
  --mosaic-radius: 8px;
  --mosaic-ground: var(--guru-petrol);
  --mosaic-shadow: 0 1.5rem 3rem -1.5rem rgb(0 0 0 / 0.6);
  --mosaic-chip-bg: var(--guru-saffron);
  --mosaic-chip-fg: var(--guru-petrol-deep);
  --mosaic-chip-radius: 4px;
  --mosaic-first-rows-small: 1;
  max-width: 76rem;
  margin-inline: auto;
}

.mosaic--guru .mosaic__label {
  font-family: var(--guru-ui);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (min-width: 701px) {
  .mosaic--guru {
    --mosaic-cols: repeat(4, minmax(0, 1fr));
    --mosaic-areas: "a a b e" "a a c e" "d d f g" "d d f g";
    --mosaic-row: clamp(8.5rem, 12vw, 12.5rem);
  }

  .mosaic--guru .mosaic__tile:nth-child(1) { grid-area: a; }
  .mosaic--guru .mosaic__tile:nth-child(2) { grid-area: b; }
  .mosaic--guru .mosaic__tile:nth-child(3) { grid-area: c; }
  .mosaic--guru .mosaic__tile:nth-child(4) { grid-area: d; }
  .mosaic--guru .mosaic__tile:nth-child(5) { grid-area: e; }
  .mosaic--guru .mosaic__tile:nth-child(6) { grid-area: f; }
  .mosaic--guru .mosaic__tile:nth-child(7) { grid-area: g; }
}
