:root {
  --case-blue: #2f6bff;
  --mosir-blue: #006cad;
  --mosir-red: #f15a40;
  --mosir-green: #43b97c;
  --case-beige: #d8cfc4;
}

.case-page {
  --content-width: 1920px;
  background: #fff;
}

.case-page .site-header {
  position: fixed;
  z-index: 9000;
  height: var(--header-height);
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
}

.case-page .site-header__logo,
.case-page .menu-toggle {
  position: absolute;
}

.case-page.is-menu-open .site-header {
  border-color: transparent;
  background: transparent;
  backdrop-filter: none;
}

.case-shell {
  width: min(100%, 1920px);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.case-rule {
  display: block;
  width: 170px;
  height: 2px;
  margin-block: 28px;
  background: currentColor;
  transform-origin: left;
}

.case-list {
  list-style: none;
}

.case-list li {
  position: relative;
  padding-left: .8em;
}

.case-list li::before {
  position: absolute;
  left: 0;
  content: "•";
}

/* ===== CASE HERO ===== */
.case-hero {
  min-height: 100svh;
  padding-top: var(--header-height);
  background: var(--case-blue);
  color: #fff;
}

.case-hero__inner {
  position: relative;
  display: flex;
  min-height: calc(100svh - var(--header-height));
  flex-direction: column;
  padding-top: 64px;
  padding-bottom: 48px;
}

.case-hero__heading h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .55em;
  font-size: clamp(58px, 5vw, 96px);
  font-weight: 300;
  letter-spacing: -.035em;
  line-height: .95;
}

.case-hero__heading h1 strong {
  font-weight: 700;
}

.case-hero__heading > p {
  max-width: 1300px;
  font-size: clamp(28px, 2.6vw, 50px);
  font-weight: 300;
  line-height: 1.08;
}

.case-hero__heading > p strong {
  font-weight: 700;
}

.case-hero__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(50px, 6vw, 115px);
  margin-top: 24px;
  font-size: clamp(14px, 1.22vw, 24px);
  font-weight: 300;
  line-height: 1.18;
}

.case-hero__columns p + p,
.case-copy__grid p + p,
.case-copy__grid ul + p,
.case-copy__grid p + ul {
  margin-top: 1.25em;
}

.case-hero__navigation {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 48px;
}

.case-back {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  font-size: clamp(13px, 1.15vw, 22px);
  line-height: 1.05;
}

.case-back .theme-icon {
  width: 40px;
  height: 40px;
}

.case-down {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--case-blue);
}

.case-down .theme-icon {
  width: 36px;
  height: 36px;
}

/* ===== EDITABLE COPY SECTIONS ===== */
.case-copy {
  position: relative;
  background: #fff;
}

.case-copy--beige {
  background: var(--case-beige);
}

.case-copy__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, .64fr) minmax(0, 2fr);
  gap: clamp(70px, 8.5vw, 165px);
  min-height: 450px;
  align-content: center;
  padding-top: 80px;
  padding-bottom: 80px;
}

.case-copy__grid h2 {
  font-size: clamp(22px, 1.45vw, 28px);
  font-weight: 700;
}

.case-copy__grid > div:nth-child(2) {
  max-width: 850px;
  font-size: clamp(15px, 1.25vw, 24px);
  font-weight: 300;
  line-height: 1.18;
}

.case-copy__stamp {
  position: absolute;
  top: 50%;
  right: var(--gutter);
  width: 54px;
  height: 54px;
  font-size: 20px;
  transform: translateY(-50%);
}

.case-copy--process .case-copy__grid,
.case-copy--solution .case-copy__grid,
.case-copy--effect .case-copy__grid {
  min-height: 610px;
}

/* ===== LOGO SYSTEM ===== */
.case-identity,
.case-marks {
  overflow: hidden;
  background: #fff;
}

.case-identity .case-shell,
.case-marks .case-shell {
  padding-top: 110px;
  padding-bottom: 120px;
}

.case-identity__hero {
  display: flex;
  min-height: 270px;
  align-items: center;
}

