/* Totsi case study theme (loaded only for theme: totsi, after casestudy-editorial.css).
 * A warm, light, product-led treatment of the shared editorial layout. Colours and type follow the Totsi website's own hero
 * (lilac #9469b2, ink #263246, cream #f8f3ef, a Georgia headline); nothing here is an official brand specification.
 * --tt-lilac is for fills and lines. Text and buttons use --tt-lilac-deep, a darker step of the same lilac, so they pass contrast.
 * Body text is Urbanist, as on the Totsi website (self-hosted latin subset, SIL OFL licence in assets/fonts/totsi/, loaded only here);
 * headings use the system serif the Totsi website's hero uses. */
@font-face {
  font-family: "Urbanist";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/totsi/urbanist-latin-wght-400-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
.ch-theme-totsi {
  --cs-font-1: "Urbanist", "Source Sans 3", system-ui, sans-serif;
  font-family: var(--cs-font-1);
  --tt-ink: #263246;
  --tt-text: #4a4a55;
  --tt-muted: #5c5a66;
  --tt-cream: #f8f3ef;
  --tt-cream-2: #fcf6f2;
  --tt-lilac: #9469b2;
  --tt-lilac-deep: #7a4f9a;
  --tt-lilac-soft: #f0e9f6;
  --tt-hair: #e4dbe9;
  --tt-surface: #fff;
  --ch-gold: var(--tt-lilac-deep);
  --ch-hair: var(--tt-hair);
  --ch-muted: var(--tt-muted);
  --cs-font-0: Georgia, "Times New Roman", serif;
}
html.dark-mode .ch-theme-totsi {
  --tt-ink: #fff;
  --tt-text: rgba(255, 255, 255, 0.86);
  --tt-muted: rgba(255, 255, 255, 0.72);
  --tt-cream: #2a2233;
  --tt-cream-2: #231c2b;
  --tt-lilac: #b394d1;
  --tt-lilac-deep: #cdb6e2;
  --tt-lilac-soft: #352b40;
  --tt-hair: rgba(255, 255, 255, 0.16);
  --tt-surface: #231c2b;
  --ch-gold: var(--tt-lilac-deep);
  --ch-hair: var(--tt-hair);
  --ch-muted: var(--tt-muted);
}

/* ---------------------------------------------------------------- shared type */
.ch-theme-totsi .ch-h2 {
  max-width: 17ch;
  text-transform: none;
  font-family: var(--cs-font-0);
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: 1.08em;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--tt-ink);
}
html.dark-mode .ch-theme-totsi .ch-h2 {
  color: #fff;
}
.ch-theme-totsi .ch-eyebrow {
  color: var(--tt-muted);
}
.ch-theme-totsi .ch-eyebrow:before {
  background-color: var(--tt-lilac);
}

/* ---------------------------------------------------------------- hero: warm cream, artwork on the left */
.ch-theme-totsi .ch-hero {
  background-color: var(--tt-cream);
}
.ch-theme-totsi .ch-hero__title {
  text-transform: none;
  font-family: var(--cs-font-0);
  font-size: clamp(2.5rem, 4.6vw, 4.5rem);
  line-height: 1.02em;
  font-weight: 400;
  letter-spacing: -0.035em;
  color: var(--tt-ink);
}
.ch-theme-totsi .ch-hero__b {
  color: var(--tt-lilac-deep);
}
.ch-theme-totsi .ch-hero .ch-topper,
html.dark-mode .ch-theme-totsi .ch-hero .ch-topper {
  color: var(--tt-lilac-deep);
}
.ch-theme-totsi .ch-topper:before {
  background-color: var(--tt-lilac);
}
.ch-theme-totsi .ch-hero .cs-breadcrumbs li,
.ch-theme-totsi .ch-hero .cs-breadcrumbs a {
  color: var(--tt-muted);
}
.ch-theme-totsi .ch-hero__lead,
html.dark-mode .ch-theme-totsi .ch-hero .ch-hero__lead {
  color: var(--tt-text);
}
.ch-theme-totsi .ch-disciplines,
html.dark-mode .ch-theme-totsi .ch-hero .ch-disciplines {
  color: var(--tt-ink);
}
.ch-hero__note {
  margin: 1.5rem 0 0;
  max-width: 30rem;
  border-left: 2px solid var(--tt-lilac);
  padding-left: 0.85rem;
  font-size: 0.9375rem;
  line-height: 1.5em;
  color: var(--tt-muted);
}
html.dark-mode .ch-theme-totsi .ch-hero .ch-hero__note {
  color: var(--tt-muted);
}
@media only screen and (min-width: 64rem) {
  .ch-theme-totsi .ch-hero__inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    padding-left: 0;
    padding-right: max(1rem, calc((100% - 80rem) / 2));
  }
  .ch-theme-totsi .ch-hero__media {
    order: -1;
    border-radius: 0 1.5rem 1.5rem 0;
  }
}

