/* VisiBroad, the case page (cases/visibroad.html).

   The portfolio's voice in VisiBroad's colours and forms. David's: the bold line with a cushion, Neue
   Haas for what he says, Satoshi for reading, the orange close. VisiBroad's: paper, ink and signal red,
   Yanone Kaffeesatz in capitals for the loud lines, Oswald on buttons and labels, corners barely rounded,
   the slanted red band, the red block with white cards and the black footer with its curved top edge.
   The odd couple: the logo's V turned into a puffy cushion that starts the name. */

.case--visibroad {
  --vb-ink: #111111;
  --vb-paper: #f4f1ec;
  --vb-red: #c4441f; /* VisiBroad's #d84d2b, a shade deeper so text on white and white on it reach 4.5:1 */
  --vb-red-deep: #a8391a;
  --vb-red-on-dark: #ef7656;
  --vb-loud: "Yanone Kaffeesatz", "Oswald", sans-serif;
  --vb-label: "Oswald", var(--font-body);
  --vb-shadow: 0 1.75rem 3.5rem -1.75rem rgb(17 17 17 / 0.3);
}

.case--visibroad [data-theme="light"],
.case--visibroad [data-theme="paper"] {
  --bg: #ffffff;
  --fg: var(--vb-ink);
  --fg-muted: rgb(17 17 17 / 0.66);
  --room: var(--bg);
  background: var(--bg);
  color: var(--fg);
}

.case--visibroad [data-theme="paper"] {
  --bg: var(--vb-paper);
}

.case--visibroad [data-theme="dark"] {
  --bg: var(--vb-ink);
  --fg: #ffffff;
  --fg-muted: rgb(255 255 255 / 0.66);
  --room: var(--vb-ink);
}

.case--visibroad [data-theme="red"] {
  --bg: var(--vb-red);
  --fg: #ffffff;
  --fg-muted: #fff;
  background: var(--bg);
  color: var(--fg);
}

.case--visibroad ::selection {
  background: var(--vb-red);
  color: #fff;
}

.case--visibroad :focus-visible {
  outline-color: var(--vb-red);
}

.vb-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.vb-section {
  margin-inline: calc(var(--gutter) * -1);
  padding: clamp(4.5rem, 9vw, 8rem) var(--gutter);
}

