/* Coastals v16 visual system adapted to the seven case-study pages.
   Presentation only: no case-study copy is generated or replaced here. */
:root {
  --v16-paper: #e8e6e1;
  --v16-surface: #fff;
  --v16-ink: #111;
  --v16-muted: #687080;
  --v16-line: #d9d6cf;
  --v16-dark: #151515;
  --v16-max: 1240px;
}

body.v16-case-study {
  background: var(--v16-paper);
  color: var(--v16-ink)
}

body.v16-case-study .page {
  overflow: hidden
}

/* HERO */
body.v16-case-study .hero {
  position: relative;
  min-height: 760px;
  padding: 28px 24px 96px;
  background: var(--v16-dark);
  color: #fff;
  overflow: hidden
}

body.v16-case-study .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 78%)
}

body.v16-case-study .heroNoise {
  opacity: .10;
  z-index: 0
}

body.v16-case-study .nav {
  width: min(100%, var(--v16-max));
  margin: 0 auto;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 28px
}

body.v16-case-study .brand {
  font: 600 16px/1 "Instrument Sans", sans-serif;
  text-decoration: none;
  letter-spacing: -.4px;
  color: #fff
}

body.v16-case-study .portfolio-nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto
}

body.v16-case-study .portfolio-nav-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, .66);
  text-decoration: none
}

body.v16-case-study .portfolio-nav-links a:hover {
  color: #fff
}

body.v16-case-study .navLink {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .05);
  color: #fff;
  text-decoration: none;
  font-size: 13px
}

body.v16-case-study .heroInner {
  width: min(100%, var(--v16-max));
  min-height: 610px;
  margin: 94px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .72fr);
  gap: 86px;
  align-items: center;
  position: relative;
  z-index: 2
}

body.v16-case-study .eyebrow {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .48);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.35px;
  text-transform: uppercase
}

body.v16-case-study .heroTitle {
  max-width: 900px;
  margin: 0;
  font: 600 clamp(58px, 7.6vw, 104px)/.92 "Instrument Sans", sans-serif;
  letter-spacing: -1.2px;
  color: #fff
}

body.v16-case-study .heroIntro {
  max-width: 690px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, .68);
  font-size: 17px;
  line-height: 1.75
}

body.v16-case-study .heroActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px
}

body.v16-case-study .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 0;
  text-decoration: none;
  font: 600 13px/1 "Instrument Sans", sans-serif
}

body.v16-case-study .buttonPrimary {
  background: #fff;
  color: #111
}

body.v16-case-study .buttonGhost {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .18);
  color: #fff
}

body.v16-case-study .heroVisual {
  min-height: 590px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center
}

/* Hero devices */
body.v16-case-study .phoneFrame,
body.v16-case-study .floatingShell {
  overflow: hidden;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .30)
}

body.v16-case-study .phoneFrame {
  width: min(100%, 430px);
  border: 10px solid #171a22;
  border-radius: 34px;
  transform: rotate(1.5deg);
  position: relative;
  z-index: 2
}

body.v16-case-study .phoneFrame img {
  width: 100%;
  height: auto;
  display: block
}

body.v16-case-study.v16-hero-web .phoneFrame {
  border: 10px solid #171a22;
  border-radius: 16px;
  width: min(100%, 520px);
  transform: rotate(1deg);
  position: relative;
  padding-top: 12px
}

body.v16-case-study.v16-hero-web .phoneFrame::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  background: #171a22
}

body.v16-case-study.v16-hero-web .floatingShell {
  position: absolute;
  right: -20px;
  bottom: 26px;
  width: 168px;
  border: 8px solid #171a22;
  border-radius: 14px;
  transform: rotate(-3deg);
  z-index: 3
}

body.v16-case-study.v16-hero-web .floatingShell img {
  width: 100%;
  height: auto;
  display: block
}

body.v16-case-study.v16-hero-phone .phoneFrame {
  width: min(100%, 310px);
  border-radius: 34px
}

body.v16-case-study.v16-hero-phone .floatingShell {
  position: absolute;
  right: -10px;
  bottom: 34px;
  width: 132px;
  border: 8px solid #171a22;
  border-radius: 28px;
  transform: rotate(-3deg);
  z-index: 3
}

body.v16-case-study.v16-hero-phone .floatingShell img {
  width: 100%;
  height: auto
}

/* Meta strip */
body.v16-case-study .metaStrip {
  width: min(calc(100% - 48px), var(--v16-max));
  margin: -42px auto 0;
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .76);
  box-shadow: 0 24px 70px rgba(11, 13, 20, .09);
  backdrop-filter: blur(18px);
  border-radius: 26px
}

body.v16-case-study .metaItem {
  padding: 24px;
  border-right: 1px solid var(--v16-line)
}