.mosir-wordmark {
  display: block;
  width: 100%;
  max-width: 390px;
  aspect-ratio: 747 / 367;
  background: url("../img/case/mosir-logo-color.png") center / contain no-repeat;
}

.mosir-wordmark.is-blue { filter: none; }
.mosir-wordmark.is-red { filter: brightness(0) saturate(100%) invert(44%) sepia(98%) saturate(1674%) hue-rotate(336deg) brightness(101%) contrast(89%); }
.mosir-wordmark.is-green { filter: brightness(0) saturate(100%) invert(63%) sepia(57%) saturate(540%) hue-rotate(103deg) brightness(91%) contrast(89%); }
.mosir-wordmark.is-white { filter: brightness(0) invert(1); }

.case-identity__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-left: 25%;
}

.case-identity__grid > div {
  display: grid;
  aspect-ratio: 1.05;
  place-items: center;
}

.case-identity__grid .mosir-wordmark {
  width: 58%;
}

.case-identity__grid > div.is-red,
.case-marks__grid > div.is-red { background: var(--mosir-red); }
.case-identity__grid > div.is-green,
.case-marks__grid > div.is-green { background: var(--mosir-green); }
.case-identity__grid > div.is-blue,
.case-marks__grid > div.is-blue { background: var(--mosir-blue); }

/* ===== MARK SYSTEM ===== */
.case-marks__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  margin-top: 30px;
  margin-left: 5%;
}

.case-marks__grid > div {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
}

.case-marks__grid .mark-tile.is-featured {
  grid-row: span 2;
  align-self: start;
  transform: translateY(-35%);
}

.mosir-mark-svg {
  display: block;
  width: 68%;
  height: 68%;
  object-fit: contain;
}

.mosir-mark-svg.is-small {
  width: 48%;
  height: 55%;
}

.mosir-mark-svg.is-tile {
  width: 100%;
  height: 100%;
}

.mosir-mark {
  display: grid;
  width: clamp(86px, 9vw, 172px);
  aspect-ratio: .78;
  place-items: center;
  border: 5px solid currentColor;
  border-radius: 45% 40% 45% 42%;
  color: var(--mosir-blue);
  font-family: Arial Black, Arial, sans-serif;
  font-size: clamp(42px, 5vw, 96px);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: -.16em;
  transform: rotate(8deg);
}

.mosir-mark.is-blue { color: var(--mosir-blue); }
.mosir-mark.is-red { color: var(--mosir-red); }
.mosir-mark.is-green { color: var(--mosir-green); }
.mosir-mark.is-white { color: #fff; }
.mosir-mark.is-outline { background: transparent; }

/* ===== FULL BLEED MEDIA ===== */
.case-full-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 1920 / 1110;
  background: #ddd;
}

.case-full-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-full-media--outdoor {
  aspect-ratio: 1920 / 1170;
}

.case-full-media--outdoor img {
  height: 110%;
}

/* ===== SOCIAL COMPOSITION ===== */
.case-social {
  padding-block: clamp(120px, 9vw, 175px);
  overflow: hidden;
  background: var(--case-beige);
}

.case-social__grid {
  display: grid;
  grid-template-columns: 1fr .95fr 1fr 1fr;
  gap: clamp(18px, 1.8vw, 35px);
  align-items: center;
}

.case-social-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
}

.case-social-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-social-card strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: clamp(24px, 2.5vw, 48px);
  font-style: italic;
  line-height: 1.15;
  text-align: center;
}

.case-social-card.is-pool img {
  transform: scale(1.05);
}

.case-phone {
  position: relative;
  z-index: 2;
  overflow: hidden;
  aspect-ratio: .54;
  border: clamp(7px, .7vw, 13px) solid #050505;
  border-radius: clamp(30px, 3vw, 58px);
  background: #fff;
  box-shadow: 0 18px 50px rgb(0 0 0 / 14%);
}

.case-phone__speaker {
  width: 28%;
  height: 2.5%;
  margin: 2.8% auto 2%;
  border-radius: 999px;
  background: #050505;
}

.case-phone__stories {
  display: flex;
  justify-content: space-around;
  padding: 4% 5%;
}