/* VisiBroad's loud line: Yanone Kaffeesatz in capitals, tight */
.vb-loud {
  margin: 0;
  font-family: var(--vb-loud);
  font-size: clamp(2.75rem, 5.6vw, 6rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* Section headings stay in David's voice */
.vb-title {
  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-wrap: balance;
}

/* VisiBroad's button: signal red, Oswald capitals, corners barely rounded */
.vb-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 44px;
  padding: 0.95em 1.5em;
  border-radius: 4px;
  background: var(--vb-red);
  color: #fff;
  font-family: var(--vb-label);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background-color 0.2s var(--ease-out);
}

.vb-button:hover {
  background: var(--vb-red-deep);
}

.vb-button svg {
  width: 1em;
  height: 1em;
  transition: translate 0.3s var(--ease-out);
}

.vb-button:hover svg {
  translate: 0.12em -0.12em;
}

/* ------------------------------------------------------------------ 1. The opening */

.vb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  padding-top: clamp(6.5rem, 11vw, 9.5rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

.vb-crumbs {
  display: flex;
  gap: 0.6em;
  color: var(--fg-muted);
  font-family: var(--vb-label);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vb-crumbs a {
  color: var(--fg);
  transition: color 0.2s var(--ease-out);
}

.vb-crumbs a:hover {
  color: var(--vb-red);
}

/* The name starts with the logo's V, on the cushion, then "isiBroad" in David's voice */
.vb-hero__name {
  justify-content: flex-start;
  gap: 0.04em;
  margin-top: clamp(0.25rem, 1.5vw, 1.25rem);
}

.cushion--vb {
  width: 0.78em;
  height: 0.78em;
}

.cushion--vb svg {
  width: 76%;
  height: 76%;
}

.vb-hero__body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2rem var(--gutter);
  align-items: start;
}

.vb-hero__lead {
  grid-column: 1 / 9;
  display: grid;
  justify-items: start;
  gap: clamp(1rem, 1.8vw, 1.5rem);
}

.vb-hero__statement {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3.9vw, 4.5rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.vb-hero__statement span:last-child {
  color: var(--vb-red);
}

.vb-hero__text {
  max-width: 34rem;
  margin: 0;
  color: var(--fg-muted);
  font-size: clamp(1rem, 1.2vw, 1.1875rem);
  line-height: 1.55;
}

.vb-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem var(--gutter);
  width: 100%;
  margin: clamp(1rem, 2.5vw, 2rem) 0 0;
}

/* The facts as the fields of VisiBroad's form: a label above an outlined box */
.vb-facts dt {
  font-family: "Poppins", var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
}

.vb-facts dd {
  margin: 0.4rem 0 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgb(17 17 17 / 0.55);
  border-radius: 2px;
  background: #fff;
  font-size: 0.875rem;
  line-height: 1.45;
}

.vb-hero__phone {
  grid-column: 9 / 13;
  justify-self: center;
  width: min(100%, 17rem);
  margin: 0;
  rotate: 6deg;
}

/* The phone of VisiBroad's hero: dark titanium frame, leaning */
.vb-phone {
  padding: 0.5rem;
  border-radius: 2.4rem;
  background: linear-gradient(145deg, #3a3a3a, #111 60%);
  box-shadow: 0 2.5rem 4.5rem -2rem rgb(17 17 17 / 0.55), inset 0 0 0 1px rgb(255 255 255 / 0.08);
}

.vb-phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.9rem;
}

/* ------------------------------------------------------------------ 2. The brief */

/* The slanted red band: the top and bottom edges lean like visibroad.com's */
.vb-band {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  margin-inline: calc(var(--gutter) * -1);
  padding: clamp(5rem, 11vw, 10rem) var(--gutter);
  clip-path: polygon(0 4vw, 100% 0, 100% calc(100% - 3vw), 0 100%);
  text-align: center;
}

.vb-band__line {
  max-width: 24ch;
  margin: 0;
  font-family: var(--vb-loud);
  font-size: clamp(2.25rem, 4.8vw, 5.25rem);
  font-weight: 700;
  line-height: 0.98;
  text-transform: uppercase;
  text-wrap: balance;
}

.vb-band__tag {
  margin: 0;
  font-family: var(--vb-label);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.vb-brief {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(2rem, 6vw, 6rem);
  max-width: 72rem;
  margin-inline: auto;
}

.vb-brief h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 2.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

.vb-brief p {
  max-width: 62ch;
  margin: 0;
  color: var(--fg-muted);
  font-size: clamp(1rem, 1.2vw, 1.1875rem);
  line-height: 1.6;
}

/* ------------------------------------------------------------------ 3. Before and after */

.vb-compare {
  padding-top: 0;
}

.vb-block {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  max-width: 82rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1rem, 4vw, 4rem) clamp(1.25rem, 4vw, 4rem);
  border-radius: 12px;
  background: var(--vb-red);
  color: #fff;
  text-align: center;
}

.vb-block > p {
  max-width: 40rem;
  margin: 0;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  color: #fff;
}

.vb-compare__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.5rem);
  width: 100%;
  margin-top: clamp(0.75rem, 2vw, 1.75rem);
}

/* The white cards of the platform logos, holding the first screen instead */
.vb-card {
  margin: 0;
  padding: clamp(0.5rem, 1vw, 0.85rem);
  border-radius: 8px;
  background: #fff;
  color: var(--vb-ink);
  box-shadow: 0 1.5rem 3rem -1.5rem rgb(0 0 0 / 0.45);
}

.vb-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid rgb(17 17 17 / 0.08);
}

.vb-card figcaption {
  padding: 0.85rem 0.25rem 0.25rem;
  font-family: var(--vb-label);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.vb-card:last-child figcaption {
  color: var(--vb-red);
}

/* ------------------------------------------------------------------ 4. What I did */

/* The form card of "Request your assessment" */
.vb-form {
  display: grid;
  gap: clamp(1.25rem, 2.4vw, 2rem);
  max-width: 64rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3.5rem);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--vb-shadow);
}

.vb-form .vb-title {
  font-size: clamp(2.25rem, 4vw, 4rem);
}

.vb-form__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem clamp(1rem, 2vw, 1.5rem);
  margin: 0;
}

.vb-form__wide {
  grid-column: 1 / -1;
}