body.v16-case-study .metaItem:last-child {
  border-right: 0
}

body.v16-case-study .metaLabel {
  display: block;
  margin-bottom: 6px;
  color: #78808d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase
}

body.v16-case-study .metaValue {
  display: block;
  font: 600 15px/1.35 "Instrument Sans", sans-serif;
  color: #111
}

/* Editorial canvas and sections */
body.v16-case-study #caseStudy {
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--v16-paper)
}

body.v16-case-study #caseStudy>section {
  width: 100%;
  margin: 0;
  padding: 118px 24px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--v16-paper);
  position: relative
}

body.v16-case-study #caseStudy>section:nth-of-type(even) {
  background: #fff
}

body.v16-case-study #caseStudy>section>* {
  width: min(100%, var(--v16-max));
  margin-left: auto;
  margin-right: auto
}

body.v16-case-study .sectionHeader {
  display: grid;
  grid-template-columns: 70px minmax(0, 900px);
  gap: 32px;
  margin-bottom: 70px
}

body.v16-case-study .sectionNumber {
  color: #8a919c;
  font: 600 12px/1 "Instrument Sans", sans-serif;
  letter-spacing: 1px;
  padding-top: 7px
}

body.v16-case-study .sectionTitle {
  margin: 0;
  color: #111;
  font: 600 clamp(42px, 5.1vw, 70px)/1.01 "Instrument Sans", sans-serif;
  letter-spacing: -1px;
  max-width: 100%;
}

body.v16-case-study .sectionLead {
  max-width: 720px;
  color: var(--v16-muted);
  font-size: 15px;
  line-height: 1.75
}

body.v16-case-study .glassCard,
body.v16-case-study .problemCard,
body.v16-case-study .decisionCard,
body.v16-case-study .wideCard,
body.v16-case-study .flow,
body.v16-case-study .caseTableWrap {
  border: 1px solid var(--v16-line);
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 18px 50px rgba(11, 13, 20, .055);
  border-radius: 22px
}

body.v16-case-study #caseStudy>section:nth-of-type(even) .glassCard,
body.v16-case-study #caseStudy>section:nth-of-type(even) .problemCard,
body.v16-case-study #caseStudy>section:nth-of-type(even) .decisionCard,
body.v16-case-study #caseStudy>section:nth-of-type(even) .wideCard,
body.v16-case-study #caseStudy>section:nth-of-type(even) .flow,
body.v16-case-study #caseStudy>section:nth-of-type(even) .caseTableWrap {
  background: #fff
}

body.v16-case-study .cardText,
body.v16-case-study .sectionLead {
  color: #687080
}

body.v16-case-study .cardLabel {
  color: #7b8491
}

/* Visual proof becomes a Coastals-style white chapter */
body.v16-case-study #caseStudy>.portfolio-proof {
  padding: 118px 24px;
  background: #fff;
  border: 0
}

body.v16-case-study #caseStudy>.portfolio-proof .shellContainer {
  width: min(100%, var(--v16-max));
  margin: 0 auto
}

body.v16-case-study #caseStudy>.portfolio-proof .sectionNumber {
  color: #7b8491;
  font-size: 10px;
  letter-spacing: 1.4px;
  font-weight: 700
}

body.v16-case-study #caseStudy>.portfolio-proof .sectionTitle {
  color: #111;
  font-family: "Instrument Sans", sans-serif;
  font-size: clamp(44px, 5vw, 70px);
  line-height: 1;
  letter-spacing: -.9px;
  font-weight: 600;
  margin: 16px 0 18px
}

body.v16-case-study #caseStudy>.portfolio-proof .sectionLead {
  max-width: 100%;
  color: #687080;
  font-size: 15px;
  line-height: 1.75
}

/* Interface carousel: horizontal, scrollable, Coastals-inspired */
body.v16-case-study .showcase-carousel {
  position: relative;
  width: 100%;
  margin-top: 34px;
  --sc-gap: 34px
}

body.v16-case-study .showcase-carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x;
  cursor: grab;
  padding: 18px 2px 36px
}

body.v16-case-study .showcase-carousel__viewport::-webkit-scrollbar {
  display: none
}

body.v16-case-study .showcase-carousel__viewport.is-dragging {
  cursor: grabbing
}

body.v16-case-study .showcase-carousel__track {
  display: flex;
  gap: var(--sc-gap);
  width: max-content;
  height: auto;
  min-height: 520px
}

body.v16-case-study .showcase-carousel__slide {
  position: relative;
  inset: auto;
  width: min(100%, 1040px);
  min-width: min(100%, 1040px);
  height: auto;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: center;
  gap: 54px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: none;
  scroll-snap-align: start;
  padding: 38px 0
}