.case-phone__stories i {
  width: 14%;
  aspect-ratio: 1;
  border: 3px solid #fff;
  border-radius: 50%;
  outline: 3px solid var(--mosir-red);
  background: var(--mosir-blue);
}

.case-phone__stories i:nth-child(2n) { background: var(--mosir-green); }
.case-phone__stories i:nth-child(3n) { background: var(--mosir-red); }

.case-phone > p {
  display: flex;
  align-items: center;
  gap: 3%;
  padding: 4%;
  border-top: 1px solid #ddd;
  font-family: Arial, sans-serif;
  font-size: clamp(8px, .75vw, 14px);
}

.case-phone > p .mosir-mark {
  width: 10%;
  border-width: 1px;
  font-size: clamp(8px, 1vw, 18px);
}

.case-phone__post {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  background: var(--mosir-red);
}

.case-phone__post .mosir-mark {
  width: 40%;
}

.case-phone__post small {
  position: absolute;
  right: 6%;
  bottom: 5%;
  font-family: Arial Black, Arial, sans-serif;
  font-size: clamp(7px, .7vw, 13px);
  font-style: italic;
  line-height: .9;
}

.case-phone__meta {
  padding: 5%;
  font-family: Arial, sans-serif;
  font-size: clamp(6px, .62vw, 12px);
}

.case-phone__meta span,
.case-phone__meta small {
  display: block;
}

.case-phone__meta small { margin-top: 5%; }
.case-phone__meta em { color: #2576d4; }

/* ===== GALLERY + SUMMARY ===== */
.case-gallery {
  padding-block: 60px 140px;
  background: #fff;
}

.case-gallery__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 42px;
}

.case-gallery__grid figure {
  overflow: hidden;
  aspect-ratio: 1.75;
}

.case-gallery__grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}

.case-gallery__grid figure:hover img {
  transform: scale(1.035);
}

.case-summary {
  padding-block: 70px 150px;
  background: #fff;
}

.case-summary .case-shell {
  max-width: 1920px;
  font-size: clamp(16px, 1.28vw, 24px);
  font-weight: 300;
  line-height: 1.28;
}

.case-summary p + p {
  margin-top: 1.35em;
}

.case-footer .site-footer__main {
  min-height: 870px;
}

.case-footer .site-footer__closing {
  min-height: 190px;
}

/* ===== MOTION ===== */
.js .case-rule {
  transform: scaleX(0);
}

.js .case-rule.is-visible {
  transform: scaleX(1);
  transition: transform 1s var(--ease-out);
}