.vb-form__fields dt {
  margin-bottom: 0.4rem;
  font-family: "Poppins", var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Each thing I did sits in a field, drawn like the form's inputs */
.vb-form__fields dd {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgb(17 17 17 / 0.55);
  border-radius: 2px;
  font-size: 0.9375rem;
  line-height: 1.5;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.vb-form__fields div:hover dd {
  border-color: var(--vb-red);
  box-shadow: inset 0 0 0 1px var(--vb-red);
}

.vb-button--bar {
  width: 100%;
}

.vb-form__note {
  margin: -0.5rem 0 0;
  color: var(--fg-muted);
  font-size: 0.8125rem;
  text-align: center;
}

/* ------------------------------------------------------------------ 5. Three screens */

.vb-devices__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem var(--gutter);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.vb-devices__head .vb-title {
  grid-column: 1 / 7;
}

.vb-devices__head p {
  grid-column: 8 / 13;
  max-width: 32rem;
  margin: 0;
  color: var(--fg-muted);
  font-size: clamp(1rem, 1.2vw, 1.1875rem);
  line-height: 1.55;
}

/* ------------------------------------------------------------------ 6. The result */

/* The black footer of visibroad.com, with its curved top edge */
.vb-footer {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  margin-inline: calc(var(--gutter) * -1);
  padding: clamp(7rem, 12vw, 11rem) var(--gutter) clamp(2rem, 4vw, 3rem);
  background: var(--vb-ink);
  clip-path: ellipse(160% 100% at 50% 100%);
}

.vb-footer__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2rem var(--gutter);
  align-items: start;
}

.vb-footer__text {
  grid-column: 1 / 6;
  display: grid;
  gap: 1rem;
}

.vb-footer__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 4rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.vb-footer__text p {
  max-width: 42ch;
  margin: 0;
  color: var(--fg-muted);
  line-height: 1.6;
}

.vb-footer__loud {
  grid-column: 7 / 13;
  justify-self: end;
  max-width: 9ch;
  margin: 0;
  font-family: var(--vb-loud);
  font-size: clamp(3.5rem, 8vw, 8.5rem);
  font-weight: 700;
  line-height: 0.9;
  text-align: right;
  text-transform: uppercase;
}

.vb-quote {
  max-width: 62rem;
  margin: 0;
}

.vb-quote blockquote {
  margin: 0;
}

.vb-quote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.875rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.vb-quote mark {
  background: none;
  color: var(--vb-red-on-dark);
}

.vb-quote figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin-top: 1.25rem;
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

.vb-quote figcaption b {
  color: #fff;
}

/* The stars stay the portfolio's orange, on the black */
.vb-stars {
  display: inline-flex;
  gap: 0.15rem;
}

.vb-stars svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: var(--vivid);
}

.vb-next {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.16);
}

.vb-next span {
  color: var(--fg-muted);
  font-family: var(--vb-label);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vb-next a {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  transition: color 0.2s var(--ease-out);
}

.vb-next a:hover {
  color: var(--vb-red-on-dark);
}

.vb-next svg {
  width: 0.7em;
  height: 0.7em;
  transition: translate 0.3s var(--ease-out);
}

.vb-next a:hover svg {
  translate: 0.12em 0;
}

@media (max-width: 960px) {
  .vb-hero__lead {
    grid-column: 1 / 8;
  }

  .vb-hero__phone {
    grid-column: 8 / 13;
  }

  .vb-devices__head .vb-title,
  .vb-devices__head p,
  .vb-footer__text,
  .vb-footer__loud {
    grid-column: 1 / -1;
  }

  .vb-footer__loud {
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 700px) {
  /* The name stays on one line: it is one word */
  .vb-hero__name {
    display: flex;
    font-size: var(--fit, 24vw);
  }

  .vb-hero__lead,
  .vb-hero__phone {
    grid-column: 1 / -1;
  }

  .vb-hero__phone {
    width: 62%;
    rotate: 4deg;
  }

  .vb-hero__statement {
    font-size: 8.6vw;
  }

  .vb-button {
    width: 100%;
  }

  .vb-facts,
  .vb-brief,
  .vb-compare__pair,
  .vb-form__fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .vb-band {
    clip-path: polygon(0 1.5rem, 100% 0, 100% calc(100% - 1.25rem), 0 100%);
  }

  .vb-footer {
    clip-path: ellipse(260% 100% at 50% 100%);
  }
}

/* Body copy without a word left alone on its last line */
.case--visibroad p {
  text-wrap: pretty;
}

/* ------------------------------------------------------------------ Three screens, as one still sheet

   The same page on a computer, a tablet and a phone, side by side at the widths they have (1440, 768 and
   390), each cut at the same height; labels in Oswald capitals, corners barely rounded */
.mosaic--vb {
  --mosaic-border: 1px solid rgb(17 17 17 / 0.12);
  --mosaic-radius: 6px;
  --mosaic-shadow: var(--vb-shadow);
  --mosaic-chip-bg: var(--vb-ink);
  --mosaic-chip-radius: 4px;
}

.mosaic--vb .mosaic__label {
  font-family: var(--vb-label);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (min-width: 701px) {
  .mosaic--vb {
    --mosaic-cols: 1440fr 768fr 390fr;
    --mosaic-areas: "a b c";
    --mosaic-row: clamp(26rem, 42vw, 42rem);
  }

  .mosaic--vb .mosaic__tile:nth-child(1) { grid-area: a; }
  .mosaic--vb .mosaic__tile:nth-child(2) { grid-area: b; }
  .mosaic--vb .mosaic__tile:nth-child(3) { grid-area: c; }
}