body.v16-case-study .showcase-carousel__slide.is-active,
body.v16-case-study .showcase-carousel__slide.is-next,
body.v16-case-study .showcase-carousel__slide.is-prev {
  opacity: 1;
  visibility: visible;
  transform: none
}

body.v16-case-study .showcase-carousel__media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 460px;
  padding: 18px
}

body.v16-case-study .showcase-carousel__media img {
  display: block;
  max-width: 100%;
  max-height: 520px;
  width: auto;
  height: auto;
  filter: drop-shadow(0 28px 40px rgba(11, 13, 20, .14))
}

body.v16-case-study .showcase-carousel__caption {
  padding: 0 0 0 4px;
  color: #687080;
  font-size: 13px;
  line-height: 1.7
}

body.v16-case-study .showcase-carousel__caption strong {
  display: block;
  margin-bottom: 10px;
  color: #111;
  font: 600 24px/1.15 "Instrument Sans", sans-serif
}

body.v16-case-study .showcase-carousel__placeholder {
  width: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 35px;
  border: 1px dashed rgba(105, 114, 128, .30);
  border-radius: 16px;
  background: linear-gradient(145deg, #ecebe8, #fafafa);
  color: #8a929d;
  font-size: 10px;
  letter-spacing: 1.3px;
  text-transform: uppercase
}

body.v16-case-study .showcase-carousel__controls {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  z-index: 20;
  pointer-events: none;
  margin: 0
}

body.v16-case-study .showcase-carousel__counter {
  position: absolute;
  left: 4px;
  bottom: 2px;
  color: #78818e;
  font: 600 10px/1 "Manrope", sans-serif;
  letter-spacing: 1.2px;
  text-transform: uppercase
}

body.v16-case-study .showcase-carousel__buttons {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none
}

body.v16-case-study .showcase-carousel__button {
  pointer-events: auto;
  appearance: none;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 1px solid rgba(17, 20, 28, .13);
  border-radius: 50%;
  background: rgba(255, 255, 255, .90);
  color: #15181e;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 12px 32px rgba(11, 13, 20, .08);
  backdrop-filter: blur(14px);
  transition: transform .25s ease, background .25s ease, border-color .25s ease
}

body.v16-case-study .showcase-carousel__button:hover {
  background: #fff;
  transform: scale(1.06);
  border-color: rgba(17, 20, 28, .22)
}

body.v16-case-study .showcase-carousel__button:disabled {
  opacity: .32;
  cursor: default;
  transform: none
}

body.v16-case-study .showcase-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 0;
  position: relative;
  z-index: 21
}

body.v16-case-study .showcase-carousel__dot {
  width: 5px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #b7bdc6;
  cursor: pointer;
  transition: width .25s ease, background .25s ease, border-radius .25s ease
}

body.v16-case-study .showcase-carousel__dot.is-active {
  width: 22px;
  border-radius: 5px;
  background: #616a76
}

/* Device treatments inside the carousel */
body.v16-case-study .v16-screen-frame {
  position: relative;
  display: block;
  max-width: 100%
}

body.v16-case-study .v16-screen-frame img {
  position: relative;
  z-index: 2
}

body.v16-case-study .v16-screen-frame.v16-phone {
  padding: 10px;
  border: 8px solid #171a22;
  border-radius: 30px;
  background: #171a22;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .16)
}

body.v16-case-study .v16-screen-frame.v16-phone img {
  max-height: 540px;
  border-radius: 18px
}

body.v16-case-study .v16-screen-frame.v16-laptop {
  padding: 13px 13px 18px;
  border: 9px solid #171a22;
  border-bottom-width: 20px;
  border-radius: 13px;
  background: #171a22;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .16)
}

body.v16-case-study .v16-screen-frame.v16-laptop::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: -7%;
  right: -7%;
  bottom: -34px;
  height: 18px;
  border-radius: 0 0 12px 12px;
  background: #252832;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .12)
}

body.v16-case-study .v16-screen-frame.v16-laptop img {
  max-width: 760px;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  background: #fff
}

body.v16-case-study .v16-screen-frame.v16-raw img {
  max-height: 500px
}

/* Dark Coastals chapters */
body.v16-case-study #caseStudy>.v16-dark-section {
  background: var(--v16-dark) !important;
  color: #fff;
  padding-top: 118px;
  padding-bottom: 118px
}

body.v16-case-study #caseStudy>.v16-dark-section .sectionNumber {
  color: rgba(255, 255, 255, .42)
}

body.v16-case-study #caseStudy>.v16-dark-section .sectionTitle {
  color: #fff
}

body.v16-case-study #caseStudy>.v16-dark-section .sectionLead,
body.v16-case-study #caseStudy>.v16-dark-section p {
  color: #687080;
}