/* ---------------------------------------------------------------- 01 the brand (reuses ch-intro) */
.ch-theme-totsi .ch-intro__body p:first-child {
  font-family: var(--cs-font-0);
  letter-spacing: -0.01em;
}
.ch-theme-totsi .ch-intro__body li strong {
  text-transform: none;
  font-family: var(--cs-font-0);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--tt-ink);
}
html.dark-mode .ch-theme-totsi .ch-intro__body li strong {
  color: #fff;
}
.ch-theme-totsi .ch-intro__body ul {
  border-top-color: var(--tt-lilac);
}

/* ---------------------------------------------------------------- image slots and placeholders (ch-media) */
.ch-media {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}
.ch-r-4x5 {
  aspect-ratio: 4 / 5;
}
.ch-r-1x1 {
  aspect-ratio: 1 / 1;
}
.ch-r-3x2 {
  aspect-ratio: 3 / 2;
}
.ch-r-4x3 {
  aspect-ratio: 4 / 3;
}
.ch-r-16x10 {
  aspect-ratio: 16 / 10;
}
.ch-r-16x9 {
  aspect-ratio: 16 / 9;
}
.ch-r-phone {
  aspect-ratio: 780 / 1688;
}
.ch-media__img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.ch-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1.5px dashed var(--tt-lilac);
  background-color: var(--tt-lilac-soft);
  padding: 1rem;
  text-align: center;
  color: var(--tt-ink);
}
.ch-ph__tag {
  text-transform: uppercase;
  font-size: 0.75rem;
  line-height: 1.2em;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--tt-lilac-deep);
}
.ch-ph__label {
  max-width: 24ch;
  font-family: var(--cs-font-0);
  font-size: 1.125rem;
  line-height: 1.3em;
}
.ch-ph__spec {
  font-size: 0.75rem;
  line-height: 1.4em;
  color: var(--tt-muted);
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- 02 product and identity gallery */
.ch-theme-totsi .ch-gallery {
  background-color: var(--tt-cream);
}
.ch-gallery__head {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.ch-gallery__intro {
  max-width: 34rem;
}
.ch-gallery__intro p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.65em;
  color: var(--tt-text);
}
html.dark-mode .ch-theme-totsi .ch-gallery__intro p {
  color: var(--tt-text);
}
.ch-gal {
  display: grid;
  gap: 2rem;
}
.ch-gal__item {
  margin: 0;
  min-width: 0;
}
.ch-gal__cap {
  display: grid;
  gap: 0.15rem;
  margin: 0.8rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.5em;
  color: var(--tt-muted);
}
.ch-gal__cap strong {
  font-family: var(--cs-font-0);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--tt-ink);
}
.ch-gal__plate {
  display: grid;
  place-items: center;
  border: 1px solid var(--tt-hair);
  border-radius: 1rem;
  background-color: var(--tt-surface);
  aspect-ratio: 16 / 9;
}
.ch-gal__plate img {
  display: block;
  height: auto;
  width: 52%;
}
html.dark-mode .ch-theme-totsi .ch-gal__plate img {
  filter: brightness(1.35) saturate(0.8);
}
@media only screen and (min-width: 48rem) {
  .ch-gal {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(1.5rem, 3vw, 3rem);
    row-gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
  }
  .ch-gal__hero {
    grid-column: 1 / span 6;
    grid-row: 1 / span 2;
  }
  .ch-gal__logo {
    grid-column: 7 / span 6;
    grid-row: 1;
  }
  .ch-gal__pattern {
    grid-column: 7 / span 6;
    grid-row: 2;
  }
  .ch-gal__pack {
    grid-column: 1 / span 4;
    grid-row: 3;
  }
  .ch-gal__range {
    grid-column: 5 / span 8;
    grid-row: 3;
    margin-top: clamp(2rem, 6vw, 5rem);
  }
}
@media only screen and (min-width: 64rem) {
  .ch-gallery__head {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    column-gap: clamp(3rem, 7vw, 7rem);
    align-items: end;
  }
}