@media (max-width: 991px) {
  .case-page {
    --gutter: 10px;
  }

  .case-page .site-header {
    height: 78px;
  }

  .case-page .site-header__logo {
    left: 22px;
    width: 105px;
  }

  .case-page .menu-toggle {
    right: 22px;
  }

  .case-hero__inner {
    padding-top: 50px;
    padding-bottom: 42px;
  }

  .case-hero__heading h1 {
    display: block;
    font-size: clamp(52px, 15vw, 76px);
    line-height: 1.03;
  }

  .case-hero__heading h1 span {
    display: block;
    font-weight: 300;
  }

  .case-rule {
    width: 68px;
    height: 1px;
    margin-block: 20px;
  }

  .case-hero__heading > p {
    max-width: 97%;
    font-size: clamp(24px, 6vw, 34px);
  }

  .case-hero__columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 70px;
    font-size: clamp(11px, 2.75vw, 14px);
    line-height: 1.12;
  }

  .case-hero__navigation {
    padding-top: 36px;
  }

  .case-back {
    gap: 14px;
    font-size: 11px;
  }

  .case-back .theme-icon {
    width: 26px;
    height: 26px;
  }

  .case-down {
    width: 48px;
    height: 48px;
  }

  .case-down .theme-icon {
    width: 24px;
    height: 24px;
  }

  .case-copy__grid {
    grid-template-columns: 31% minmax(0, 1fr);
    gap: 18px;
    min-height: 430px;
    padding-block: 60px;
  }

  .case-copy__grid h2 {
    font-size: 13px;
  }

  .case-copy__grid > div:nth-child(2) {
    padding-right: 2px;
    font-size: clamp(11px, 2.8vw, 14px);
    line-height: 1.13;
  }

  .case-copy__stamp {
    display: none;
  }

  .case-copy--process .case-copy__grid,
  .case-copy--solution .case-copy__grid,
  .case-copy--effect .case-copy__grid {
    min-height: 520px;
  }

  .case-copy--solution .case-copy__grid {
    min-height: 620px;
  }

  .case-identity .case-shell,
  .case-marks .case-shell {
    padding: 78px 0 0;
  }

  .case-identity__hero {
    min-height: 420px;
    justify-content: center;
    padding-inline: 35px;
  }

  .case-identity__hero .mosir-wordmark {
    width: 64%;
  }

  .case-identity__grid {
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
  }

  .case-identity__grid > div {
    aspect-ratio: 1;
  }

  .case-identity__grid .mosir-wordmark {
    width: 62%;
  }

  .case-marks__grid {
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
  }

  .case-marks__grid > div {
    aspect-ratio: 1;
  }

  .case-marks__grid .mark-tile.is-featured {
    display: none;
  }

  .mosir-mark-svg.is-small {
    width: 52%;
    height: 58%;
  }

  .mosir-mark {
    width: clamp(62px, 17vw, 96px);
    border-width: 3px;
    font-size: clamp(34px, 11vw, 58px);
  }

  .case-full-media {
    aspect-ratio: 1080 / 865;
  }

  .case-full-media img {
    object-position: center;
  }

  .case-social {
    padding-block: 75px;
  }

  .case-social__grid {
    grid-template-columns: .92fr 1.12fr .92fr .92fr;
    gap: 8px;
    padding-inline: 10px;
  }

  .case-social-card strong {
    font-size: clamp(12px, 3.1vw, 19px);
  }

  .case-phone {
    border-width: 5px;
    border-radius: 24px;
  }

  .case-phone__stories i {
    border-width: 1px;
    outline-width: 1px;
  }

  .case-phone__post .mosir-mark {
    width: 42%;
    border-width: 2px;
    font-size: 22px;
  }

  .case-full-media--outdoor {
    aspect-ratio: 1080 / 1070;
  }

  .case-full-media--outdoor img {
    width: 100%;
    height: 100%;
    object-position: center;
  }

  .case-gallery {
    padding: 0 0 85px;
  }

  .case-gallery__grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0;
  }

  .case-gallery__grid figure {
    aspect-ratio: 1.03;
  }

  .case-gallery__grid figure:nth-child(1),
  .case-gallery__grid figure:nth-child(3) {
    aspect-ratio: .72;
  }

  .case-gallery__grid img {
    object-position: center;
  }

  .case-summary {
    padding-block: 55px 105px;
  }

  .case-summary .case-shell {
    padding-inline: 10px;
    font-size: clamp(12px, 3vw, 15px);
    line-height: 1.22;
  }

  .case-footer .site-footer__main {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "lead lead"
      "nav brand";
    gap: 46px 30px;
    min-height: 1040px;
  }

  .case-footer .site-footer__lead { grid-area: lead; }

  .case-footer .site-footer__brand {
    grid-area: brand;
    align-self: start;
  }

  .case-footer .site-footer__nav {
    grid-area: nav;
    align-self: start;
    padding-top: 0;
    border-top: 0;
  }

  .case-footer .site-footer__closing {
    min-height: 110px;
  }
}

@media (min-width: 992px) {
  .case-page .site-header__logo {
    left: var(--gutter);
  }

  .case-page .menu-toggle {
    right: var(--gutter);
  }

  .case-hero {
    min-height: 50vh;
  }

  .case-hero__inner {
    min-height: calc(50vh - var(--header-height));
    padding-top: clamp(55px, 4.4vw, 84px);
    padding-bottom: 55px;
  }

  .case-identity__hero .mosir-wordmark {
    margin-left: 0;
  }

  .case-summary .case-shell {
    padding-inline: var(--gutter);
  }

  .case-footer .site-footer__main {
    min-height: 920px;
  }

  .case-footer .site-footer__closing {
    min-height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .case-rule {
    transform: scaleX(1);
  }
}