body.v16-case-study #caseStudy>.v16-dark-section .glassCard,
body.v16-case-study #caseStudy>.v16-dark-section .problemCard,
body.v16-case-study #caseStudy>.v16-dark-section .decisionCard,
body.v16-case-study #caseStudy>.v16-dark-section .wideCard,
body.v16-case-study #caseStudy>.v16-dark-section .caseTableWrap {
  background: rgba(255, 255, 255, .055);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: none;
  color: #111111
}

body.v16-case-study #caseStudy>.v16-dark-section .cardText,
body.v16-case-study #caseStudy>.v16-dark-section .cardLabel {
  color: rgba(255, 255, 255, .58)
}

body.v16-case-study #caseStudy>.v16-dark-section .closing {
  background: transparent
}

/* Footer */
body.v16-case-study footer {
  background: #111;
  color: rgba(255, 255, 255, .55);
  border-top: 1px solid rgba(255, 255, 255, .08)
}

@media(max-width:900px) {
  body.v16-case-study .hero {
    min-height: auto;
    padding-bottom: 82px
  }

  body.v16-case-study .heroInner {
    grid-template-columns: 1fr;
    gap: 42px;
    margin-top: 74px
  }

  body.v16-case-study .heroVisual {
    min-height: 460px
  }

  body.v16-case-study .metaStrip {
    grid-template-columns: repeat(2, 1fr)
  }

  body.v16-case-study .metaItem:nth-child(2) {
    border-right: 0
  }

  body.v16-case-study .metaItem:nth-child(-n+2) {
    border-bottom: 1px solid var(--v16-line)
  }

  body.v16-case-study #caseStudy>section {
    padding: 88px 20px
  }

  body.v16-case-study .sectionHeader {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 46px
  }

  body.v16-case-study .showcase-carousel__slide {
    width: min(100%, 820px);
    min-width: min(100%, 820px);
    grid-template-columns: 1fr;
    gap: 20px
  }

  body.v16-case-study .showcase-carousel__media {
    min-height: 420px
  }

  body.v16-case-study .showcase-carousel__caption {
    padding: 0 12px
  }
}

@media(max-width:620px) {
  body.v16-case-study .hero {
    padding: 22px 18px 70px
  }

  body.v16-case-study .portfolio-nav-links {
    display: none
  }

  body.v16-case-study .heroInner {
    margin-top: 58px
  }

  body.v16-case-study .heroTitle {
    font-size: clamp(50px, 15vw, 76px)
  }

  body.v16-case-study .heroIntro {
    font-size: 15px
  }

  body.v16-case-study .heroVisual {
    min-height: 380px
  }

  body.v16-case-study.v16-hero-web .phoneFrame {
    width: 100%;
    border-width: 7px
  }

  body.v16-case-study.v16-hero-web .floatingShell {
    right: -8px;
    width: 120px;
    border-width: 6px
  }

  body.v16-case-study.v16-hero-phone .phoneFrame {
    width: min(100%, 280px)
  }

  body.v16-case-study.v16-hero-phone .floatingShell {
    width: 105px;
    right: -2px
  }

  body.v16-case-study .metaStrip {
    width: calc(100% - 28px);
    grid-template-columns: 1fr;
    margin-top: -28px;
    border-radius: 20px
  }

  body.v16-case-study .metaItem {
    padding: 18px;
    border-right: 0 !important;
    border-bottom: 1px solid var(--v16-line)
  }

  body.v16-case-study .metaItem:last-child {
    border-bottom: 0
  }

  body.v16-case-study #caseStudy>section,
  body.v16-case-study #caseStudy>.portfolio-proof {
    padding: 76px 18px
  }

  body.v16-case-study .sectionTitle,
  body.v16-case-study #caseStudy>.portfolio-proof .sectionTitle {
    font-size: clamp(38px, 11vw, 54px)
  }

  body.v16-case-study .showcase-carousel__track {
    min-height: 430px
  }

  body.v16-case-study .showcase-carousel__slide {
    width: calc(100vw - 36px);
    min-width: calc(100vw - 36px);
    padding: 28px 0;
    gap: 8px
  }

  body.v16-case-study .showcase-carousel__media {
    min-height: 300px;
    padding: 8px
  }

  body.v16-case-study .showcase-carousel__media img {
    max-height: 380px
  }

  body.v16-case-study .showcase-carousel__button {
    width: 42px;
    height: 42px
  }

  body.v16-case-study .showcase-carousel__caption strong {
    font-size: 20px
  }
}

@media(prefers-reduced-motion:reduce) {
  body.v16-case-study .showcase-carousel__button {
    transition: none !important
  }
}