/* ---------------------------------------------------------------- 03 the shopping experience */
.ch-theme-totsi .ch-journey {
  background-color: var(--tt-lilac-soft);
}
.ch-journey__head {
  display: grid;
  gap: 0;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.ch-journey__intro {
  max-width: 36rem;
  margin-top: 1.25rem;
}
.ch-journey__intro p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.65em;
  color: var(--tt-text);
}
html.dark-mode .ch-theme-totsi .ch-journey__intro p {
  color: var(--tt-text);
}
.ch-frame {
  border: 1px solid var(--tt-hair);
  border-radius: 1.25rem;
  background-color: var(--tt-surface);
  padding: 0.45rem;
  box-shadow: 0 1.5rem 2.5rem -1.75rem rgba(122, 79, 154, 0.45);
}
.ch-frame .ch-media {
  border-radius: 0.85rem;
}
.ch-jn__num {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  font-family: var(--headerFont);
  font-size: 0.8125rem;
  line-height: 1.2em;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--tt-lilac-deep);
}
.ch-jn__num span {
  margin-right: 0.4em;
}
.ch-theme-totsi .ch-jn__title {
  margin: 0 0 0.4rem;
  text-transform: none;
  font-family: var(--cs-font-0);
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  line-height: 1.2em;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--tt-ink);
}
.ch-jn__text {
  margin: 0;
  max-width: 28rem;
  font-size: 1rem;
  line-height: 1.6em;
  color: var(--tt-text);
}
html.dark-mode .ch-theme-totsi .ch-jn__title {
  color: #fff;
}
html.dark-mode .ch-theme-totsi .ch-jn__text {
  color: var(--tt-text);
}
.ch-store {
  display: grid;
  gap: 2rem;
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}
.ch-store__devices {
  position: relative;
  padding-bottom: 2.5rem;
}
.ch-phoneframe {
  position: absolute;
  right: 0.5rem;
  bottom: 0;
  width: 27%;
  max-width: 11.5rem;
  border: 0.3rem solid var(--tt-ink);
  border-radius: 1.5rem;
  background-color: var(--tt-ink);
  overflow: hidden;
  box-shadow: 0 1.25rem 2rem -1rem rgba(38, 50, 70, 0.5);
}
html.dark-mode .ch-theme-totsi .ch-phoneframe {
  border-color: #4a3d58;
  background-color: #4a3d58;
}
.ch-phoneframe .ch-media {
  border-radius: 1.1rem;
}
.ch-phoneframe .ch-ph {
  padding: 0.5rem;
}
.ch-phoneframe .ch-ph__label {
  font-size: 0.875rem;
}
.ch-steps {
  display: grid;
  gap: 2.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ch-step {
  min-width: 0;
  border-top: 1px solid var(--tt-lilac);
  padding-top: 1rem;
}
.ch-step .ch-frame {
  margin: 0.25rem 0 1.25rem;
}
@media only screen and (min-width: 64rem) {
  .ch-store {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
    align-items: center;
  }
  .ch-store__text {
    grid-column: 1 / span 4;
  }
  .ch-store__devices {
    grid-column: 5 / span 8;
    padding-bottom: 3rem;
  }
  .ch-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(1.5rem, 3vw, 3rem);
    align-items: start;
  }
  .ch-step:nth-child(2) {
    margin-top: 2.5rem;
  }
}

