/* Connect case in the new styles (Figma 35:9395). Loaded after the live copy's styles.css
   and case-study.css and after alt.css, so it only overrides what changed: the header,
   the sheet's width and color, and the type (Lexend Deca to Bricolage Grotesque). */

/* Bricolage at the optical size Figma uses (its default, 14) */
.case-page { font-optical-sizing: none; }

/* Header: the home header on the case color (Figma 53:12266), 58px from the top */
.case-top { padding-top: 58px; height: 106px; }
.case-page .topbar { --topbar-bg: var(--c-case-accent, #488fff); }
.case-top .t-link { color: #fff; }
.case-top__right { display: flex; align-items: center; gap: 40px; }
.case-top__arrows { display: flex; gap: 16px; }
.case-top__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid #fff;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}
.case-top__arrow:hover { background: rgba(255, 255, 255, 0.16); }
.case-top__arrow img { display: block; width: 24px; height: 24px; }
.case-top__flip { transform: scaleX(-1); }
/* Ease CheckIn's light blue is too light for white text: its header is in the ink color */
.case-page--checkin .case-top .t-link { color: var(--c-ink); }
.case-page--checkin .case-top .icon--white { filter: none; }
.case-page--checkin .case-top__arrow { border-color: var(--c-ink); }
.case-page--checkin .case-top__arrow:hover { background: rgba(20, 20, 20, 0.06); }

/* The sheet: all 8 columns (1200px) on the grid, 32px under the header. Figma draws it
   1184px wide at x 272, 8px inside the grid on each side. Inside, Figma's 64px padding. */
.case {
  width: var(--content);
  margin-top: 8px; /* 32px under the header, 24 of them the bar's edge */
  background: var(--c-page);
  color: var(--c-body);
}

/* Type: the "Site/" text styles */
.case__title { font-weight: 500; font-size: 96px; line-height: 96px; letter-spacing: -0.04em; color: var(--c-ink); }
.case__subtitle,
.case__h2,
.quote p,
.project__title,
.theme__number { font-weight: 500; font-size: 40px; line-height: 48px; letter-spacing: -0.02em; }
.case__h2 { color: var(--c-ink); } /* .project__title keeps its white on the green project card */
.case__h3, .theme__title { font-weight: 600; font-size: 28px; line-height: 34px; color: var(--c-ink); }
.constraint__title { font-weight: 600; font-size: 28px; line-height: 34px; }
.rail__title, .density__title, .users__title, .problem__title, .review__quote { font-weight: 600; font-size: 20px; line-height: 28px; }
.bar { font-weight: 500; }
.revert__value, .star__value { font-weight: 500; letter-spacing: -0.04em; } /* Ease Construction's revert rate, Ease CheckIn's star: Site/Stat, Medium */
.bar__value--big { font-size: 40px; line-height: 48px; letter-spacing: -0.02em; }

/* Labels: Bricolage SemiBold 13, uppercase, the home's label color */
.facts dt, .flow__label {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 13px;
  line-height: normal;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.facts dt { color: var(--c-label); } /* the flow labels keep their blue */
.facts dd { color: var(--c-body); }
.case figcaption { color: #6e6a64; }

@media (max-width: 1023px) {
  .case__title { font-size: 64px; line-height: 64px; }
  .case-top { height: auto; flex-wrap: wrap; }
}
/* Phones: the links and the arrows wrap, so the arrows never run past the screen */
@media (max-width: 639px) {
  .case-top__right { flex-wrap: wrap; gap: 16px 24px; }
  .case__title { font-size: 44px; line-height: 48px; } /* the live site's phone size; "Construction" ran past a 320px screen at 64 */
}

/* Up next: a second sheet 40px under the case, with the two other cases as the home cards */
.upnext {
  width: var(--content);
  margin: 40px auto 96px;
  padding: 64px;
  background: var(--c-page);
  border-radius: 32px;
}
.upnext__head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.upnext__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px var(--gutter); }
@media (max-width: 1023px) {
  .upnext { padding: 32px; }
  .upnext__cards { grid-template-columns: minmax(0, 1fr); }
}

/* The case pills (Stage 1, Funded, Not actioned): white was made for the old beige sheet and
   barely shows on the cream one, so they take the home tags' gray. The green ones stay green. */
.case .tag:not(.tag--green) { background: var(--c-tag); }

/* "View in store" next to the Ease CheckIn title: a link in the new style, like Say hi,
   without the old glass pill (shared button style in styles.css, size in case-study.css) */
.store-link.t-link,
.store-link.t-link:hover {
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  font-weight: 400;
  line-height: 36px;
  color: #000;
}

/* Switching cases (arrows, Up next; alt-transition.js): the next case's color sweeps in
   behind the sheet, above the page's own color */
.case-sweep { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
/* The title and "View in store" share a baseline (they were centered) */
.case__title-row { align-items: baseline; }
/* Ease CheckIn's brand swatches (a fixed 345px drawing) ran past a 320px screen, on the live
   site too: smaller on the smallest phones */
@media (max-width: 374px) {
  .swatches { transform: scale(0.7); height: 163px; }
}
/* Subtitles run the full width of the sheet: no forced line break (Connect's) */
.case__subtitle .case__br { display: none; }