/* ---------------------------------------------------------------- 04 commercial experience (ch-capabilities) */
.ch-capabilities__head {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem);
}
.ch-capabilities__intro {
  max-width: 36rem;
}
.ch-capabilities__intro p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.65em;
  color: var(--tt-text);
}
html.dark-mode .ch-theme-totsi .ch-capabilities__intro p {
  color: var(--tt-text);
}
.ch-cap4 {
  display: grid;
  gap: 0 clamp(2rem, 5vw, 5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ch-cap4__item {
  position: relative;
  border-top: 1px solid var(--tt-lilac);
  padding: 1.4rem 0 1.9rem;
}
.ch-cap4__item:before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  border-radius: 50%;
  background-color: var(--tt-lilac);
  height: 7px;
  width: 7px;
}
.ch-cap4__num {
  display: block;
  margin-bottom: 0.6rem;
  font-family: var(--cs-font-1);
  font-size: 0.8125rem;
  line-height: 1.2em;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--tt-lilac-deep);
}
.ch-theme-totsi .ch-cap4__title {
  margin: 0 0 0.5rem;
  text-transform: none;
  font-family: var(--cs-font-0);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.15em;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--tt-ink);
}
.ch-cap4__text {
  margin: 0;
  max-width: 26rem;
  font-size: 1.0625rem;
  line-height: 1.6em;
  color: var(--tt-text);
}
html.dark-mode .ch-theme-totsi .ch-cap4__title {
  color: #fff;
}
html.dark-mode .ch-theme-totsi .ch-cap4__text {
  color: var(--tt-text);
}
@media only screen and (min-width: 48rem) {
  .ch-cap4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media only screen and (min-width: 64rem) {
  .ch-capabilities__head {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    column-gap: clamp(3rem, 7vw, 7rem);
    align-items: end;
  }
}

/* ---------------------------------------------------------------- 05 digital marketing (ch-intro, numbered list) */
.ch-theme-totsi #ch-marketing {
  padding-top: clamp(3.5rem, 8vw, 7rem);
  background-color: var(--tt-cream);
}
.ch-theme-totsi #ch-marketing .ch-intro__body ul {
  counter-reset: ch-ch;
}
.ch-theme-totsi #ch-marketing .ch-intro__body li {
  position: relative;
  counter-increment: ch-ch;
  padding-left: 2.75rem;
}
.ch-theme-totsi #ch-marketing .ch-intro__body li:before {
  content: counter(ch-ch, decimal-leading-zero);
  position: absolute;
  top: 1.15rem;
  left: 0;
  font-family: var(--headerFont);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--tt-lilac-deep);
}
html.dark-mode .ch-theme-totsi #ch-marketing {
  background-color: var(--tt-cream);
}

/* ---------------------------------------------------------------- 06 the perspective (ch-partnership without a list) */
.ch-theme-totsi .ch-partner__body p:first-child {
  font-family: var(--cs-font-0);
  font-size: clamp(1.4rem, 2.3vw, 1.875rem);
  line-height: 1.38em;
  letter-spacing: -0.015em;
}
.ch-theme-totsi #ch-perspective {
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

/* ---------------------------------------------------------------- dark mode grounds */
html.dark-mode .ch-theme-totsi .ch-gallery,
html.dark-mode .ch-theme-totsi .ch-journey {
  background-color: var(--tt-cream);
}
html.dark-mode .ch-theme-totsi .ch-hero {
  background-color: var(--tt-cream);
}
html.dark-mode .ch-theme-totsi .ch-gal__cap strong {
  color: #fff;
}

/* small labels use the same Urbanist as the Totsi website, in its letterspaced capitals */
.ch-theme-totsi .ch-eyebrow,
.ch-theme-totsi .ch-topper,
.ch-theme-totsi .ch-disciplines,
.ch-theme-totsi .ch-jn__num,
.ch-theme-totsi .ch-fact dt,
.ch-theme-totsi .ch-intro__body h3,
.ch-theme-totsi #ch-marketing .ch-intro__body li:before {
  font-family: var(--cs-font-1);
}

/* a quiet note that the website screens are design concepts */
.ch-journey__note {
  max-width: 36rem;
  margin: 1rem 0 0;
  border-left: 2px solid var(--tt-lilac);
  padding-left: 0.85rem;
  font-size: 0.9375rem;
  line-height: 1.5em;
  color: var(--tt-muted);
}
html.dark-mode .ch-theme-totsi .ch-journey__note {
  color: var(--tt-muted);
}
